/* =========================================================
   Fundraiser — Frontend Styles
   Colors: primary #2C8C2C | secondary #9AA54A | text #3C3C23 | accent #5CBC74
   ========================================================= */

.fundraiser-widget {
    background: #ffffff;
    border: 1px solid #d0ddb0;
    border-radius: 14px;
    padding: 28px 28px 24px;
    width: 100%;
    color: #3C3C23;
    font-family: inherit;
    box-shadow: 0 6px 24px rgba(44, 140, 44, 0.10);
    box-sizing: border-box;
}

/* ── Header ───────────────────────────────────────────────── */

.fundraiser-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.fundraiser-mosque-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.fundraiser-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2C8C2C;
    line-height: 1.3;
}

/* ── Progress bar ─────────────────────────────────────────── */

.fundraiser-progress-section {
    margin-bottom: 22px;
}

.fundraiser-progress-track {
    background: #e2eccc;
    border-radius: 999px;
    height: 30px;
    width: 100%;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.fundraiser-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2C8C2C 0%, #5CBC74 100%);
    width: 0%;
    animation: fundraiser-grow 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
}

/* Gold overlay fades in on track hover */
.fundraiser-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #9AA54A 0%, #c8b84a 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.fundraiser-progress-track:hover .fundraiser-progress-fill::after {
    opacity: 1;
}

@keyframes fundraiser-grow {
    from { width: 0%; }
    to   { width: var(--target-width, 0%); }
}

/* % label centred inside the track */
.fundraiser-progress-pct {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    z-index: 1;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

/* ── Stats — 3 column grid ────────────────────────────────── */

.fundraiser-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.fi-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px;
    border: 1px solid #e8efd4;
    border-radius: 10px;
    background: #f5f9eb;
    transition: background 0.6s ease, transform 0.2s ease, box-shadow 0.6s ease;
}

.fi-row:hover {
    background: #eaf3d6;
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(44, 140, 44, 0.12);
}

.fi-icon {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.fi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7a40;
    font-weight: 600;
    margin-bottom: 5px;
}

.fi-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: #3C3C23;
    transition: color 0.2s ease;
}

.fi-row--raised .fi-value { color: #2C8C2C; }
.fi-row--needed .fi-value { color: #7a5e00; }

.fi-row--raised:hover .fi-value { color: #236e23; }
.fi-row--needed:hover .fi-value { color: #5a4500; }

/* ── Donate button ────────────────────────────────────────── */

.fundraiser-donate-wrap {
    text-align: center;
    margin-bottom: 20px;
}

.fundraiser-donate-btn {
    display: inline-block;
    background: linear-gradient(90deg, #2C8C2C 0%, #5CBC74 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 13px 40px;
    border-radius: 999px;
    text-decoration: none !important;
    letter-spacing: 0.03em;
    transition: background 0.6s ease, color 0.6s ease, transform 0.15s ease, box-shadow 0.6s ease;
    box-shadow: 0 3px 12px rgba(44, 140, 44, 0.30);
}

.fundraiser-donate-btn:hover {
    background: #9AA54A;
    color: #3C3C23 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(154, 165, 74, 0.40);
}

.fundraiser-donate-btn:active {
    transform: translateY(0);
}

/* ── Funds held ───────────────────────────────────────────── */

.fundraiser-held {
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #e8efd4;
    font-size: 0.95rem;
    color: #8a9a60;
    text-align: center;
}

/* ── Icon colours (Font Awesome replacements) ────────────── */
.fundraiser-mosque-icon i  { color: #2C8C2C; }
.fi-row--costs  .fi-icon i { color: #2C8C2C; }
.fi-row--raised .fi-icon i { color: #2C8C2C; }
.fi-row--needed .fi-icon i { color: #9AA54A; }
.fundraiser-held i         { color: #8a9a60; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 480px) {
    .fundraiser-widget {
        padding: 20px 14px 18px;
    }

    .fundraiser-list {
        gap: 8px;
    }

    .fi-row {
        padding: 12px 6px;
    }

    .fi-value {
        font-size: 0.95rem;
    }

    .fundraiser-donate-btn {
        padding: 12px 28px;
    }
}
