/* ============================================================
   pro.css — Aid Match Foundation
   Loaded AFTER styles.css and after each page's inline <style>,
   so it can quietly correct the older colour overrides without
   any page being rewritten.

   The palette keeps the foundation's warm cream and terracotta
   and retires the neon green: donation money should look like
   a bank, not a highlighter.
   ============================================================ */

:root {
    --ink: #14261f;
    /* deep evergreen — footers, headings on light */
    --ink-soft: #24403a;
    --give: #0f7a52;
    /* the giving green — every donate action */
    --give-dark: #0b5c3e;
    --give-tint: #e8f4ee;
    --gold: #c99a4e;
    --line: #e7e0d6;
    --paper: #ffffff;
    --sand: #faf8f5;
    --muted: #6f7a76;
    --danger: #b23b3b;
    --danger-tint: #fbeceb;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --lift: 0 1px 2px rgba(20, 38, 31, .04), 0 8px 28px rgba(20, 38, 31, .07);
    --lift-sm: 0 1px 2px rgba(20, 38, 31, .05), 0 3px 10px rgba(20, 38, 31, .05);
}

/* ── Retire the neon green ─────────────────────────────────── */
.btn-donate-now,
.btn-donate,
.nav-link.btn-donate {
    background: var(--give) !important;
    color: #fff !important;
    box-shadow: var(--lift-sm);
    letter-spacing: .01em;
}

.btn-donate-now:hover,
.btn-donate:hover,
.nav-link.btn-donate:hover {
    background: var(--give-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.goal-raised {
    color: var(--give) !important;
}

.progress-fill {
    background: linear-gradient(90deg, var(--give) 0%, #23a06f 100%) !important;
}

.amount-btn:hover,
.amount-btn.active {
    border-color: var(--give) !important;
    background: var(--give-tint) !important;
    color: var(--ink) !important;
}

.custom-amount:focus,
.pro-input:focus {
    border-color: var(--give) !important;
}

/* ── Footer: ink, not highlighter ──────────────────────────── */
.footer {
    background: var(--ink) !important;
    color: rgba(255, 255, 255, .72) !important;
}

.footer-logo,
.footer-title {
    color: #fff !important;
}

.footer-desc,
.footer-newsletter-text {
    color: rgba(255, 255, 255, .68) !important;
}

.footer-links a,
.footer-bottom,
.footer-bottom a {
    color: rgba(255, 255, 255, .62) !important;
}

.footer-links a:hover,
.footer-bottom a:hover {
    color: var(--gold) !important;
}

.footer-social a {
    background: rgba(255, 255, 255, .10) !important;
    color: rgba(255, 255, 255, .85) !important;
}

.footer-social a:hover {
    background: var(--give) !important;
    color: #fff !important;
}

.footer-bottom {
    border-top-color: rgba(255, 255, 255, .14) !important;
}

.newsletter-form {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(255, 255, 255, .18) !important;
}

.newsletter-form input {
    color: #fff !important;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, .45) !important;
}

.newsletter-form button {
    background: var(--give) !important;
    color: #fff !important;
}

/* ── Quality floor ─────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--give);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   Project & goal detail
   ============================================================ */

.pd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 26px;
}

.pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 8px 16px;
    font-size: .86rem;
    color: var(--ink-soft);
    box-shadow: var(--lift-sm);
}

.pd-chip i {
    color: var(--give);
    font-size: .95rem;
}

.pd-body {
    font-size: 1.02rem;
    line-height: 1.85;
    color: #46524e;
}

.pd-body h1,
.pd-body h2,
.pd-body h3 {
    font-size: 1.35rem;
    margin: 1.6rem 0 .7rem;
}

.pd-body p {
    margin-bottom: 1.05rem;
}

.pd-body img {
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.pd-body strong {
    color: var(--ink);
}

.project-detail-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--lift);
}

/* ── The donation card ─────────────────────────────────────── */
.donate-card {
    position: sticky;
    top: 104px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px 24px 22px;
    box-shadow: var(--lift);
}

.donate-eyebrow {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.donate-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: var(--ink);
    margin: 6px 0 18px;
}

.donate-figures {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.fig-raised {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--give);
    line-height: 1.1;
}

.fig-goal {
    font-size: .86rem;
    color: var(--muted);
}

.pro-progress {
    height: 9px;
    background: #eee9e1;
    border-radius: 100px;
    overflow: hidden;
    margin: 12px 0 10px;
}

.pro-progress span {
    display: block;
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--give) 0%, #23a06f 100%);
}

.donate-stats {
    display: flex;
    gap: 16px;
    font-size: .84rem;
    color: var(--muted);
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.donate-stats b {
    color: var(--ink);
    font-weight: 600;
}

.pro-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.pro-field {
    margin-bottom: 14px;
}

.pro-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}

.pro-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 122, 82, .12);
}

.pro-input::placeholder {
    color: #a9b2af;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.amount-chip {
    padding: 11px 4px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
    cursor: pointer;
    transition: all .18s;
}

.amount-chip:hover {
    border-color: var(--give);
}

.amount-chip.active {
    border-color: var(--give);
    background: var(--give-tint);
    color: var(--give-dark);
}

.amount-input {
    position: relative;
}

.amount-input span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-weight: 600;
    font-size: .95rem;
}

.amount-input input {
    padding-left: 46px;
    font-weight: 600;
}

/* ── Gateway picker ────────────────────────────────────────── */
.gw-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.gw-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .18s;
}

.gw-opt:hover {
    border-color: var(--give);
}

.gw-opt input {
    accent-color: var(--give);
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.gw-opt i {
    font-size: 1.15rem;
    color: var(--ink-soft);
    width: 22px;
    text-align: center;
}

.gw-opt b {
    display: block;
    font-size: .92rem;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.3;
}

.gw-opt small {
    color: var(--muted);
    font-size: .76rem;
}

.gw-opt:has(input:checked) {
    border-color: var(--give);
    background: var(--give-tint);
}

.gw-opt:has(input:checked) i {
    color: var(--give);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-pro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: 1.5px solid transparent;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.btn-pro-primary {
    background: var(--give);
    color: #fff;
    box-shadow: var(--lift-sm);
}

.btn-pro-primary:hover {
    background: var(--give-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-pro-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-pro-ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.btn-give {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}

.btn-give[disabled] {
    opacity: .6;
    cursor: wait;
}

/* ── Trust line ────────────────────────────────────────────── */
.donate-trust {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .76rem;
    line-height: 1.6;
    color: var(--muted);
    margin-top: 12px;
}

.donate-trust i {
    color: var(--give);
    margin-top: 2px;
}

.gw-marks {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: #93a09b;
    font-size: 1.25rem;
}

.gw-marks small {
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-right: auto;
    color: var(--muted);
}

/* ── Alerts ────────────────────────────────────────────────── */
.pro-alert {
    display: flex;
    gap: 9px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: .87rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.pro-alert-error {
    background: var(--danger-tint);
    color: var(--danger);
    border: 1px solid #f0cfcd;
}

.pro-alert-ok {
    background: var(--give-tint);
    color: var(--give-dark);
    border: 1px solid #cbe6da;
}

/* ============================================================
   Receipt page
   ============================================================ */

.receipt-page {
    background: var(--sand);
}

.receipt-wrap {
    padding: 150px 0 90px;
}

.receipt-card {
    max-width: 620px;
    margin: 0 auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 42px 40px 34px;
    box-shadow: var(--lift);
    text-align: center;
}

.receipt-mark {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    font-size: 1.7rem;
    background: var(--give-tint);
    color: var(--give);
}

.receipt-cancelled .receipt-mark {
    background: #f3f1ec;
    color: var(--muted);
}

.receipt-error .receipt-mark {
    background: var(--danger-tint);
    color: var(--danger);
}

.receipt-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    color: var(--ink);
    margin-bottom: 12px;
}

.receipt-lead {
    color: #4f5b57;
    line-height: 1.75;
    margin-bottom: 26px;
}

.receipt-rows {
    text-align: left;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 26px;
}

.receipt-rows>div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 16px;
    font-size: .89rem;
    border-bottom: 1px solid var(--line);
}

.receipt-rows>div:last-child {
    border-bottom: 0;
}

.receipt-rows dt {
    color: var(--muted);
    font-weight: 500;
}

.receipt-rows dd {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
    text-align: right;
}

.receipt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.receipt-foot {
    margin-top: 24px;
    font-size: .8rem;
    color: var(--muted);
}

.receipt-foot a {
    color: var(--give);
    text-decoration: underline;
}

.rs {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .74rem;
    font-weight: 600;
    text-transform: capitalize;
}

.rs-paid {
    background: var(--give-tint);
    color: var(--give-dark);
}

.rs-initiated {
    background: #fbf3e3;
    color: #8a6a29;
}

.rs-failed {
    background: var(--danger-tint);
    color: var(--danger);
}

@media print {

    .navbar,
    .receipt-actions,
    .receipt-foot {
        display: none !important;
    }

    .receipt-wrap {
        padding: 0;
    }

    .receipt-card {
        box-shadow: none;
        border: 0;
    }
}

/* ── Small screens ─────────────────────────────────────────── */
@media (max-width: 991px) {
    .donate-card {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 575px) {
    .receipt-card {
        padding: 32px 22px 26px;
    }

    .receipt-title {
        font-size: 1.5rem;
    }

    .amount-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
