/* =============================================================================
   Welfare Through Sustainability — Impact Report
   Donor-facing styling. Clean, modern, print-ready.
   Hosted on the Al-Yarmouk website.
   Brand: Al-Yarmouk red (#ee3524) on white with black text.
   Sub-brand accents:
     - Sanctuary card: Sanctuary red (#d73825) with yellow (#ffc908) subtitle nod
     - Free Spay card: orange (#ea580c) — programme indicator
     - Subsidised card: grey — programme indicator
   ========================================================================== */

:root {
    --v9-red:           #ee3524;  /* Al-Yarmouk primary red — host brand */
    --v9-red-deep:      #c62a1c;
    --v9-red-soft:      #fdeceb;
    --v9-sanctuary-red: #d73825;  /* Sanctuary brand red */
    --v9-sanctuary-yellow: #ffc908;  /* Sanctuary brand yellow — subtitle nod */
    --v9-black:         #111111;
    --v9-grey-1:        #2b2b2b;
    --v9-grey-2:        #6b6b6b;
    --v9-grey-3:        #aaaaaa;
    --v9-grey-bg:       #f7f7f7;
    --v9-border:        #e2e2e2;
}

.vet9-charity-wrap {
    max-width: 1280px;
    margin: 0 auto 40px;
    padding-right: 20px;
}

/* ─────── CONTROLS (not exported) ─────── */

.vet9-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--v9-border);
    border-radius: 10px;
    margin: 16px 0 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.vet9-controls h1 {
    font-size: 20px;
    margin: 0;
    padding: 0;
}

.vet9-date-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.vet9-preset-group {
    display: flex;
    gap: 4px;
    border: 1px solid var(--v9-border);
    border-radius: 8px;
    padding: 3px;
    background: #fafafa;
}

.vet9-preset-btn {
    padding: 6px 14px;
    text-decoration: none;
    border-radius: 5px;
    color: var(--v9-grey-1);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.vet9-preset-btn:hover {
    background: #fff;
    color: var(--v9-black);
}

.vet9-preset-btn.active {
    background: var(--v9-red);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.vet9-custom-range {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.vet9-custom-range input[type="date"] {
    padding: 5px 8px;
    border: 1px solid var(--v9-border);
    border-radius: 5px;
}

.vet9-export-group {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.vet9-export-group button {
    font-size: 13px !important;
}

/* ─────── REPORT SURFACE ─────── */

.vet9-report-surface {
    background: #fff;
    border: 1px solid var(--v9-border);
    border-radius: 12px;
    padding: 48px 56px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    color: var(--v9-grey-1);
}

/* ─────── HEADER ─────── */

.vet9-report-header {
    margin-bottom: 32px;
}

.vet9-brand-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--v9-red) 0%, var(--v9-red) 60%, var(--v9-black) 60%);
    margin-bottom: 28px;
    border-radius: 3px;
}

.vet9-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.vet9-report-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--v9-grey-2);
    margin-bottom: 8px;
}

.vet9-report-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--v9-black);
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.vet9-report-period {
    font-size: 16px;
    color: var(--v9-grey-2);
    font-weight: 500;
}

.vet9-report-meta {
    text-align: right;
    font-size: 12px;
    color: var(--v9-grey-2);
    line-height: 1.5;
    min-width: 180px;
}

.vet9-report-meta strong {
    color: var(--v9-black);
    font-size: 13px;
    font-weight: 600;
}

/* ─────── PITCH CARD (the donor-invitation block) ───────
   Dark charcoal background gives the visual weight that anchors the page.
   Typography choices avoid red-on-dark legibility issues:
     - Body copy in soft warm-white for full readability
     - Bold "A model worth scaling" + "(VET9)" in pure white for emphasis
     - Numbers (95%, 5%) get yellow — warm, energetic, high-contrast
     - Red appears only as accent stripe + icon background (visual brand tag,
       never asked to do duty as readable text color)
*/

.vet9-pitch-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    margin: 0 0 28px;
    background: linear-gradient(135deg, #1d1d1d 0%, #2a2a2a 100%);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* Red accent stripe down the left edge — brand tag without competing with text */
.vet9-pitch-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 5px;
    height: 100%;
    background: var(--v9-red);
}

.vet9-pitch-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--v9-red);
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(238, 53, 36, 0.3);
}

.vet9-pitch-body {
    margin: 0;
    flex: 1;
    font-size: 15px;
    line-height: 1.6;
    color: #e8e8e8;          /* soft warm-white — easier on eyes than pure white */
}

.vet9-pitch-body strong {
    color: #ffffff;
    font-weight: 700;
}

/* Yellow used for the key numbers — warm energy, perfect contrast on dark */
.vet9-pitch-body em {
    color: var(--v9-sanctuary-yellow);
    font-style: normal;
    font-weight: 700;
}

/* ─────── NARRATIVE ─────── */

.vet9-narrative {
    padding: 20px 24px;
    background: var(--v9-red-soft);
    border-left: 4px solid var(--v9-red);
    border-radius: 0 8px 8px 0;
    margin-bottom: 36px;
}

.vet9-narrative p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--v9-grey-1);
}

.vet9-narrative strong {
    color: var(--v9-black);
    font-weight: 700;
}

/* ─────── KPI GRID ─────── */

.vet9-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.vet9-kpi {
    padding: 24px 20px;
    background: #fff;
    border: 1px solid var(--v9-border);
    border-radius: 10px;
    text-align: center;
}

.vet9-kpi-featured {
    background: linear-gradient(135deg, var(--v9-red) 0%, var(--v9-red-deep) 100%);
    border-color: var(--v9-red-deep);
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(200, 68, 62, 0.18);
}

.vet9-kpi-featured::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: var(--v9-red);
}

.vet9-kpi-value {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--v9-black);
    line-height: 1;
    margin-bottom: 8px;
}

.vet9-kpi-featured .vet9-kpi-value {
    color: #ffffff;
}

.vet9-kpi-unit {
    font-size: 15px;
    font-weight: 500;
    margin-left: 4px;
    opacity: 0.8;
}

.vet9-kpi-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--v9-grey-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.vet9-kpi-featured .vet9-kpi-label {
    color: #fff;
}

.vet9-kpi-sub {
    font-size: 11px;
    color: var(--v9-grey-2);
}

.vet9-kpi-featured .vet9-kpi-sub {
    color: rgba(255, 255, 255, 0.8);
}

/* ─────── CONTEXT NOTE (closing aspirational statement, above footer) ─────── */

.vet9-context-note {
    padding: 24px 26px;
    margin: 8px 0 32px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid var(--v9-red);
}

.vet9-context-heading {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--v9-red);
}

.vet9-context-note p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--v9-grey-1);
}

.vet9-context-note strong {
    color: var(--v9-black);
    font-weight: 700;
}

/* ─────── SECTIONS ─────── */

.vet9-section {
    margin-bottom: 40px;
}

.vet9-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--v9-black);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--v9-red);
    display: inline-block;
}

.vet9-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.vet9-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* ─────── BUCKET CARDS ─────── */

.vet9-bucket-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vet9-bucket-card {
    padding: 16px 18px;
    border-radius: 8px;
    border-left: 4px solid var(--v9-grey-3);
    background: var(--v9-grey-bg);
}

.vet9-bucket-card.vet9-bucket-sanctuary      { border-left-color: var(--v9-sanctuary-red); background: #fffbe6; }
.vet9-bucket-card.vet9-bucket-rescue_account { border-left-color: var(--v9-black);                                }
.vet9-bucket-card.vet9-bucket-free_spay      { border-left-color: #ea580c;                                       }
.vet9-bucket-card.vet9-bucket-subsidised     { border-left-color: #888888;                                       }

.vet9-bucket-desc {
    font-size: 11px;
    font-style: italic;
    color: var(--v9-grey-2);
    margin-top: -2px;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

/* Sanctuary brand-pairing nod: yellow text on the description line. */
.vet9-bucket-card.vet9-bucket-sanctuary .vet9-bucket-desc {
    color: #b89200;            /* deeper yellow for legibility on cream background */
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-size: 10.5px;
}

.vet9-bucket-name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--v9-grey-2);
    margin-bottom: 4px;
}

.vet9-bucket-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--v9-black);
    margin-bottom: 4px;
}

.vet9-bucket-meta {
    font-size: 12px;
    color: var(--v9-grey-2);
}

/* ─────── CHARTS ─────── */

.vet9-chart-wrap {
    background: #fff;
    border: 1px solid var(--v9-border);
    border-radius: 10px;
    padding: 20px;
    min-height: 260px;
    position: relative;
}

.vet9-chart-tall {
    min-height: 320px;
}

.vet9-chart-wrap canvas {
    max-height: 280px;
}

.vet9-chart-tall canvas {
    max-height: 340px;
}

/* ─────── TABLES ─────── */

.vet9-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--v9-border);
}

.vet9-data-table thead {
    background: var(--v9-red);
    color: #ffffff;
}

.vet9-data-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vet9-data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--v9-border);
    color: var(--v9-grey-1);
}

.vet9-data-table tbody tr:last-child td {
    border-bottom: none;
}

.vet9-data-table tbody tr:hover {
    background: var(--v9-grey-bg);
}

/* Reconciliation row — italic grey, set apart from data */
.vet9-data-table-reconcile td {
    background: #fafafa;
    border-top: 1px solid var(--v9-border);
    padding: 8px 14px;
    font-size: 12px;
}

/* Total row — bold, framed, brand-aligned */
.vet9-data-table-total td {
    background: var(--v9-grey-bg);
    border-top: 2px solid var(--v9-red);
    padding: 12px 14px;
    font-size: 14px;
    color: var(--v9-black);
}

/* ─────── FOOTER ─────── */

.vet9-report-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 2px solid var(--v9-black);
    font-size: 11px;
    color: var(--v9-grey-2);
    line-height: 1.5;
}

.vet9-report-footer p {
    margin: 0 0 8px 0;
}

.vet9-footer-brand {
    margin-top: 16px !important;
    font-weight: 600;
    color: var(--v9-grey-1);
    letter-spacing: 0.3px;
}

/* ─────── PRINT ─────── */

@media print {
    body {
        background: #fff !important;
    }
    .no-export,
    #adminmenumain,
    #wpadminbar,
    #wpfooter,
    .update-nag,
    .notice {
        display: none !important;
    }
    #wpcontent {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    .vet9-charity-wrap {
        max-width: 100%;
        padding: 0;
    }
    .vet9-report-surface {
        border: none;
        box-shadow: none;
        padding: 20px;
    }
    .vet9-kpi-grid {
        page-break-inside: avoid;
    }
    .vet9-section {
        page-break-inside: avoid;
    }
}

/* ─────── RESPONSIVE ─────── */

@media (max-width: 900px) {
    .vet9-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .vet9-split,
    .vet9-two-col { grid-template-columns: 1fr; }
    .vet9-report-surface { padding: 24px; }
    .vet9-report-title { font-size: 26px; }
}

/* ─────── FRONT-END (SHORTCODE) OVERRIDES ─────── */

.vet9-charity-wrap.is-public {
    padding-right: 0;
    margin: 20px auto;
}

/* Public date controls — sits above the report surface on the host page */
.vet9-public-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid var(--v9-border);
    border-left: 4px solid var(--v9-red);
    border-radius: 8px;
    margin-bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vet9-public-controls-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--v9-grey-2);
    flex-shrink: 0;
}

.vet9-preset-group--public {
    background: #fafafa;
}

.vet9-public-controls .vet9-custom-range {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--v9-grey-1);
    margin-left: auto;
}

.vet9-public-controls .vet9-custom-range input[type="date"] {
    padding: 5px 8px;
    border: 1px solid var(--v9-border);
    border-radius: 5px;
    font-size: 13px;
}

.vet9-apply-btn {
    padding: 6px 14px;
    background: var(--v9-red);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.vet9-apply-btn:hover {
    background: var(--v9-red-deep);
}

/* Soften padding on small screens when inside theme containers */
@media (max-width: 900px) {
    .vet9-charity-wrap.is-public .vet9-report-surface {
        padding: 20px;
    }
    .vet9-public-controls {
        padding: 10px 14px;
    }
    .vet9-public-controls .vet9-custom-range {
        margin-left: 0;
        flex-wrap: wrap;
    }
}

/* Public-footer methodology — single block, no brand line */
.vet9-report-footer--public {
    border-top-color: var(--v9-red);
    color: var(--v9-grey-1);
    font-size: 12px;
}

.vet9-report-footer--public p {
    margin: 0;
}
