* {
    box-sizing: border-box;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
    color: #1f2d3d;
}

body {
    background: #f2f4f7;
    margin: 0;
    padding: 0;
}

.site-header {
    background: #163a63; /* dark blue */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible; /* Allow content to extend beyond header bounds */
}

.site-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 20px; /* Reduced from 12px to 8px for tighter height */
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: visible; /* Allow logo to extend beyond */
}

/* Brand / logo */
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-left: 4rem;
    z-index: 10; /* Ensure logo appears above other content */
}

.brand__logo {
    height: auto;
    max-height: 50px;
    transform: scale(1.1);
    transform-origin: top center;
    margin-bottom: -8px; /* Negative margin to let the legs/circle extend down */

    /* Removed transform scale to keep logo at original size */
}

/* Desktop nav */
.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 35px; /* Increased from 28px for better spacing between nav items */
}

.nav__link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 19px; /* Slightly reduced from 18px */
    letter-spacing: 0.2px;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

.nav__link:hover {
    opacity: 0.7;
}

/* ------------------------------------------
   Mobile nav (CSS-only toggle)
------------------------------------------ */
.nav-toggle {
    display: none;
}

.nav-toggle-btn {
    display: none; /* shown on mobile */
    margin-left: auto;
    width: 42px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
}

.nav-toggle-btn span {
    display: block;
    height: 2px;
    width: 22px;
    background: #fff;
    border-radius: 2px;
    opacity: 0.95;
}

.nav--mobile {
    display: none;
}

.site-footer {
    background: #163a63; /* same dark blue as header */
    color: #ffffff;
    margin-top: 60px;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 20px 44px;
    text-align: center;
}

/* Main info line */
.footer-line {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-line strong {
    color: #ffffff;
}

/* EIN */
.footer-ein {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 22px;
    color: #ffffff;
}

/* Logo */
.footer-logo img {
    height: 80px;
    width: auto;
    display: inline-block;
}

.page-title {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    color: #1f2d3d;
    margin: 10px 0 28px;
    letter-spacing: 0.2px;
}

.page-subtitle {
    text-align: center;
    font-size: 26px;
    font-weight: 400;
    color: #4a5568;
    margin: -20px 0 28px;
}

.page-wrapper {
    background: #f3f5f8;
    padding: 40px 20px;
    min-height: 100vh;
}

.outer-card {
    background: white;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    max-width: 1200px;
    margin: auto;
}

.form-container {
    border: 1px solid #d6dde5;
    border-radius: 10px;
}

.form-container {
    background: white;
    max-width: 1100px;
    margin: auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

.form-header {
    background: #2c5f8a;
    color: white;
    padding: 18px 24px;
    font-size: 20px;
    font-weight: bold;
}

.form-body {
    padding: 24px;
}

.section-title {
    /* margin: 24px 0 12px; */
    font-weight: bold;
    padding-bottom: 6px;
}

.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

label {
    font-size: 13px;
    margin-bottom: 6px;
    color: #333;
}

input,
select {
    padding: 10px 12px;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    font-size: 14px;
}

/* ✅ removed conflicting blue focus border (keep only outline reset) */
input:focus,
select:focus {
    outline: none;
}

.donor-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e1e5ea;
    border-radius: 4px;
    background: #fafbfc;
}

.grid-4 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.note {
    margin-top: 20px;
    font-size: 18px;
    color: #666;
    text-align: center;
}

.border {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.error,
small.error {
    color: #ff5c5c !important;
    font-size: 13px;
    margin-top: 6px;
    display: block;
    min-height: 16px;
    line-height: 16px;
}

/* Default invalid (red) */
.is-invalid {
    border-color: #ff5c5c !important;
    box-shadow: none;
}

/* When focused, ALWAYS show green (even if invalid) */
.is-invalid:focus,
.is-invalid:focus-visible {
    border-color: #7ac943 !important;
    box-shadow: 0 0 0 2px rgba(122, 201, 67, 0.25) !important;
}

input.invalid,
select.invalid {
    border-color: #d93025;
}

.tax-section {
    margin-top: 40px;
}

.question {
    font-weight: 600;
    font-size: 15px;
    color: #1f2d3d;
    margin-bottom: 4px;
}

.hint {
    font-size: 13px;
    color: #5f6c7b;
    margin-bottom: 12px;
    max-width: 720px;
    line-height: 1.4;
}

.hidden {
    display: none;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.radio-option input {
    accent-color: #2c5f8a;
    width: 16px;
    height: 16px;
}

.donation-section {
    margin-top: 40px;
}

.donation-instructions {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.45;
    color: #1f2d3d;
}

.calc-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    border: 1px solid #cfd7df;
    margin: 0 4px;
    font-size: 16px;
}

.donation-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    align-items: center;
}

.input-with-btn {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-btn input {
    width: 100%;
    padding-right: 46px; /* room for icon */
}

.icon-btn {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    display: grid;
    place-items: center;
    border-radius: 6px;
    cursor: pointer;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    fill: #2f3b4a;
    opacity: 0.9;
}

.icon-btn:hover {
    background: #f2f5f8;
}

/* Step 3 summary layout like screenshot #2 */
.donation-summary {
    text-align: right; /* ✅ right aligned (not centered) */
}

.summary-top {
    font-weight: 700;
    /* font-size: 18px;
    margin-bottom: 6px; */
}

.summary-base,
.summary-qco {
    font-size: 13px;
    margin-bottom: 4px;
    margin-top: 4px;
}

.summary-text {
    font-size: 10px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 6px;
}

.summary-amount {
    /* font-size: 20px; */
    font-weight: 900;
    display: inline-block;
    border-bottom: 2px solid #e1e5ea;
    /* padding-bottom: 6px; */
}

/* reuse your existing .hidden */

.divider {
    height: 1px;
    background: #e1e5ea;
    margin: 18px 0;
}

.info-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2d3d;
    padding: 6px 0 2px;
}

.info-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: #000;
}

.payment-section {
    margin-top: 40px;
}

/* Prevent error messages from shifting payment fields */
.pay-grid .field {
    position: relative;
    padding-bottom: 20px; /* reserve space for error */
}

.pay-grid .field .error {
    position: absolute;
    bottom: 0;
    left: 0;
}

.pay-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
    align-items: end;
    margin-bottom: 14px;
}

.span-2 {
    grid-column: span 1; /* card field is naturally wider via 2fr */
}

.input-icon-right {
    position: relative;
}

.input-icon-right input {
    width: 100%;
    padding-right: 92px; /* room for icons */
}

.right-icons {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    gap: 6px;
    align-items: center;
    pointer-events: none;
}

.input-icon-right .stripe-input {
    width: 100%;
    padding-right: 160px; /* room for 4 card icons */
}

/* simple brand badges */
.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    border-radius: 4px;
}

.brand-badge.visa {
    background: #0b4ea2;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 0 8px;
    letter-spacing: 0.5px;
}

.brand-badge.mc {
    width: 34px;
    background: #111;
    position: relative;
    border-radius: 4px;
}
.brand-badge.mc::before,
.brand-badge.mc::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0.95;
}
.brand-badge.mc::before {
    left: 7px;
    background: #eb001b;
}
.brand-badge.mc::after {
    left: 14px;
    background: #f79e1b;
    mix-blend-mode: screen;
}

.brand-badge.amex {
    background: #006fcf;
    color: #fff;
    font-weight: 700;
    font-size: 9px;
    padding: 0 6px;
    letter-spacing: 0.3px;
}

.brand-badge.discover {
    background: #ff6000;
    color: #fff;
    font-weight: 700;
    font-size: 8px;
    padding: 0 4px;
    letter-spacing: 0.2px;
}

/* CVC mini icon */
.cvc-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 26px;
    border: 2px solid #9aa7b5;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: #2f3b4a;
    background: #fff;
    pointer-events: none;
}

.cvc-bar {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 4px;
    background: #9aa7b5;
    border-radius: 3px;
}

.cvc-num {
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* checkbox line */
.checkline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 15px;
    color: #1f2d3d;
    cursor: pointer;
}

.checkline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7ac943; /* green like screenshot */
}

.submit-btn {
    background: #7ac943; /* green */
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 0 #5fa62f, 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
    display: inline-block;
}

.submit-btn-wrapper {
    text-align: left;
    margin: 20px;
}

/* Hover */
.submit-btn:hover {
    background: #6fb93d;
}

/* Active / pressed */
.submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #5fa62f, 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Disabled */
.submit-btn:disabled {
    background: #b7d9a1;
    cursor: not-allowed;
    box-shadow: none;
}

/* Base focus reset */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Green focus ring */
input:focus,
select:focus,
textarea:focus {
    border-color: #7ac943;
    box-shadow: 0 0 0 2px rgba(122, 201, 67, 0.25);
}

/* Better accessibility */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: #7ac943;
    box-shadow: 0 0 0 3px rgba(122, 201, 67, 0.35);
}

.secondary-donor-btn {
    margin-top: 14px;
    padding: 12px 18px;
    border: 2px solid #7ac943;
    background: #f3ffe9;
    color: #57a71d;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    width: fit-content;
}

.secondary-donor-btn:hover {
    background: #e9f8c8;
}

.donor-row--extra {
    margin-top: 20px;
}

/* Make room for the actions column */
.donor-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 30px; /* last column = actions */
    gap: 16px;
    align-items: end;
    padding: 16px;
    border: 1px solid #e1e5ea;
    border-radius: 4px;
    background: #fafbfc;
    margin-top: 15px;
}

/* Right-side panel */
.donor-actions {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    height: 70px;
    width: 36px;
    background: #f7f9fc;
    border-radius: 0 6px 6px 0; /* rounded on the right only */
}

/* Icon buttons */
.donor-action {
    width: 100%;
    height: 38px;
    border: 0;
    background: transparent;
    color: #8fa1b2;
    cursor: pointer;

    display: grid;
    place-items: center;

    font-size: 18px;
    line-height: 1;
    transition: background 150ms ease, color 150ms ease;
}

/* Hover like the screenshot */
.donor-action:hover {
    color: #57a71d;
}

/* Trash slightly stronger on hover */
.donor-action.delete:hover {
    color: #57a71d;
}

/* Disabled state for first/last arrows (we’ll control via JS) */
.donor-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: transparent;
}

/* Reserve space for error messages in donor row to prevent layout shift */
.donor-row .field {
    margin-bottom: 0;
    position: relative;
    padding-bottom: 22px;
}

.donor-row .field .error,
.donor-row .field small.error {
    position: absolute;
    bottom: 2px;
    left: 0;
    margin-top: 0;
    display: block !important;
}

/* Stripe Elements should look like your input fields */
.stripe-input {
    padding: 10px 12px;
    border: 1px solid #cfd7df;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    min-height: 42px;
    cursor: text;
}

/* Ensure Stripe iframe displays properly */
.stripe-input .StripeElement {
    width: 100%;
    line-height: 1.4;
}

/* Green focus like your inputs */
.stripe-input.is-focus {
    border-color: #7ac943;
    box-shadow: 0 0 0 2px rgba(122, 201, 67, 0.25);
}

/* Red invalid like your inputs */
.stripe-input.is-invalid {
    border-color: #ff5c5c !important;
    box-shadow: none !important;
}

.calc-inline {
    display: inline-block;
    vertical-align: middle;
    padding: 0;
    margin: 0 6px;
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0; /* prevents extra baseline space */
}

.calc-inline .calc-icon {
    width: 22px;
    height: 22px;
    fill: #000; /* black like screenshot */
    display: block;
}

/* Optional: tiny hover feedback */
.calc-inline:hover .calc-icon {
    opacity: 0.85;
}

.calc-inline:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(122, 201, 67, 0.25);
    border-radius: 4px;
}

#recommendBlock .question {
    margin-bottom: 12px;
    margin-top: 12px;
}

.tax-preparer-section {
    margin-top: 40px;
}

/* 2-column layout: radios left, dropdown right */
.school-type-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 10px;
}

.school-type-right select {
    width: 100%;
    max-width: 100%;
}

/* keep right labels looking like your other labels */
.school-type-right .question {
    margin: 0 0 8px;
    font-weight: 600;
}

/* =============================
   Section complete/incomplete UI
   (blue when incomplete, green + check when complete)
============================= */

.form-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 220ms ease;
}

/* Check icon (hidden by default) */
.header-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: #56b600;
    display: grid;
    place-items: center;
    font-weight: 900;
    opacity: 0;
    transform: scale(0.6);
}

/* Active step should NOT look disabled */
.form-container.is-active .form-body {
    opacity: 1 !important;
    pointer-events: auto !important;
    filter: none !important;
}

/* Complete look (photo 2) */
.form-container.is-complete .form-header {
    background: #7ac943;
}

.form-container.is-complete .form-body {
    opacity: 1;
    pointer-events: auto;
    filter: none;
}

/* Animate check when complete */
.form-container.is-complete .header-check {
    animation: popIn 240ms ease-out forwards;
}

/* Keep header normal always */
.form-container .form-header {
    opacity: 1 !important;
    filter: none !important;
}

/* When fieldset is disabled -> fade ONLY the body */
fieldset[disabled] + .form-body,
fieldset[disabled] .form-body {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.2);
}

/* If your HTML is: <fieldset><div class="form-body">...</div></fieldset> */
fieldset[disabled] .form-body {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.2);
}

/* And make sure fieldset itself doesn't fade the header */
fieldset[disabled] {
    opacity: 1; /* important: don't fade the container */
    pointer-events: none; /* still prevents interaction */
}

/* When school is preselected via URL, keep step-3 content visible (not faded) */
.has-preselected-school #step-3[disabled] .form-body {
    opacity: 1;
    filter: none;
}

/* Enable interaction for school selection fields when school is preselected */
.has-preselected-school #step-3[disabled] #recommendSchoolBlock,
.has-preselected-school #step-3[disabled] #schoolTypeBlock,
.has-preselected-school #step-3[disabled] #publicSchoolBlock,
.has-preselected-school #step-3[disabled] #privateSchoolBlock,
.has-preselected-school #step-3[disabled] #otherSchoolBlock {
    pointer-events: auto;
}

.qco-deduction-msg {
    margin-top: 10px;
    font-size: 14px;
    color: #1f2d3d;
    text-align: center;
}

/* Question text */
#step-2 .question,
#step-2 label.question {
    font-size: 14px;
    font-weight: 600;
    color: #1f2d3d;
    margin: 0;
}

label {
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1rem;
}

/* Hint / helper text */
#step-2 .hint {
    font-size: 12px;
    font-weight: 400;
    color: #6b7c93;
    line-height: 1.4;
    margin: 0;
}

/* Radio option wrapper */
#step-2 .radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
}

/* Radio labels */
#step-2 .radio-option span {
    font-size: 15px;
    font-weight: 400;
    color: #1f2d3d;
}

/* -----------------------------
   Responsive Layout
------------------------------ */

/* Tablets (<= 1024px) */
@media (max-width: 768px) {
    body {
        padding: 14px; /* was 40px */
    }

    .page-wrapper {
        padding: 18px 12px;
    }

    .outer-card {
        padding: 16px;
    }

    .form-body {
        padding: 16px;
    }
    .page-title {
        font-size: 20px;
        margin: 8px 0 18px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 18px;
        margin-bottom: 14px;
    }
}

/* ---------- Step 4 (Payment) fixes ---------- */

/* Stripe/pay grid: stack nicely on phones */
@media (max-width: 900px) {
    .pay-grid {
        grid-template-columns: 1fr 1fr; /* 2 cols on tablets */
    }

    /* Card number spans full width */
    .pay-grid .field.span-2 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .pay-grid {
        grid-template-columns: 1fr; /* 1 col on phones */
        gap: 14px;
    }

    /* Right-side brand icons: allow wrapping + avoid overflow */
    .right-icons {
        right: 8px;
        gap: 6px;
        flex-wrap: wrap;
        max-width: 120px;
        justify-content: flex-end;
    }

    /* Make CVC icon not collide */
    .cvc-icon {
        right: 8px;
        transform: translateY(-50%) scale(0.95);
    }

    /* Stripe container always full width */
    .stripe-input {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .nav {
        display: none; /* hide desktop links */
    }

    .nav-toggle-btn {
        display: inline-flex;
    }

    /* mobile menu panel */
    .nav--mobile {
        position: absolute;
        top: 100%;
        right: 20px;
        left: 20px;
        background: #163a63;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 10px;
        padding: 10px 12px;
        display: none;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .nav--mobile .nav__link {
        font-size: 16px;
        padding: 10px 8px;
        border-radius: 8px;
    }

    .nav--mobile .nav__link:hover {
        background: rgba(255, 255, 255, 0.08);
        text-decoration: none;
    }

    /* toggle open */
    #navToggle:checked ~ .nav--mobile {
        display: flex;
    }
}

/* Country + sameAddress spacing on small screens */
@media (max-width: 600px) {
    .payment-section .checkline {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        line-height: 1.25;
    }

    .payment-section .checkline span {
        display: block;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .page-title {
        font-size: 24px;
        margin-bottom: 22px;
    }
}

/* ---------- Step 5 (Tax Preparer Permission) fixes ---------- */

/* Your hidden fields use .grid-4; make it responsive */
@media (max-width: 1100px) {
    .tax-preparer-section .grid-4 {
        grid-template-columns: 1fr 1fr; /* 2 cols on medium screens */
    }
}

@media (max-width: 600px) {
    .tax-preparer-section .grid-4 {
        grid-template-columns: 1fr; /* 1 col on phones */
    }

    /* Add breathing room so inputs don't feel cramped */
    .tax-preparer-section .field {
        margin-bottom: 14px;
    }
}

/* ---------- Grid responsive fixes ---------- */

/* .grid-4 responsive (Address fields) */
@media (max-width: 1100px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr; /* 2 cols on tablets */
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr; /* 1 col on phones */
    }
}

/* .grid-2 responsive */
@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr; /* 1 col on phones */
    }
}

/* ---------- Header responsive ---------- */
@media (max-width: 600px) {
    .brand {
        margin-left: 0;
    }

    .brand__logo {
        max-height: 40px;
        transform: scale(1);
    }

    .site-header__inner {
        padding: 8px 12px;
    }
}

/* ---------- School type layout responsive ---------- */
@media (max-width: 900px) {
    .school-type-layout {
        grid-template-columns: 1fr; /* stack on tablets */
        gap: 16px;
    }
}

/* ---------- Footer responsive ---------- */
@media (max-width: 600px) {
    .site-footer {
        margin-top: 30px;
    }

    .site-footer__inner {
        padding: 24px 16px 32px;
    }

    .footer-line {
        font-size: 12px;
        line-height: 1.8;
    }

    .footer-logo img {
        height: 60px;
    }
}

/* ---------- Form header responsive ---------- */
@media (max-width: 600px) {
    .form-header {
        font-size: 16px;
        padding: 14px 16px;
    }

    .header-check {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* ---------- QCO extra block responsive ---------- */
@media (max-width: 600px) {
    #qcoExtraBlock.grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ---------- Donation step summary/layout safety ---------- */
@media (max-width: 900px) {
    .donation-grid {
        grid-template-columns: 1fr; /* stack input + summary */
        gap: 14px;
    }

    .donation-summary {
        text-align: left; /* avoids weird right alignment on small screens */
    }
}

/* ---------- Donor rows safety ---------- */
@media (max-width: 900px) {
    .donor-row {
        grid-template-columns: 1fr 1fr; /* reduce width pressure */
    }

    .donor-actions {
        grid-column: 1 / -1; /* actions go full width under fields */
        flex-direction: row;
        height: auto;
        width: auto;
        padding: 8px;
        border-radius: 6px;
        justify-content: flex-end;
    }

    .donor-action {
        width: 44px;
        height: 40px;
    }
}

@media (max-width: 600px) {
    .donor-row {
        grid-template-columns: 1fr; /* stack all fields */
    }

    .donor-actions {
        justify-content: flex-start;
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    70% {
        opacity: 1;
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Success Banner */
.success-banner {
    max-width: 1200px;
    margin: 0 auto 20px;
    animation: slideDown 0.3s ease-out;
}

.success-banner.hidden {
    display: none;
}

.success-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #7ac943 0%, #5fa62f 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(122, 201, 67, 0.3);
}

.success-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #7ac943;
    flex-shrink: 0;
}

.success-text {
    flex: 1;
    color: #fff;
}

.success-text strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
    color: #fff;
}

.success-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
    color: #fff;
}

.success-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.success-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------------------------------------
   Payment notice (persistent status / error region)

   Replaces alert() for payment problems: an alert is dismissed and forgotten,
   which is the wrong behaviour when a donor needs to know a charge may exist.
--------------------------------------------------- */
.payment-notice {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 6px;
  border-left: 4px solid;
  font-size: 15px;
  line-height: 1.5;
}

.payment-notice.hidden {
  display: none;
}

.payment-notice--error {
  /* 5.9:1 on white - meets WCAG AA for normal text */
  background-color: #fdecec;
  border-left-color: #b3261e;
  color: #8c1d18;
}

.payment-notice--info {
  /* 6.2:1 on white */
  background-color: #e8f0fe;
  border-left-color: #1a56b8;
  color: #14418c;
}

.payment-notice p {
  margin: 6px 0 0;
}

/* Submitting state: make the locked form visibly inert. */
.all-steps-form[aria-busy="true"] {
  opacity: 0.75;
  cursor: progress;
}

.submit-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
