/*
 * Fund transparency UI.
 *
 * Progress rings, the collected/spent/balance figures on fund cards, and the
 * public income–expense report. Kept out of main.css so the vendor theme can
 * be updated without losing these.
 */

/* ---------------------------------------------------------------- ring --- */

.fund-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.fund-ring__svg {
    display: block;
}

.fund-ring__track {
    stroke: rgba(255, 255, 255, 0.9);
}

.fund-ring__value {
    stroke: #FBC50B;
    transition: stroke-dashoffset 900ms ease;
}

.fund-ring--reached .fund-ring__value {
    stroke: #0f6b4f;
}

/* No target set: neutral, muted ring instead of a misleading 0%. */
.fund-ring--no-target .fund-ring__track {
    stroke: rgba(255, 255, 255, 0.45);
}

.fund-ring__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.fund-ring__percent {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.fund-ring__percent span {
    font-size: 15px;
    margin-left: 1px;
}

.fund-ring__note {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
    .fund-ring__value {
        transition: none;
    }
}

/* -------------------------------------------------------- fund figures --- */

.fund-figures {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 10px 0 0;
    font-size: 14px;
    color: #5b6b64;
}

.fund-figures__item strong {
    color: #12211c;
    font-weight: 700;
}

/* The mosque fund's one balance, shown split by where the money came from. */
.fund-split {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
}

.fund-split__item {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #e8f3ee;
    color: #0f6b4f;
    font-size: 12.5px;
    font-weight: 600;
    padding: 3px 12px;
}

.fund-heads {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 0;
}

.fund-heads__chip {
    border: 1px solid #dde5e1;
    border-radius: 999px;
    color: #5b6b64;
    font-size: 12px;
    padding: 3px 11px;
}

.donation-collection__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.donation-collection__report-link {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.donation-collection__report-link:hover {
    color: #FBC50B;
}

/* ------------------------------------------------------ report summary --- */

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.report-summary__card {
    border: 1px solid #dde5e1;
    border-radius: 14px;
    background: #fff;
    padding: 18px 20px;
}

.report-summary__label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5b6b64;
}

.report-summary__value {
    margin: 6px 0 0;
    font-size: 26px;
    font-weight: 700;
    color: #12211c;
}

.report-summary__card--income .report-summary__value { color: #0f6b4f; }
.report-summary__card--expense .report-summary__value { color: #b3261e; }

.report-summary__note {
    margin: 16px 0 0;
    font-size: 13px;
    color: #5b6b64;
    background: #fdf6e3;
    border: 1px solid #eedfb5;
    border-radius: 10px;
    padding: 10px 14px;
}

/* --------------------------------------------------------- report tabs --- */

.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.report-tabs__link {
    border: 1px solid #dde5e1;
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #5b6b64;
}

.report-tabs__link.is-active {
    background: #0f6b4f;
    border-color: #0f6b4f;
    color: #fff;
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
}

.report-filters label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #5b6b64;
    margin-bottom: 4px;
}

.report-filters select,
.report-filters input {
    border: 1px solid #dde5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 150px;
}

.report-filters__actions {
    display: flex;
    gap: 8px;
}

.report-filters__btn {
    border: 1px solid #0f6b4f;
    border-radius: 8px;
    background: #0f6b4f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    cursor: pointer;
}

.report-filters__btn--ghost {
    background: #fff;
    color: #0f6b4f;
}

.fund-breakdown__split {
    display: block;
    font-size: 12px;
    color: #5b6b64;
}

.report-progress {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.report-progress__bar {
    width: 78px;
    height: 6px;
    border-radius: 999px;
    background: #e8ece9;
    overflow: hidden;
}

.report-progress__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #FBC50B;
}

.report-progress__fill--reached {
    background: #0f6b4f;
}

@media print {
    .report-tabs,
    .report-filters,
    .table-pagination,
    .cta {
        display: none !important;
    }
}

.donate__card__stats {
    margin: 14px 0 18px;
    padding-top: 12px;
    border-top: 1px solid #eef2f0;
}

.donate__card__stats .report-progress {
    margin-top: 8px;
    font-size: 13px;
    color: #5b6b64;
}
