/* --- Moodle Core Theme Overrides (Fixing the Top Gap) --- */
body.path-local-coursefund #page.container-fluid {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.path-local-coursefund #page-header,
body.path-local-coursefund .header-maxwidth {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
body.path-local-coursefund #page-navbar {
    display: none !important; /* Hides the empty breadcrumb wrapper */
}
body.path-local-coursefund .page-context-header {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
}
body.path-local-coursefund .page-context-header .header-heading {
    font-size: 1.5rem !important; /* Reduces the huge H1 text to save space */
    margin-top: 0.5rem !important;
}
body.path-local-coursefund #page-content,
body.path-local-coursefund #region-main,
body.path-local-coursefund .main-inner {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.path-local-coursefund #region-main {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* --- Plugin Components --- */
.campaign-card, .vote-card { transition: transform 0.3s ease, box-shadow 0.3s ease; border-radius: 12px; border: none; position: relative; overflow: hidden; }
.campaign-card:hover, .vote-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important; }
.campaign-img { height: 220px; object-fit: cover; width: 100%; border-bottom: 3px solid #f8f9fa; }
.img-fallback { height: 220px; width: 100%; background: #e9ecef; display: flex; align-items: center; justify-content: center; border-bottom: 3px solid #f8f9fa; }
.vote-tally { font-size: 1.5rem; font-weight: bold; color: #635bff; }

@keyframes glowPulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.8); transform: scale(1.02); border: 2px solid #28a745; }
    50% { box-shadow: 0 0 30px 15px rgba(40, 167, 69, 0); transform: scale(1.02); border: 2px solid #28a745; }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); transform: scale(1); border: none; }
}
.card-celebrate { animation: glowPulse 2s ease-out 3; z-index: 10; }
.thank-you-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.95); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; z-index: 5; text-align: center; }
.thank-you-overlay.show-thanks { opacity: 1; }
.thank-you-text { font-size: 2.2rem; font-weight: 900; color: #28a745; text-shadow: 0 2px 10px rgba(0,0,0,0.1); transform: translateY(20px); transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.thank-you-overlay.show-thanks .thank-you-text { transform: translateY(0); }
.thank-you-sub { font-size: 1.1rem; font-weight: 600; color: #495057; opacity: 0; transition: opacity 0.8s ease 0.3s; }
.thank-you-overlay.show-thanks .thank-you-sub { opacity: 1; }

details.custom-accordion { background: #fff; border-radius: 12px; overflow: visible; margin-bottom: 20px; }
details.custom-accordion summary { cursor: pointer; padding: 15px 20px; font-size: 1.3rem; list-style: none; user-select: none; border-bottom: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s ease; }
details.custom-accordion summary::-webkit-details-marker { display: none; }
details.custom-accordion summary:hover { background-color: #f8f9fa; }
details.custom-accordion summary:focus { outline: none; }
.accordion-icon { transition: transform 0.3s ease; font-size: 1.2rem; }
details.custom-accordion[open] .accordion-icon { transform: rotate(180deg); }
details.custom-accordion[open] summary { border-bottom: 1px solid #dee2e6; }
.custom-accordion-body { background-color: #f8f9fa; padding: 25px 20px; border-radius: 0 0 12px 12px; }

.donation-modal-content { border-radius: 16px; border: 1px solid rgba(0,0,0,0.1); box-shadow: 0 20px 40px rgba(0,0,0,0.25) !important; overflow: hidden; }
.donation-modal-header { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-bottom: 1px solid #dee2e6; padding: 20px 25px; }
.donation-modal-body { padding: 30px 25px; background-color: #ffffff; }
.modal-backdrop-dark { background: rgba(0,0,0,0.5); }

.btn-group-toggle .btn input[type="radio"] { position: absolute; clip: rect(0,0,0,0); pointer-events: none; }
.btn-group-toggle .btn { border: 2px solid #e2e8f0; color: #4a5568; font-weight: 600; padding: 12px; transition: all 0.2s; background-color: #fff; }
.btn-group-toggle .btn:hover { background-color: #f8f9fa; }
.btn-group-toggle .btn.active { background-color: #28a745; color: white; border-color: #28a745; box-shadow: inset 0 3px 5px rgba(0,0,0,0.125); }
.premium-input { border: 2px solid #e2e8f0; border-radius: 8px; padding: 12px 15px; font-size: 1.2rem; transition: border-color 0.2s; font-weight: bold; }
.premium-input:focus { border-color: #635bff; box-shadow: 0 0 0 0.2rem rgba(99, 91, 255, 0.25); outline: none; }
.premium-addon { background-color: #f8f9fa; border: 2px solid #e2e8f0; border-right: none; border-top-left-radius: 8px; border-bottom-left-radius: 8px; font-size: 1.3rem; color: #4a5568; }
.input-readonly { background-color: #e9ecef !important; color: #6c757d !important; cursor: not-allowed; }

.stripe-btn { background: linear-gradient(135deg, #635bff 0%, #4a40d4 100%); color: white; border: none; border-radius: 8px; padding: 15px; font-size: 1.2rem; box-shadow: 0 4px 6px rgba(99, 91, 255, 0.3); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.stripe-btn:hover { color: white; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(99, 91, 255, 0.4); }
.paypal-btn { background: #ffc439; color: #003087; border: none; border-radius: 8px; padding: 15px; font-size: 1.2rem; box-shadow: 0 4px 6px rgba(255, 196, 57, 0.3); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.paypal-btn:hover { color: #003087; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(255, 196, 57, 0.4); }
.stripe-btn:disabled, .paypal-btn:disabled { opacity: 0.7; transform: none; cursor: not-allowed; box-shadow: none; }

.iframe-container { width: 100%; height: 75vh; border: none; background-color: #f8f9fa; }
.countdown-box { background-color: #fff5f5; border: 1px solid #ffc9c9; padding: 5px 10px; border-radius: 6px; display: inline-block; }
.status-modal-content { border-radius: 20px; border: none; box-shadow: 0 25px 50px rgba(0,0,0,0.3) !important; text-align: center; }
.status-icon-circle { width: 100px; height: 100px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; }

/* --- CSS HTML Tooltip (Touch & Hover Friendly) --- */
.campaign-img-container { 
    position: relative; 
    display: block; 
    outline: none; 
    cursor: help; 
}
.custom-html-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    background-color: rgba(33, 37, 41, 0.95);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    z-index: 100;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    max-height: 200px;
    overflow-y: hidden;
}
/* Trigger Tooltip on Desktop Hover and Mobile Tap (Focus) */
.campaign-img-container:hover .custom-html-tooltip,
.campaign-img-container:focus .custom-html-tooltip,
.campaign-img-container:active .custom-html-tooltip {
    visibility: visible;
    opacity: 1;
}