/* ─────────────────────────────────────────────────────────────────────────────
   Donation page — Components/Pages/Public/Donation.razor. Scoped under .nf-dn-*.
   Navy + orange site theme (nikalas-theme.css). Eyebrow from who-we-are-page.css.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.nf-dn-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(36px, 4vw, 56px) var(--nfd-gutter) clamp(90px, 9vw, 130px);
    color: #fff;
    background:
        radial-gradient(circle at 70% 10%, rgba(66, 133, 214, .35) 0%, rgba(66, 133, 214, 0) 45%),
        linear-gradient(120deg, var(--nfd-navy-deep) 0%, var(--nfd-navy) 50%, #174B87 100%);
}
/* Child photo on the left edge, fading into the navy. */
.nf-dn-hero__photo {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
    width: clamp(240px, 23vw, 400px);
    background: url("/_content/RioCommerce.Web.Storefront/images/nikalas/donate/child.jpg") 50% 20% / cover no-repeat;
    -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 96%);
            mask-image: linear-gradient(90deg, #000 40%, transparent 96%);
}
/* Orange + light curves at the bottom. */
.nf-dn-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 0;
    height: clamp(50px, 6vw, 100px);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 28 C360 98 900 104 1440 30 L1440 56 C900 124 360 118 0 52Z' fill='%23FF7900'/%3E%3Cpath d='M0 52 C360 118 900 124 1440 56 L1440 100 L0 100Z' fill='%23F5F8FD'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}

.nf-dn-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 3vw, 48px);
    max-width: 1400px;
}
.nf-dn-hero__text { padding-left: clamp(0px, 15vw, 280px); }

.rioc-app h1.nf-dn-hero__title {
    margin: 0;
    font-size: clamp(34px, 3.3vw, 52px);
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    text-transform: none;
}
.nf-dn-hero__title span {
    display: inline-block;
    padding-bottom: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C60 3 130 2 197 6 C140 7 90 9 40 12' fill='none' stroke='%23FF7900' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") 30% 100% / 70% 12px no-repeat;
}
.rioc-app p.nf-dn-hero__lead {
    max-width: 32em;
    margin: 18px 0 0;
    font-size: var(--nfd-fs-body);
    line-height: 1.7;
    color: rgba(255, 255, 255, .88);
    text-transform: none;
}

.rioc-app ul.nf-dn-highlights {
    list-style: none;
    margin: clamp(22px, 2.4vw, 32px) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.nf-dn-highlights li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-transform: none;
}
.nf-dn-highlights li + li { border-left: 1px solid rgba(255, 255, 255, .22); }
.nf-dn-highlights__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: var(--nfd-orange);
    background: #fff;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .1);
    transition: scale .3s var(--nfd-ease);
}
.nf-dn-highlights__icon svg { width: 27px; height: 27px; }
.nf-dn-highlights li:hover .nf-dn-highlights__icon { scale: 1.08; }

/* ── Donation card ─────────────────────────────────────────────────────────── */

.nf-dn-card {
    padding: clamp(22px, 2.4vw, 32px);
    border-radius: 24px;
    color: var(--nfd-text);
    background: #fff;
    box-shadow: 0 34px 70px -30px rgba(0, 10, 30, .65);
}
.nf-dn-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.nf-dn-card__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    color: var(--nfd-orange);
    background: var(--nfd-orange-tint);
}
.nf-dn-card__icon svg { width: 34px; height: 34px; }
.rioc-app h2.nf-dn-card__title { margin: 0; font-size: clamp(24px, 2vw, 30px); font-weight: 800; line-height: 1.15; color: var(--nfd-navy); text-transform: none; }
.rioc-app p.nf-dn-card__sub { margin: 4px 0 0; font-size: var(--nfd-fs-small); color: var(--nfd-muted); text-transform: none; }

.nf-dn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.nf-dn-field--full { grid-column: 1 / -1; }
.nf-dn-field { display: flex; flex-direction: column; min-width: 0; }
.nf-dn-field label { margin-bottom: 6px; font-size: 15px; font-weight: 700; color: var(--nfd-navy); text-transform: none; }
.nf-dn-req { color: var(--nfd-orange-text); }
.nf-dn-input { position: relative; }
.nf-dn-input__icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; display: grid; color: #7A879B; pointer-events: none; transition: color .2s ease; }
.nf-dn-input__icon svg { width: 19px; height: 19px; }
.rioc-app .nf-dn-input input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 1.5px solid var(--nfd-line);
    border-radius: 12px;
    background: #fff;
    color: var(--nfd-text);
    font: inherit;
    font-size: 15.5px;
    box-shadow: none;
    text-transform: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.nf-dn-input input::placeholder { color: #8C97A8; text-transform: none; }
.rioc-app .nf-dn-input input:hover { border-color: #C9D4E4; }
.rioc-app .nf-dn-input input:focus { outline: none; border-color: var(--nfd-orange); box-shadow: 0 0 0 4px rgba(255, 121, 0, .14); }
.nf-dn-input:focus-within .nf-dn-input__icon { color: var(--nfd-orange); }
.rioc-app .nf-dn-input input[aria-invalid="true"] { border-color: #D92D20; background: #FFF8F7; }
.nf-dn-err { margin-top: 5px; font-size: 13px; font-weight: 500; color: #B42318; text-transform: none; }

/* Amount */
.nf-dn-amount { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.nf-dn-amount legend { margin-bottom: 12px; padding: 0; font-size: 17px; font-weight: 700; color: var(--nfd-navy); text-transform: none; }
.nf-dn-amount__options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.nf-dn-chip {
    height: 46px;
    padding: 0 6px;
    border: 1.5px solid var(--nfd-line);
    border-radius: 10px;
    background: #fff;
    color: var(--nfd-navy);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, translate .2s ease;
}
.nf-dn-chip:hover { border-color: var(--nfd-orange); translate: 0 -1px; }
.nf-dn-chip.is-selected { border: 2px solid var(--nfd-orange); background: var(--nfd-orange-tint); color: var(--nfd-orange-text); font-weight: 800; }
.nf-dn-chip:focus-visible { outline: 2px solid var(--nfd-navy); outline-offset: 2px; }
.nf-dn-other { position: relative; margin-top: 12px; }
.nf-dn-other__cur { position: absolute; left: 16px; top: 50%; translate: 0 -50%; font-weight: 700; color: var(--nfd-navy); }
.rioc-app .nf-dn-other input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 36px;
    border: 1.5px solid var(--nfd-orange);
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--nfd-navy);
    box-shadow: 0 0 0 4px rgba(255, 121, 0, .1);
}
.rioc-app .nf-dn-other input:focus { outline: none; }
.rioc-app p.nf-dn-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #EEF4FC;
    color: var(--nfd-text);
    font-size: 14.5px;
    text-transform: none;
}
.nf-dn-note svg { flex: none; width: 19px; height: 19px; color: var(--nfd-navy); }
.rioc-app p.nf-dn-note.is-error { background: #FEF3F2; color: #B42318; }
.nf-dn-note.is-error svg { color: #B42318; }

/* Failed / cancelled payment banner */
.rioc-app p.nf-dn-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #FECDCA;
    border-radius: 12px;
    background: #FEF3F2;
    color: #B42318;
    font-size: 14.5px;
    line-height: 1.5;
    text-transform: none;
}
.nf-dn-banner svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }

/* Gateway picker (only when more than one gateway is enabled) */
.nf-dn-gw__options { display: flex; flex-wrap: wrap; gap: 10px; }
.nf-dn-gw__options .nf-dn-chip { min-width: 130px; }

.nf-dn-pay:disabled { opacity: .75; cursor: progress; translate: none; }

/* Pay button */
.nf-dn-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 58px;
    margin-top: 22px;
    border: 0;
    border-radius: 14px;
    background: var(--nfd-btn-bg);
    color: #fff;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 16px 30px -14px rgba(212, 94, 0, .75);
    transition: translate .3s var(--nfd-ease), box-shadow .3s var(--nfd-ease);
}
.nf-dn-pay svg { width: 21px; height: 21px; }
.nf-dn-pay__arrow { transition: translate .3s var(--nfd-ease); }
.nf-dn-pay:hover { translate: 0 -2px; box-shadow: 0 22px 36px -14px rgba(212, 94, 0, .85); }
.nf-dn-pay:hover .nf-dn-pay__arrow { translate: 5px 0; }
.nf-dn-pay:focus-visible { outline: 3px solid var(--nfd-navy); outline-offset: 3px; }
.rioc-app p.nf-dn-min { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--nfd-muted); text-transform: none; }
.nf-dn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Your support enables ──────────────────────────────────────────────────── */

.nf-dn-enables { padding-top: clamp(28px, 3vw, 44px); }
.rioc-app h2.nf-dn-enables__title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 clamp(20px, 2.4vw, 32px);
    font-size: clamp(26px, 2.4vw, 38px);
    font-weight: 800;
    color: var(--nfd-navy);
    text-transform: none;
}
.nf-dn-enables__title::before { content: ""; width: 44px; height: 4px; border-radius: 2px; background: var(--nfd-orange); }
.rioc-app ul.nf-dn-enables__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.nf-dn-enables__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 18px;
    border: 1px solid var(--nfd-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--nfd-shadow-card);
    color: var(--nfd-navy);
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-transform: none;
    transition: translate .35s var(--nfd-ease), box-shadow .35s var(--nfd-ease), border-color .35s var(--nfd-ease);
}
.nf-dn-enables__card:hover { translate: 0 -6px; border-color: rgba(255, 121, 0, .4); box-shadow: var(--nfd-shadow-card-hover); }
.nf-dn-enables__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; color: var(--nfd-orange); background: var(--nfd-orange-tint); transition: color .3s ease, background-color .3s ease, rotate .4s var(--nfd-ease); }
.nf-dn-enables__icon svg { width: 30px; height: 30px; }
.nf-dn-enables__card:hover .nf-dn-enables__icon { color: #fff; background: var(--nfd-orange); rotate: -8deg; }

/* ── Thank-you / receipt page ──────────────────────────────────────────────── */

.nf-ty-hero__bg { background-image: url("/_content/RioCommerce.Web.Storefront/images/nikalas/donate/child.jpg"); background-position: 50% 25%; }
.nf-ty { padding-top: clamp(24px, 3vw, 40px); }
.nf-ty-card {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(22px, 3vw, 38px);
    border: 1px solid var(--nfd-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--nfd-shadow-card);
}
.nf-ty-card--empty { text-align: center; }
.nf-ty-card h2 { margin: 0 0 6px; font-size: var(--nfd-fs-h3); font-weight: 800; color: var(--nfd-navy); text-transform: none; }
.rioc-app .nf-ty-card p { margin: 0; color: var(--nfd-text); text-transform: none; }
.nf-ty-status { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--nfd-line); }
.nf-ty-status__icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: #fff; background: #94A3B8; }
.nf-ty-status__icon svg { width: 30px; height: 30px; }
.nf-ty-status--paid .nf-ty-status__icon { background: #079455; box-shadow: 0 0 0 7px rgba(7, 148, 85, .12); }
.nf-ty-status--pending .nf-ty-status__icon { background: var(--nfd-orange); box-shadow: 0 0 0 7px rgba(255, 121, 0, .12); }
.nf-ty-status--failed .nf-ty-status__icon, .nf-ty-status--cancelled .nf-ty-status__icon { background: #D92D20; }
.nf-ty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 0; }
.nf-ty-grid div { min-width: 0; }
.nf-ty-grid dt { font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--nfd-muted); text-transform: uppercase; }
.nf-ty-grid dd { margin: 4px 0 0; font-size: 16px; font-weight: 600; color: var(--nfd-navy); overflow-wrap: anywhere; text-transform: none; }
.nf-ty-amount { font-size: 22px !important; color: var(--nfd-orange-text) !important; }
.nf-ty-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 26px; }
.nf-ty-link { color: var(--nfd-navy); font-weight: 600; }
.nf-ty-note { text-align: center; color: var(--nfd-muted); }
@media (max-width: 599.98px) { .nf-ty-grid { grid-template-columns: 1fr; } }

/* ── Motion ────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
    .nf-dn-hero__text { animation: nf-wwp-in .8s var(--nfd-ease) .1s both; }
    .nf-dn-card { animation: nf-wwp-in .8s var(--nfd-ease) .3s both; }
}

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

@media (max-width: 1279.98px) {
    .nf-dn-hero__text { padding-left: clamp(0px, 16vw, 210px); }
    .nf-dn-hero__photo { width: 19vw; }
}

/* 1024–1279px keeps the two-column hero, so the card is narrow (~440px) and five 80px chips
   clipped "₹10,000" and the bold selected amount. Tighter chips keep all five on one row. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .nf-dn-amount__options { gap: 8px; }
    .nf-dn-chip { padding: 0 2px; font-size: 15px; letter-spacing: -.01em; }
}

@media (max-width: 1023.98px) {
    .nf-dn-hero__inner { grid-template-columns: 1fr; }
    .nf-dn-hero__text { padding-left: 0; max-width: 680px; }
    .nf-dn-card { max-width: 680px; width: 100%; margin-inline: auto; }
    /* Photo becomes a faint full background behind the text. */
    .nf-dn-hero__photo { width: 100%; bottom: auto; height: 560px; opacity: .25; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%); background-position: 50% 15%; }
    .rioc-app ul.nf-dn-enables__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599.98px) {
    .nf-dn-grid { grid-template-columns: 1fr; }
    .nf-dn-amount__options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nf-dn-highlights li { font-size: 13.5px; padding: 0 6px; }
    .nf-dn-highlights__icon { width: 48px; height: 48px; }
    .nf-dn-highlights__icon svg { width: 22px; height: 22px; }
    .nf-dn-card__icon { width: 54px; height: 54px; }
    .nf-dn-card__icon svg { width: 28px; height: 28px; }
    .nf-dn-pay { font-size: 16px; }
    .rioc-app ul.nf-dn-enables__grid { grid-template-columns: 1fr; }
}

/* Small phones (≤359px): three amounts per row leave ~74px each — too narrow for "₹10,000".
   Two per row, with "Other" taking the full last row. */
@media (max-width: 359.98px) {
    .nf-dn-amount__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nf-dn-amount__options > .nf-dn-chip:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .nf-dn-chip, .nf-dn-pay, .nf-dn-pay__arrow, .nf-dn-enables__card, .nf-dn-enables__icon, .nf-dn-highlights__icon { transition: none; }
    .nf-dn-chip:hover, .nf-dn-pay:hover, .nf-dn-pay:hover .nf-dn-pay__arrow, .nf-dn-enables__card:hover { translate: none; }
    .nf-dn-enables__card:hover .nf-dn-enables__icon { rotate: none; }
}
