/* ============================================================================
   Simple donation form, v4 (2026-08): guided wizard.
   SCOPED: every rule lives under .sdn-root so the SAME stylesheet renders
   the real form natively inside the designer (no iframe) without touching
   the admin page. .sdn-root is a container (container-type: inline-size):
   the mobile layout follows the form's own width. .sdn-page marks the real
   public page (full-viewport height).
   One question per screen, a progress stepper, and a brand panel beside the
   wizard on wide screens (compact brand bar on phones and embeds).
   The payment engine contract (Payment.js ids: user_email, DonationAmount,
   Frequency, terms, News, NameOnCard, StripeCard, card_pay_btn,
   bancontact_pay_btn, apple-pay-*, google-pay-*, alertBlock...) is untouched;
   the UI logic lives in SimpleDonationForm.js (rewritten with this design).
   Brand knobs from obj_Style.mako: --maincolor (HSL triplet), --maincolortext,
   --accentcolor / --accentcolortext (optional second brand colour, Classique: the
   panel tint's second stop, progress, selected rhythm, links, recap and project
   cards read it and fall back to the main colour),
   --buttontextcolor, --borderradius, --fontfamily, --logosize,
   --backgroundimage. Also used by the thank-you page.
   ========================================================================== */

.sdn-root, .sdn-root * { box-sizing: border-box; }

.sdn-root {
    font-family: var(--fontfamily);
    font-size: 17px;
    margin: 0;
    color: #1c2230;
    background: var(--sdnbg, #ffffff);
}

/* the container lives on the inner wrapper: containment on the root would
   trap the fixed overlays (payment modal, project modal) */
.sdn-root #simple-donation-container { container-type: inline-size; position: relative; }

/* ── utilities (shared with the thank-you template) ── */
.sdn-root .hidden { display: none !important; }
.sdn-root .w-100 { width: 100%; }
.sdn-root .mb-0 { margin-bottom: 0; }
.sdn-root .mt-8 { margin-top: 0.5rem; }
.sdn-root .mr-8 { margin-right: 0.5rem; }
.sdn-root .small { font-size: 0.82rem; opacity: 0.75; }
.sdn-root .d-flex { display: flex; }
.sdn-root .d-block { display: block; }
.sdn-root .flex-column { flex-direction: column; }
.sdn-root .justify-content-center { justify-content: center; }
.sdn-root .align-items-center { align-items: center; }
.sdn-root .text-center { text-align: center; }
.sdn-root .col-12 { width: 100%; }

/* the admin app (bootstrap) styles .custom-select as a SELECT: reset it,
   here it is only a chevron wrapper (the .lang-select rule below re-narrows) */
.sdn-root .custom-select { display: block; width: auto; height: auto; padding: 0; border: 0; background: none; }

.sdn-root a { color: hsl(var(--accentcolortext, var(--maincolortext))); text-decoration: none; }
.sdn-root button { font-family: var(--fontfamily); font-size: 1rem; }

/* ── the split: brand panel + wizard panel ── */
.sdn-root #simple-donation-container { display: flex; flex-wrap: wrap; }
.sdn-root.sdn-page #simple-donation-container { min-height: 100vh; }

.sdn-root .sdnw-brand {
    flex: 0 0 44%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.6rem 2.2rem;
    color: var(--buttontextcolor);
    overflow: hidden;
}

/* Classique: the photo/logo panel stays put while the form column scrolls
   (viewport-high; the designer preview sets --sdn-vh to its frame height) */
.sdn-root.sdn-tpl-split .sdnw-brand {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: var(--sdn-vh, 100vh);
}

/* the photo is its own layer so it can be panned (--herox/--heroy) and
   zoomed (--herozoom) under the brand tint, whose strength is --herotint */
.sdn-root.sdn-tpl-split .sdnw-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--backgroundimage, none);
    background-size: cover;
    background-position: var(--herox, 50%) var(--heroy, 50%);
    transform: scale(var(--herozoom, 1));
    transform-origin: var(--herox, 50%) var(--heroy, 50%);
}

/* brand tint over the hero so the texts always read */
.sdn-root .sdnw-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: var(--herotint, 1);
    background: linear-gradient(165deg, hsl(var(--maincolor) / 0.88) 0%, hsl(var(--accentcolor, var(--maincolor)) / 0.62) 100%);
}

.sdn-root .sdnw-brand > * { position: relative; z-index: 2; }

/* ── the photo's look (Classique, FormSettings.HeroTintStyle / HeroFilter /
   HeroSide): how the brand colour meets the photo, its treatment, and which
   side the panel sits on. The designer's crop box mirrors these values. ── */
.sdn-root.sdn-ht-flat .sdnw-brand::before { background: hsl(var(--maincolor) / 0.78); }
.sdn-root.sdn-ht-bottom .sdnw-brand::before { background: linear-gradient(180deg, hsl(var(--maincolor) / 0.05) 0%, hsl(var(--maincolor) / 0.25) 45%, hsl(var(--accentcolor, var(--maincolor)) / 0.9) 100%); }
.sdn-root.sdn-ht-none .sdnw-brand::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%); }
.sdn-root.sdn-hf-gray.sdn-tpl-split .sdnw-brand::after { filter: grayscale(1); }
.sdn-root.sdn-hf-duotone.sdn-tpl-split .sdnw-brand::after { filter: grayscale(1) contrast(1.15); }
.sdn-root.sdn-hf-duotone .sdnw-brand::before { mix-blend-mode: multiply; }
.sdn-root.sdn-hf-blur.sdn-tpl-split .sdnw-brand::after { filter: blur(6px); inset: -14px; }
.sdn-root.sdn-hs-right #simple-donation-container { flex-direction: row-reverse; }

/* ── photo LAYOUTS (Classique, FormSettings.HeroLayout): panel (default, the
   sticky side panel), inset (the panel as a rounded card with margins), cover
   (the photo fills the page, the form floats as a card), diagonal (the cover
   clipped to a wedge from the top-left corner to the bottom-right, the page
   colour elsewhere). Stacked (container <= 900px) rules further down. ── */
.sdn-root.sdn-tpl-split.sdn-hl-inset { background: var(--sdnbg, #ffffff); }
.sdn-root.sdn-tpl-split.sdn-hl-inset .sdnw-brand { flex-basis: calc(44% - 22px); top: 22px; margin: 22px 0 22px 22px; height: calc(var(--sdn-vh, 100vh) - 44px); border-radius: 28px; }
.sdn-root.sdn-tpl-split.sdn-hl-inset.sdn-hs-right .sdnw-brand { margin: 22px 22px 22px 0; }
.sdn-root.sdn-tpl-split:is(.sdn-hl-cover, .sdn-hl-diagonal) #simple-donation-container { min-height: var(--sdn-vh, 100vh); }
/* the photo and the brand block stay put (fixed) while the card scrolls; the block is
   CENTERED in the half the card leaves free */
.sdn-root.sdn-tpl-split:is(.sdn-hl-cover, .sdn-hl-diagonal) .sdnw-brand { position: fixed; inset: 0; z-index: 0; flex: none; width: auto; height: auto; align-self: auto; align-items: center; justify-content: center; text-align: center; padding: 3rem calc(50% + 1rem) 3rem max(6%, calc((100% - 1100px) / 2)); }
/* the card is centred in the viewport while it fits; taller, the line grows with it (no overflow) */
.sdn-root.sdn-tpl-split:is(.sdn-hl-cover, .sdn-hl-diagonal) .sdnw-panel { position: relative; z-index: 1; flex: 0 1 auto; align-self: center; width: min(520px, 88%); margin: 2.5rem max(6%, calc((100% - 1100px) / 2)) 2.5rem auto; padding: 2rem 1.9rem 2.2rem; border-radius: min(calc(var(--borderradius) + 10px), 30px); box-shadow: 0 30px 80px rgba(0, 0, 0, .28); }
.sdn-root.sdn-tpl-split:is(.sdn-hl-cover, .sdn-hl-diagonal).sdn-hs-right .sdnw-brand { padding-right: max(6%, calc((100% - 1100px) / 2)); padding-left: calc(50% + 1rem); }
.sdn-root.sdn-tpl-split:is(.sdn-hl-cover, .sdn-hl-diagonal).sdn-hs-right .sdnw-panel { margin: 2.5rem auto 2.5rem max(6%, calc((100% - 1100px) / 2)); }
/* diagonal: the wedge, the page colour behind it, the brand block lower in the thick part */
.sdn-root.sdn-tpl-split.sdn-hl-diagonal { background: var(--sdnbg, #ffffff); }
.sdn-root.sdn-tpl-split.sdn-hl-diagonal .sdnw-brand { clip-path: polygon(0 0, 0 100%, 100% 100%); z-index: 1; }
.sdn-root.sdn-tpl-split.sdn-hl-diagonal .sdnw-panel { z-index: 2; }
/* the photo goes on, very faint, beyond the wedge (same framing, zoom and treatment) */
.sdn-root.sdn-tpl-split.sdn-hl-diagonal #simple-donation-container::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: var(--backgroundimage, none); background-size: cover; background-position: var(--herox, 50%) var(--heroy, 50%); transform: scale(var(--herozoom, 1)); transform-origin: var(--herox, 50%) var(--heroy, 50%); opacity: 0.12; }
.sdn-root.sdn-tpl-split.sdn-hl-diagonal.sdn-hf-gray #simple-donation-container::before, .sdn-root.sdn-tpl-split.sdn-hl-diagonal.sdn-hf-duotone #simple-donation-container::before { filter: grayscale(1); }
.sdn-root.sdn-tpl-split.sdn-hl-diagonal.sdn-hf-blur #simple-donation-container::before { filter: blur(6px); inset: -14px; }
.sdn-root.sdn-tpl-split.sdn-hl-diagonal.sdn-hs-right .sdnw-brand { clip-path: polygon(100% 0, 100% 100%, 0 100%); }

.sdn-root img.logo {
    max-width: var(--logosize);
    min-width: 96px;
    max-height: 100px;
    object-fit: contain;
    display: var(--logodisplay, block);
    margin: 0 auto 1.1rem;
    background: #ffffff;
    border-radius: calc(var(--borderradius) + 6px);
    padding: 12px 16px;
    box-shadow: 0 8px 26px rgba(8, 12, 26, 0.22);
}

.sdn-root h1.title {
    display: var(--titledisplay, block);
    margin: 0 0 0.5rem;
    font-size: 1.7rem;
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--buttontextcolor);
}

.sdn-root p.subtitle {
    display: var(--subtitledisplay, block);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--buttontextcolor);
    opacity: 0.9;
    max-width: 34ch;
}

.sdn-root .sdn-intro {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--buttontextcolor);
    opacity: 0.85;
    margin: 0.9rem auto 0;
    max-width: 40ch;
}

.sdn-root .sdn-intro p { margin: 0 0 0.45em; }
.sdn-root .sdn-intro p:last-child { margin-bottom: 0; }
.sdn-root .sdn-intro a { color: var(--buttontextcolor); text-decoration: underline; }

/* the wizard side */
.sdn-root .sdnw-panel {
    flex: 1 1 56%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.9rem 1.8rem 2.4rem;
    background: var(--sdnbg, #ffffff);
    position: relative;
}

.sdn-root .sdnw-inner { width: 100%; max-width: 440px; }

/* compact brand bar: shown on phones and in embeds instead of the panel */
.sdn-root .sdnw-topbar {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    max-width: 460px;
    margin: 0 0 1.2rem;
}

.sdn-root .sdnw-topbar img {
    max-height: 46px;
    max-width: 110px;
    object-fit: contain;
}

.sdn-root .sdnw-topbar strong { font-size: 1.1rem; font-weight: 800; color: #1c2230; line-height: 1.25; }

/* language chip */
.sdn-root .lang-select { position: absolute !important; top: 14px; right: 14px; width: 66px; z-index: 60; }
.sdn-root .lang-select > select.form-input {
    height: 32px;
    padding: 0 1.4rem 0 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #313a4a;
    border: 1px solid #e2e7ee;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
}

/* ── the stepper: where am I, in one glance ── */
.sdn-root .sdnw-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 0 1.2rem;
}

.sdn-root .sdnw-step { display: flex; align-items: center; }

.sdn-root .sdnw-dot {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.88rem;
    font-weight: 800;
    color: #8a93a3;
    background: #eef1f6;
    transition: background 0.15s ease, color 0.15s ease;
}

.sdn-root .sdnw-lbl {
    margin-left: 0.5rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: #8a93a3;
}

.sdn-root .sdnw-step.act .sdnw-dot { background: hsl(var(--maincolor)); color: var(--buttontextcolor); }
.sdn-root .sdnw-step.act .sdnw-lbl { color: #1c2230; }
.sdn-root .sdnw-step.done .sdnw-dot { background: hsl(var(--accentcolor, var(--maincolor)) / 0.15); color: hsl(var(--accentcolortext, var(--maincolortext))); }

/* only the active step shows its word: less to read */
.sdn-root .sdnw-step:not(.act) .sdnw-lbl { display: none; }

.sdn-root .sdnw-bar { width: 26px; height: 2.5px; background: #e4e8ef; margin: 0 0.6rem; border-radius: 2px; }
.sdn-root .sdnw-bar.done { background: hsl(var(--accentcolor, var(--maincolor)) / 0.4); }

/* ── panes ── */
.sdn-root .sdnw-pane { animation: sdnw-in 0.28s ease; }
.sdn-root .sdnw-pane.hidden { animation: none; }

/* the recent-gift check: its own quiet step between the amount and the
   payment methods (shown by SDNW_HistOpen, outside the wizard's pane list) */
.sdn-root .sdnw-histpane { display: flex; flex-direction: column; align-items: center; text-align: center; animation: sdnw-in 0.28s ease; }
.sdn-root .sdnw-histpane.hidden { display: none; animation: none; }
.sdn-root .sdnw-hist-ico { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fdf1dd; color: #b57d22; font-size: 28px; margin-bottom: 0.9rem; }
.sdn-root .sdnw-histpane .sdnw-quest { margin-bottom: 0.5rem; }
.sdn-root .sdnw-hist-txt { color: #55617a; font-size: 0.95rem; line-height: 1.55; max-width: 42ch; margin: 0 auto 1.1rem; }
.sdn-root .sdnw-hist-txt p { margin: 0 0 0.55rem; }
.sdn-root .sdnw-hist-txt #DonationHistAmount { font-weight: 700; color: #313a4a; }
.sdn-root .sdnw-histpane button.primary { width: 100%; }
.sdn-root .sdnw-histpane button.ter { margin-top: 0.5rem; }

@keyframes sdnw-in {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sdn-root .sdnw-pane { animation: none; }
}

.sdn-root .sdnw-quest {
    margin: 0 0 0.9rem;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    color: #1c2230;
    text-align: center;
}

/* ── generic fields ── */
.sdn-root .form-section { margin-bottom: 0.9rem; }

.sdn-root .form-section > label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #313a4a;
    margin: 0 0 0.4rem;
}

.sdn-root .form-section > label small { font-weight: 500; color: #8a93a3; font-size: 0.82rem; }

.sdn-root .form-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    font-size: 1rem;
    font-family: var(--fontfamily);
    color: #1c2230;
    background: #ffffff;
    border: 2px solid #d5dbe5;
    border-radius: var(--borderradius);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.sdn-root .form-input::placeholder { color: var(--placeholdercolor, #9aa3b2); }

.sdn-root .form-input:focus {
    border-color: hsl(var(--maincolor));
    box-shadow: 0 0 0 4px hsl(var(--maincolor) / 0.15);
}

.sdn-root .form-input.invalid {
    border-color: #d64545;
    box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12);
    animation: sdnw-shake 0.3s ease;
}

@keyframes sdnw-shake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
}

.sdn-root .error-msg { color: #d64545; font-size: 0.88rem; font-weight: 600; margin-top: 0.35rem; }

.sdn-root .custom-select { position: relative; }
.sdn-root .custom-select::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2.5px solid #8a93a3;
    border-bottom: 2.5px solid #8a93a3;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.sdn-root .custom-select select { cursor: pointer; }
.sdn-root .lang-select.custom-select::after { right: 0.7rem; width: 6px; height: 6px; }

/* ── frequency ── */
.sdn-root #frequency-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0 0 0.8rem;
}

.sdn-root #frequency-switch label.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 46px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #5b6472;
    background: #ffffff;
    border: 2px solid #d5dbe5;
    border-radius: var(--borderradius);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.sdn-root #frequency-switch label.btn i { font-size: 1.1rem; }

.sdn-root #frequency-switch label.btn.active {
    border-color: hsl(var(--accentcolor, var(--maincolor)));
    background: hsl(var(--accentcolor, var(--maincolor)) / 0.08);
    color: hsl(var(--accentcolortext, var(--maincolortext)));
}

/* ── amounts ── */
.sdn-root .donation-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
}

.sdn-root .donation-options label.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #1c2230;
    background: #ffffff;
    border: 2px solid #d5dbe5;
    border-radius: var(--borderradius);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.sdn-root .donation-options label.btn:hover {
    border-color: hsl(var(--maincolor) / 0.6);
    background: hsl(var(--maincolor) / 0.05);
}

.sdn-root .donation-options label.btn.active {
    background: hsl(var(--maincolor));
    border-color: hsl(var(--maincolor));
    color: var(--buttontextcolor);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px hsl(var(--maincolor) / 0.35);
}

.sdn-root .donation-options label.btn:last-child { grid-column: 1 / -1; font-size: 0.98rem; font-weight: 700; height: 46px; }

.sdn-root.sdn-amt-list .donation-options { grid-template-columns: 1fr; }
.sdn-root.sdn-amt-list .donation-options label.btn { height: 50px; font-size: 1.15rem; }

/* custom amount */
.sdn-root .custom-amount { margin: 0 0 0.6rem; }
.sdn-root .custom-amount .input-group { position: relative; display: flex; }
.sdn-root .custom-amount .form-input {
    height: 46px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    padding-right: 3.6rem;
}
.sdn-root .custom-amount .input-group-append {
    position: absolute;
    right: 1.1rem;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.sdn-root .custom-amount .input-group-text {
    font-size: 0.95rem;
    font-weight: 800;
    color: #8a93a3;
    background: none;
    border: 0;
    padding: 0;
}

/* ── optional donor details (AskDetails) ── */
.sdn-root .sdnw-detgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.sdn-root .sdnw-detgrid .sdnw-det2 { grid-column: span 2; }
.sdn-root .sdnw-detgrid .sdnw-det3 { grid-column: span 3; }
.sdn-root .sdnw-detgrid .sdnw-det4 { grid-column: span 4; }
.sdn-root .sdnw-detgrid .sdnw-det6 { grid-column: 1 / -1; }
.sdn-root .sdnw-detgrid .custom-select { margin: 0; }
.sdn-root .sdnw-detgrid .form-input { min-width: 0; padding-left: 0.8rem; padding-right: 0.8rem; }
.sdn-root .sdnw-detcheck { display: flex; align-items: center; gap: 0.5rem; margin: 0.1rem 0; font-size: 0.92rem; font-weight: 600; color: #45505f; cursor: pointer; }
.sdn-root .sdnw-detcheck input { width: 16px; height: 16px; margin: 0; accent-color: hsl(var(--maincolor)); }
.sdn-root .sdnw-detcompany { display: none; }
.sdn-root .sdnw-details.sdnw-company-on .sdnw-detcompany { display: block; }
.sdn-root .sdnw-idhelp { margin-top: -0.1rem; }
.sdn-root .sdnw-idhelp-txt { margin-top: 0.4rem; padding: 0.6rem 0.8rem; border-radius: calc(var(--borderradius) * 0.7); background: #f5f7fa; font-size: 0.82rem; line-height: 1.5; color: #5b6472; }
.sdn-root .sdnw-idhelp-txt p { margin: 0 0 0.4rem; }
.sdn-root .sdnw-idhelp-txt p:last-child { margin-bottom: 0; }
.sdn-root .sdnw-idhelp-txt a { color: hsl(var(--maincolortext)); }
.sdn-root.sdn-compact .sdnw-detgrid { gap: 0.4rem; }

/* ── payment in flight: the dimmed screen + spinner Tools.js injects (ShowPaymentLoading) ── */
#dimScreen { position: fixed; inset: 0; z-index: 1200; background: rgba(8, 12, 26, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 1.5rem; font-family: var(--fontfamily, Arial, sans-serif); }
#dimScreen .paymentspinner { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; width: 100%; max-width: 340px; background: #ffffff; border-radius: min(calc(var(--borderradius, 14px) + 8px), 22px); padding: 2rem 1.8rem; box-shadow: 0 30px 80px rgba(8, 12, 26, 0.45); text-align: center; animation: sdnw-pmodal-up 0.22s ease; }
#dimScreen .pay-spin { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; border: 4px solid #e7ecf4; border-top-color: hsl(var(--maincolor, 216 60% 45%)); animation: sdnw-payspin 0.8s linear infinite; }
#dimScreen .paymentspinner p { margin: 0; font-size: 0.98rem; font-weight: 700; color: #1c2230; line-height: 1.55; }
@keyframes sdnw-payspin { to { transform: rotate(360deg); } }

/* ── notes ── */
.sdn-root .info-box.fiscal-reduction {
    background: hsl(var(--maincolor) / 0.07);
    border: 1.5px solid hsl(var(--maincolor) / 0.18);
    border-radius: var(--borderradius);
    padding: 0.7rem 0.9rem;
    margin: 0 0 0.8rem;
}

.sdn-root .info-box.fiscal-reduction p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: hsl(var(--maincolortext));
}

.sdn-root .info-text {
    font-size: 0.84rem;
    line-height: 1.6;
    color: #6b7482;
    background: #f5f7fa;
    border-radius: var(--borderradius);
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.8rem;
}

.sdn-root .sdn-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0.7rem 0 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #6b7482;
}

.sdn-root .sdn-trust i { color: #2BB673; font-size: 1.05rem; }

/* ── buttons ── */
.sdn-root button.primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    height: 54px;
    padding: 0 1.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--buttontextcolor);
    background: hsl(var(--maincolor));
    border: 2.5px solid hsl(var(--maincolor));
    border-radius: var(--borderradius);
    cursor: pointer;
    box-shadow: 0 12px 26px hsl(var(--maincolor) / 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.sdn-root button.primary:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px hsl(var(--maincolor) / 0.38);
    filter: brightness(1.05);
}

.sdn-root button.primary:active:not([disabled]) { transform: translateY(0); }

.sdn-root button.primary[disabled], .sdn-root button.primary.disabled {
    opacity: 0.55;
    cursor: default;
    box-shadow: none;
}

.sdn-root.sdn-btn-outline button.primary {
    background: transparent;
    color: hsl(var(--maincolortext));
    box-shadow: none;
}
.sdn-root.sdn-btn-outline button.primary:hover:not([disabled]) {
    background: hsl(var(--maincolor));
    color: var(--buttontextcolor);
    filter: none;
}

.sdn-root button.ter, .sdn-root a.ter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    height: 44px;
    padding: 0 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #5b6472;
    background: #f1f4f8;
    border: 0;
    border-radius: var(--borderradius);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.sdn-root button.ter:hover, .sdn-root a.ter:hover { background: #e6ebf2; color: #313a4a; }

/* a custom bg (inline --sdnbg) pulls the neutral soft surfaces toward it;
   without one these rules never match and the defaults above stand */
.sdn-root[style*="--sdnbg"] .info-text { background: color-mix(in srgb, var(--sdnbg) 22%, #ffffff); }
.sdn-root[style*="--sdnbg"] button.ter, .sdn-root[style*="--sdnbg"] a.ter { background: color-mix(in srgb, var(--sdnbg) 28%, #ffffff); }
.sdn-root[style*="--sdnbg"] button.ter:hover, .sdn-root[style*="--sdnbg"] a.ter:hover { background: color-mix(in srgb, var(--sdnbg) 40%, #ffffff); }
.sdn-root[style*="--sdnbg"] .sdnw-dot { background: color-mix(in srgb, var(--sdnbg) 30%, #ffffff); }
.sdn-root[style*="--sdnbg"] .form-input, .sdn-root[style*="--sdnbg"] .stripe-div { background: color-mix(in srgb, var(--sdnbg) 16%, #ffffff); border-color: color-mix(in srgb, var(--sdnbg) 85%, #000000); }
.sdn-root[style*="--sdnbg"] .donation-options label.btn:not(.active), .sdn-root[style*="--sdnbg"] #frequency-switch label.btn:not(.active), .sdn-root[style*="--sdnbg"] .payment-methods label.btn:not(.active), .sdn-root[style*="--sdnbg"] .sdnw-projpills button:not(.act) { background: color-mix(in srgb, var(--sdnbg) 16%, #ffffff); border-color: color-mix(in srgb, var(--sdnbg) 85%, #000000); }
.sdn-root[style*="--sdnbg"] .sdnw-projpills button::before { border-color: color-mix(in srgb, var(--sdnbg) 75%, #000000); }

.sdn-root .hover-overlay { position: relative; }

/* ── the payment pane ── */
.sdn-root .sdnw-recapwrap { text-align: center; margin: 0 0 1.2rem; }

.sdn-root .sdn-recap {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.3rem;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: var(--fontfamily);
    color: hsl(var(--accentcolortext, var(--maincolortext)));
    background: hsl(var(--accentcolor, var(--maincolor)) / 0.08);
    border: 1.5px solid hsl(var(--accentcolor, var(--maincolor)) / 0.22);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.sdn-root .sdn-recap:hover { background: hsl(var(--accentcolor, var(--maincolor)) / 0.14); }
.sdn-root .sdn-recap em { font-style: normal; font-size: 0.82rem; font-weight: 700; opacity: 0.75; text-decoration: underline; }

/* payment methods: one clear row per method, the chosen one opens up */
.sdn-root .payment-methods { display: flex; flex-direction: column; margin: 0 0 1rem; }

.sdn-root .payment-methods label.btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 60px;
    max-height: 84px;
    overflow: hidden;
    margin: 0 0 0.55rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 2px solid #d5dbe5;
    border-radius: var(--borderradius);
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease,
        max-height 0.28s ease, min-height 0.28s ease, opacity 0.2s ease, margin 0.28s ease,
        padding 0.28s ease, border-width 0.28s ease;
}
.sdn-root .payment-methods label.btn:last-child { margin-bottom: 0; }

.sdn-root .payment-methods label.btn:hover { border-color: hsl(var(--maincolor) / 0.6); }

/* the payment step in two goes: first the method list alone; picking one
   collapses the list to the chosen row (click it to change) and reveals the
   tip, the fields, the checkboxes and the pay button */
.sdn-root .sdnw-payrecap { margin: 0 0 0.8rem; padding: 0.7rem 0.95rem; border: 1.5px solid hsl(var(--accentcolor, var(--maincolor)) / 0.22); border-radius: min(var(--borderradius), 14px); background: hsl(var(--accentcolor, var(--maincolor)) / 0.05); }
.sdn-root .sdnw-payrecap > div:not(#TipBlock):not(.sdnw-newsinfo) { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; }
.sdn-root .sdnw-payrecap > div + div { margin-top: 0.3rem; }
.sdn-root .sdnw-payrecap span { font-size: 0.82rem; font-weight: 600; color: #55637a; }
.sdn-root .sdnw-payrecap strong { font-size: 0.95rem; font-weight: 800; color: #1c2230; }
.sdn-root .sdnw-payrecap-total { border-top: 1px solid hsl(var(--accentcolor, var(--maincolor)) / 0.18); padding-top: 0.35rem; }
.sdn-root .sdnw-payrecap-total strong { color: hsl(var(--accentcolortext, var(--maincolortext))); }
/* WITHOUT the tip riding along the card is a single bare line: that one reads
   like a quiet receipt (uppercase micro-label, larger tabular amount, a soft
   accent wash); the tip variant above stays exactly as it was */
.sdn-root .sdnw-payrecap:not(:has(#TipBlock)) { margin: 0 0 0.9rem; padding: 0.45rem 0.95rem; border-color: hsl(var(--accentcolor, var(--maincolor)) / 0.26); border-radius: min(var(--borderradius), 14px); background: linear-gradient(180deg, hsl(var(--accentcolor, var(--maincolor)) / 0.07), hsl(var(--accentcolor, var(--maincolor)) / 0.02)); }
.sdn-root .sdnw-payrecap:not(:has(#TipBlock)) > div { align-items: center; }
.sdn-root .sdnw-payrecap:not(:has(#TipBlock)) span { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #6a7488; }
.sdn-root .sdnw-payrecap:not(:has(#TipBlock)) strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sdn-root .sdnw-payrest { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s ease; }
.sdn-root .sdnw-payrest-in { overflow: hidden; min-height: 0; opacity: 0; transition: opacity 0.22s ease; }
.sdn-root .sdnw-paychosen .sdnw-payrest { grid-template-rows: 1fr; }
.sdn-root .sdnw-paychosen .sdnw-payrest-in { opacity: 1; transition-delay: 0.1s; }
.sdn-root .sdnw-paychosen .payment-methods label.btn:not(.active) { max-height: 0; min-height: 0; opacity: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .sdn-root .payment-methods label.btn { transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease; }
    .sdn-root .sdnw-payrest, .sdn-root .sdnw-payrest-in { transition: none; }
}
.sdn-root .payment-methods label.btn .sdnw-pmchange { display: none; flex: 0 0 auto; margin-left: 0.6rem; font-size: 0.82rem; font-weight: 700; color: hsl(var(--accentcolortext, var(--maincolortext))); text-decoration: underline; }
.sdn-root .sdnw-paychosen .payment-methods label.btn.active .sdnw-pmchange { display: inline; }

.sdn-root .payment-methods label.btn.active {
    border-color: hsl(var(--maincolor));
    background: hsl(var(--maincolor) / 0.05);
    box-shadow: 0 0 0 4px hsl(var(--maincolor) / 0.12);
}

/* a radio circle drawn in CSS so the row reads as a choice */
.sdn-root .payment-methods label.btn::before {
    content: "";
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #c6cdd8;
    background: #fff;
    transition: border 0.12s ease;
}

.sdn-root .payment-methods label.btn.active::before {
    border: 7px solid hsl(var(--maincolor));
}

.sdn-root .payment-methods label.btn .sdnw-pmname { flex: 1 1 auto; font-size: 1rem; font-weight: 700; color: #313a4a; }
.sdn-root .payment-methods label.btn img { max-height: 26px; max-width: 60px; object-fit: contain; }
.sdn-root .payment-methods label.btn img + img { margin-left: 4px; }

.sdn-root .stripe-div {
    padding: 1rem;
    background: #ffffff;
    border: 2px solid #d5dbe5;
    border-radius: var(--borderradius);
}

/* ── consents ── */
.sdn-root .checkboxes label {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0 0 0.7rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #45505f;
    cursor: pointer;
}

.sdn-root .checkboxes label div { font-size: 0.95rem !important; }

.sdn-root .checkboxes input[type="checkbox"] {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: hsl(var(--maincolor));
    cursor: pointer;
}

/* ── sponsor box ── */
.sdn-root .sponsored-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #f5f7fa;
    border-radius: var(--borderradius);
    padding: 0.7rem 1rem;
    margin: 0 0 1rem;
}

.sdn-root .sponsored-box p { margin: 0; font-size: 0.82rem; color: #6b7482; }
.sdn-root .sponsored-box img { max-height: 40px; max-width: 110px; object-fit: contain; }

/* ── alerts ── */
.sdn-root .alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border-radius: var(--borderradius);
    padding: 0.85rem 1rem;
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.sdn-root .alert p { margin: 0; }

.sdn-root .alert-blocking { background: #fdf0f0; border: 1.5px solid #f3cdcd; color: #a33030; }
.sdn-root .alert-blocking .la-exclamation-triangle { font-size: 1.3rem; color: #d64545; }
.sdn-root .alert-warning { background: #fdf7ec; border: 1.5px solid #f0dcb8; color: #8a6215; }
.sdn-root .alert-warning .la-exclamation-triangle { font-size: 1.3rem; color: #d9a123; }

/* ── wallet buttons ── */
.sdn-root .apple-pay-button {
    --apple-pay-button-width: 100%;
    --apple-pay-button-height: 56px;
    --apple-pay-button-border-radius: var(--borderradius);
    --apple-pay-button-padding: 0px 0px;
    --apple-pay-button-box-sizing: border-box;
}

.sdn-root .apple-pay-btn {
    display: inline-block;
    width: 100%;
    height: 56px;
    border: none;
    border-radius: var(--borderradius);
    cursor: pointer;
    transition: transform 0.08s ease, opacity 0.15s ease;
    -webkit-appearance: -apple-pay-button;
    -apple-pay-button-type: plain;
    -apple-pay-button-style: black;
}

.sdn-root .apple-pay-btn:hover { opacity: 0.9; }
.sdn-root .apple-pay-btn:active { transform: scale(0.99); }
.sdn-root .apple-pay-btn:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }

.sdn-root .google-pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border: 2px solid #d5dbe5;
    border-radius: var(--borderradius);
    background-color: #ffffff;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.sdn-root .google-pay-btn:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.sdn-root .google-pay-btn:active { transform: scale(0.99); }
.sdn-root .google-pay-btn:disabled { cursor: not-allowed; opacity: 0.5; box-shadow: none; }

.sdn-root .gpay-logo {
    width: 74px;
    height: 26px;
    background-image: url('/static/images/Google_Pay_Logo.svg.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* ── thank-you page (shares this sheet; classic centered card) ── */
.sdn-root .donation-header {
    text-align: center;
    padding: 1.6rem 1.5rem 0.5rem;
}

.sdn-root .thank-you { text-align: center; padding: 0.75rem 1.5rem 2rem; max-width: 520px; margin: 0 auto; }
.sdn-root .thank-you h3 { margin: 0.9rem 0 0.6rem; font-size: 1.45rem; font-weight: 800; color: #141a28; }
.sdn-root .thank-you p { margin: 0 0 0.6rem; font-size: 1rem; line-height: 1.6; color: #5b6472; }
.sdn-root .thank-you .colored-animation { margin: 0 auto; }
.sdn-root .thank-you a.ter, .sdn-root .thank-you .redirect { margin-top: 0.9rem; }
/* the thank-you screen's optional questions (successful payments only) */
.sdn-root .sdnw-tyq { margin: 1.2rem 0 0.2rem; padding: 1rem 1.1rem; text-align: left; border: 1.5px solid hsl(var(--maincolor) / 0.2); border-radius: var(--borderradius); background: hsl(var(--maincolor) / 0.04); }
.sdn-root .sdnw-tyq-head { margin: 0 0 0.7rem; font-size: 1rem; font-weight: 800; color: #1c2230; }
.sdn-root .sdnw-tyq-item { display: block; margin: 0 0 0.7rem; }
.sdn-root .sdnw-tyq-item span { display: block; margin: 0 0 0.3rem; font-size: 0.92rem; font-weight: 600; color: #313a4a; }
.sdn-root .sdnw-tyq-item textarea.form-input { height: auto; min-height: 64px; padding: 0.6rem 0.8rem; line-height: 1.45; font-size: 0.95rem; resize: vertical; }
.sdn-root .sdnw-tyq-item input.form-input, .sdn-root .sdnw-tyq-item select.form-input { height: 46px; font-size: 0.95rem; }
.sdn-root .sdnw-tyq-item .custom-select { margin: 0; }
.sdn-root .sdnw-tyq button.primary { height: 48px; font-size: 0.98rem; margin-top: 0.2rem; }
.sdn-root .sdnw-tyq-done { margin: 0.3rem 0 0; font-size: 0.95rem; font-weight: 700; color: #2BB673; }
/* the thank-you screen: brand heart, centered in the page, no stepper, tinted back link */
.sdn-root .sdnw-ty-heart { display: inline-block; font-size: 54px; line-height: 1; color: hsl(var(--accentcolor, var(--maincolor))); animation: sdnw-heart 1.8s ease-in-out infinite; }
@keyframes sdnw-heart { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.sdn-root.sdn-thanks .sdnw-steps { display: none; }
/* Lettre stacks header above the panel: the pair centers as one block, no void between them */
/* the thank-you page's status notices */
.sdn-root .sdnw-ty-wait { display: inline-block; font-size: 54px; line-height: 1; color: #d9a123; }
.sdn-root .sdnw-ty-fail { display: inline-block; font-size: 54px; line-height: 1; color: #d64545; }
.sdn-root.sdn-thanks .donation-header img.logo { margin-bottom: 0.6rem; }
.sdn-root.sdn-thanks .thank-you button.ter, .sdn-root.sdn-thanks .thank-you a.ter { background: hsl(var(--maincolor) / 0.1); color: hsl(var(--maincolortext)); text-decoration: none; }
.sdn-root.sdn-thanks .thank-you button.ter:hover, .sdn-root.sdn-thanks .thank-you a.ter:hover { background: hsl(var(--maincolor) / 0.18); color: hsl(var(--maincolortext)); }
@media (prefers-reduced-motion: reduce) { .sdn-root .sdnw-ty-heart { animation: none; } }
.sdn-root .hoverable.redirect p {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    height: 50px;
    font-size: 1rem;
    font-weight: 700;
    color: #5b6472;
    background: #f1f4f8;
    border-radius: var(--borderradius);
    transition: background 0.12s ease;
}
.sdn-root .hoverable.redirect:hover p { background: #e6ebf2; color: #313a4a; }
.sdn-root .form-step-2 img.logo { max-height: 64px; min-width: 0; box-shadow: none; }

/* ── project choice as tappable pills (the dropdown felt like a form) ── */
.sdn-root .sdnw-projpills { display: flex; flex-direction: column; gap: 0.45rem; }
.sdn-root .sdnw-projpills button { display: flex; align-items: center; gap: 0.6rem; text-align: left; padding: 0.65rem 0.9rem; border: 2px solid #d5dbe5; border-radius: var(--borderradius); background: #ffffff; font-size: 0.92rem; font-weight: 600; color: #45505f; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; font-family: var(--fontfamily); }
.sdn-root .sdnw-projpills button::before { content: ""; flex: 0 0 auto; box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c6cdd8; background: #fff; transition: border 0.12s ease; }
.sdn-root .sdnw-projpills button:hover { border-color: hsl(var(--accentcolor, var(--maincolor)) / 0.55); }
.sdn-root .sdnw-projpills button.act { border-color: hsl(var(--accentcolor, var(--maincolor))); background: hsl(var(--accentcolor, var(--maincolor)) / 0.06); color: #1c2230; }
.sdn-root .sdnw-projpills button.act::before { border: 6px solid hsl(var(--accentcolor, var(--maincolor))); }
.sdn-root .sdnw-projfeat { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.85rem; border: 2px solid hsl(var(--accentcolor, var(--maincolor)) / 0.25); border-radius: var(--borderradius); background: hsl(var(--accentcolor, var(--maincolor)) / 0.04); }
.sdn-root .sdnw-projfeat > img { flex: 0 0 auto; width: 74px; height: 74px; object-fit: cover; border-radius: calc(var(--borderradius) * 0.6); }
.sdn-root .sdnw-projfeat-body { min-width: 0; }
.sdn-root .sdnw-projfeat-body strong { display: block; font-size: 0.95rem; line-height: 1.3; color: #1c2230; }
.sdn-root .sdnw-projfeat-body p { margin: 0.3rem 0 0.35rem; font-size: 0.85rem; line-height: 1.45; color: #5a6577; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sdn-root .sdnw-inline-single strong { border-bottom: 2px dotted currentColor; padding-bottom: 1px; }

/* ── payment modal: the chosen method's inputs open focused ── */
/* FRB-mode forms: the foundation collects and issues the receipts */
.sdn-root .sdnw-frbnote { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0.9rem 0 0.2rem; padding: 0.7rem 0.85rem; border: 1px solid #ccd5e2; border-radius: 10px; background: #f8fafc; }
.sdn-root .sdnw-frbnote i { font-size: 1.2rem; color: #46596b; flex: 0 0 auto; margin-top: 1px; }
.sdn-root .sdnw-frbnote > div { flex: 1 1 auto; min-width: 0; }
.sdn-root .sdnw-frbnote p { margin: 0; font-size: 0.78rem; line-height: 1.5; color: #55637a; }
.sdn-root .sdnw-frbnote p + p { margin-top: 0.45rem; }
.sdn-root .sdnw-frbnote a { font-weight: 700; text-decoration: underline; }
/* the payment area sits ON the page (the modal is gone); #PayModal keeps its
   id, .sdnw-payinline the look; the recent-gift overlay covers just this area */
.sdnw-payinline { position: relative; margin: 0 0 0.6rem; }
.sdnw-payinline .form-section { margin-bottom: 1rem; }
.sdnw-stripefake { display: flex; align-items: center; width: 100%; color: #32325d; font-size: 1rem; cursor: default; user-select: none; -webkit-user-select: none; }
.sdnw-stripefake-num { flex: 1 1 auto; display: inline-flex; align-items: center; gap: 0.65rem; white-space: nowrap; overflow: hidden; }
.sdnw-stripefake-num i { font-size: 1.3rem; color: #8792a2; }
.sdnw-stripefake-exp { flex: 0 0 auto; width: 84px; white-space: nowrap; }
.sdnw-stripefake-cvc { flex: 0 0 auto; width: 44px; text-align: right; }
/* sponsored form: the sponsor's card on the payment-method step */
.sdn-root .sdnw-sponsor { display: flex; align-items: center; gap: 0.8rem; margin: 0.9rem 0 0.2rem; padding: 0.7rem 0.85rem; border: 1px solid #ccd5e2; border-radius: 10px; background: #f8fafc; font-family: var(--fontfamily, Arial, sans-serif); }
.sdn-root .sdnw-sponsor > a { flex: 0 0 auto; display: inline-flex; }
.sdn-root .sdnw-sponsor img { max-height: 40px; max-width: 84px; object-fit: contain; display: block; }
.sdn-root .sdnw-sponsor p { margin: 0; font-size: 0.8rem; line-height: 1.45; color: #55637a; }
.sdn-root .sdnw-sponsor p a { font-weight: 700; color: #313a4a; text-decoration: underline; }

/* the Uningo tip block on the payment-method step (TRX_TIP switch) */
.sdn-root .sdnw-tip { margin: 0.9rem 0; padding: 0.8rem 0.85rem; border: 1px solid #e2e7ee; border-radius: 10px; background: #f8fafc; font-family: var(--fontfamily, Arial, sans-serif); }
.sdn-root .sdnw-tip-head { margin: 0 0 0.2rem; font-size: 0.9rem; font-weight: 800; color: #313a4a; }
.sdn-root .sdnw-tip-txt { margin: 0 0 0.6rem; font-size: 0.8rem; line-height: 1.45; color: #55637a; }
.sdn-root .sdnw-tip #TipRange { width: 100%; margin-top: 0.2rem; accent-color: hsl(var(--accentcolor, var(--maincolor, 210 60% 45%))); cursor: pointer; }
.sdn-root .sdnw-tip-total { margin: 0.35rem 0 0; text-align: center; font-size: 0.85rem; font-weight: 700; color: #44424F; min-height: 1.2em; }
.sdn-root .sdnw-tip-none { display: block; margin: 0.35rem auto 0; border: 0; background: none; padding: 0; font-size: 0.78rem; color: #8a93a3; text-decoration: underline; cursor: pointer; }
.sdn-root .sdnw-tip.sdnw-tip-off #TipRange, .sdn-root .sdnw-tip[data-tip-mode="none"] #TipRange { opacity: 0.35; }
/* the tip lives INSIDE the recap card: a bare slider strip, no second card */
.sdn-root .sdnw-tip--in { margin: 0.15rem 0 0.5rem; padding: 0; border: 0; background: transparent; border-radius: 0; }
.sdn-root .sdnw-tip--in .sdnw-tip-none { margin: 0.15rem auto 0; }
/* the tip pill + its explanation modal */
.sdn-root .sdnw-tippill { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; border: 1px solid #d5dbe5; border-radius: 999px; background: #ffffff; padding: 2px 9px; font-size: 0.72rem; font-weight: 700; color: #55637a; cursor: pointer; vertical-align: 1px; transition: border-color 0.12s ease, color 0.12s ease; }
.sdn-root .sdnw-tippill i { font-size: 0.9rem; color: hsl(var(--accentcolortext, var(--maincolortext))); }
.sdn-root .sdnw-tippill:hover { border-color: hsl(var(--maincolor) / 0.5); color: #1c2230; }
.sdnw-tipmodal { position: fixed; inset: 0; z-index: 9200; display: flex; align-items: center; justify-content: center; padding: 1.2rem; background: rgba(12, 16, 27, 0.55); }
.sdnw-tipmodal.hidden { display: none !important; }
.sdnw-tipmodal-card { position: relative; width: 100%; max-width: 420px; background: #ffffff; border-radius: 16px; padding: 1.3rem 1.4rem; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3); font-family: var(--fontfamily, Arial, sans-serif); }
.sdnw-tipmodal-card strong { display: block; font-size: 1.05rem; font-weight: 800; color: #1c2230; margin: 0 0 0.5rem; padding-right: 2rem; }
.sdnw-tipmodal-card p { margin: 0 0 0.6rem; font-size: 0.88rem; line-height: 1.55; color: #45505f; }
.sdnw-tipmodal-card p:last-child { margin-bottom: 0; }
.sdnw-tipmodal-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 9px; background: #f2f6fa; color: #55637a; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
/* the sponsor line stays, quieter */
.sdn-root .sdnw-sponsor { padding: 0.55rem 0.8rem; }
.sdn-root .sdnw-sponsor p { font-size: 0.76rem; line-height: 1.45; }
.sdn-root .sdnw-sponsor img { max-width: 54px; max-height: 32px; }
/* the consent texts keep a quiet size in the modal, whatever the template does */
.sdnw-payinline .checkboxes label { text-transform: none !important; letter-spacing: normal !important; font-weight: 500 !important; }
.sdnw-payinline .checkboxes label div { font-size: 0.8rem !important; line-height: 1.55 !important; color: #55637a !important; }
.sdnw-payinline .checkboxes label a { font-weight: 700; }
/* the news consent's long privacy sentence hides behind a little "i" */
.sdn-root .sdnw-infobtn { display: inline; border: 0; background: none; padding: 0; margin: 0; color: #8a93a3; font-size: 1rem; line-height: 1; vertical-align: -1px; cursor: pointer; }
.sdn-root .sdnw-infobtn:hover { color: hsl(var(--maincolortext)); }
.sdn-root .sdnw-newsinfo { margin: 0.4rem 0 0.6rem 2rem; padding: 0.55rem 0.75rem; border-radius: 10px; background: hsl(var(--maincolor) / 0.06); font-size: 0.78rem; line-height: 1.5; color: #55637a; }

/* stand-in wallet buttons, preview only: look like the real black pills */
.sdn-root .sdnw-walletdemo { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 7px; background: #000000 !important; color: #ffffff !important; border: 0 !important; border-radius: 10px !important; font-size: 1.05rem; font-weight: 600; cursor: pointer; font-family: -apple-system, 'Segoe UI', Roboto, sans-serif !important; }
.sdn-root .sdnw-walletdemo svg { display: block; flex: 0 0 auto; }

/* the fake sits dead-center; :has keeps the real mounted Stripe element untouched */
.sdnw-payinline .stripe-div:has(.sdnw-stripefake) { display: flex !important; align-items: center !important; padding: 0 1rem !important; min-height: 54px; }
/* the sheet stays neutral: template skins (paper, dark, serif) must not
   restyle the payment inputs inside it */
.sdnw-payinline .form-input, .sdnw-payinline .stripe-div { background: #ffffff !important; border: 1.5px solid #d5dbe5 !important; border-radius: 9px !important; color: #1c2230 !important; font-family: var(--fontfamily, Arial, sans-serif) !important; }
.sdnw-payinline .stripe-div { padding: 0.9rem 1rem; border: 1.5px solid #d5dbe5; border-radius: 9px; background: #ffffff; }
.sdnw-payinline .stripe-div:focus-within { border-color: hsl(var(--maincolor, 210 60% 45%)); }
.sdnw-payinline .checkboxes label { color: #45505f !important; }
.sdnw-payinline .checkboxes label div { color: #45505f !important; }
.sdnw-payinline .alert-blocking { background: #fdf0f0 !important; color: #a33030 !important; }

/* the preview's fake success screen: this is how the donor lands */
.sdnw-paydone { text-align: center; padding: 1rem 0.5rem 0.5rem; }
.sdnw-paydone i { font-size: 44px; color: #2BB673; }
.sdnw-paydone h3 { margin: 0.6rem 0 0.5rem; font-size: 1.3rem; font-weight: 800; color: #141a28; }
.sdnw-paydone div { font-size: 0.92rem; line-height: 1.6; color: #5b6472; }

/* ── impact echo: each project's closest option to the chosen amount ── */
.sdn-root .sdnw-more { border: 0; background: none; padding: 0; font-size: 0.82rem; font-weight: 700; color: hsl(var(--accentcolortext, var(--maincolortext))); text-decoration: underline; cursor: pointer; }

/* ── project details modal: polished overlay (unscoped: the modal is moved
   to document.body on open, both on the public page and in the designer) ── */
.sdnw-pmodal { position: fixed; inset: 0; z-index: 9999; background: rgba(12, 16, 27, 0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 22px; animation: sdnw-pmodal-in 0.18s ease; font-family: var(--fontfamily, Arial, sans-serif); }
.sdnw-pmodal.hidden { display: none !important; }
@keyframes sdnw-pmodal-in { from { opacity: 0; } to { opacity: 1; } }
.sdnw-pmodal-sheet { position: relative; width: 100%; max-width: 680px; max-height: 88vh; overflow-y: auto; background: #ffffff; border-radius: 22px; box-shadow: 0 34px 90px rgba(8, 12, 26, 0.5); animation: sdnw-pmodal-up 0.22s ease; }
@keyframes sdnw-pmodal-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.sdnw-pmodal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.94); color: #313a4a; font-size: 18px; cursor: pointer; box-shadow: 0 4px 14px rgba(8, 12, 26, 0.22); display: inline-flex; align-items: center; justify-content: center; transition: transform 0.12s ease; }
.sdnw-pmodal-close:hover { transform: scale(1.06); }
.sdnw-pmodal-hero { position: relative; height: 210px; background-size: cover; background-position: center; background-color: hsl(var(--maincolor, 210 60% 45%)); }
.sdnw-pmodal-heroshade { position: absolute; inset: 0; background: linear-gradient(165deg, hsl(var(--maincolor, 210 60% 45%) / 0.55) 0%, rgba(10, 14, 24, 0.35) 100%); }
.sdnw-pmodal-main { position: absolute; left: 26px; bottom: -30px; width: 96px; height: 96px; object-fit: cover; border-radius: 18px; border: 4px solid #ffffff; box-shadow: 0 12px 30px rgba(8, 12, 26, 0.28); }
.sdnw-pmodal-body { padding: 2.6rem 1.7rem 1.8rem; }
.sdnw-pmodal-body h3 { margin: 0 0 0.9rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; color: #141a28; }
.sdnw-pmodal-body h4 { margin: 1.5rem 0 0.7rem; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8a93a3; }
.sdnw-pmodal-progress { height: 10px; border-radius: 6px; background: #eef1f6; overflow: hidden; margin-bottom: 0.4rem; }
.sdnw-pmodal-progress div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, hsl(var(--maincolor, 210 60% 45%)) 0%, hsl(var(--maincolortext, 210 60% 35%)) 100%); }
.sdnw-pmodal-raised { font-size: 0.88rem; font-weight: 700; color: hsl(var(--maincolortext, 210 60% 35%)); margin: 0 0 1rem; }
.sdnw-pmodal-desc { font-size: 0.96rem; line-height: 1.7; color: #45505f; white-space: pre-line; margin: 0; }
.sdnw-pmodal-impacts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.sdnw-pmodal-impact { border: 1px solid #e4e8ef; border-radius: 14px; padding: 0.85rem 0.9rem; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.sdnw-pmodal-impact:hover { border-color: hsl(var(--maincolor, 210 60% 45%) / 0.5); box-shadow: 0 6px 18px rgba(8, 12, 26, 0.08); }
.sdnw-pmodal-impact strong { display: inline-flex; align-items: center; padding: 0.15rem 0.7rem; border-radius: 999px; background: hsl(var(--maincolor, 210 60% 45%) / 0.1); color: hsl(var(--maincolortext, 210 60% 35%)); font-size: 0.9rem; font-weight: 800; margin-bottom: 0.45rem; }
.sdnw-pmodal-impact p { margin: 0; font-size: 0.82rem; line-height: 1.55; color: #5b6472; }
.sdnw-pmodal-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; }
.sdnw-pmodal-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; transition: transform 0.15s ease; }
.sdnw-pmodal-photos img:hover { transform: scale(1.04); }
@media (max-width: 560px) {
    .sdnw-pmodal { padding: 10px; }
    .sdnw-pmodal-impacts { grid-template-columns: 1fr; }
    .sdnw-pmodal-photos { grid-template-columns: repeat(3, 1fr); }
}

/* project group headers inside the amounts list */

/* ── embeds (?embed=1, legacy ?bg=False): the form alone for an iframe in the
   org's site. No photo side, no presentation texts, no viewport-high page: the
   compact brand bar (logo + title) tops the panel, which takes the whole width
   and only the height it needs (the controller already forces the panel layout) ── */
.sdn-root.iframe-only { background: var(--sdnbg, #ffffff); }
.sdn-root.iframe-only #simple-donation-container { min-height: 0; display: block; }
.sdn-root.iframe-only .sdnw-brand { display: none !important; }
.sdn-root.iframe-only .sdnw-topbar { display: flex; margin: 0 auto 1rem; }
.sdn-root.iframe-only .sdnw-panel { flex: none; width: auto; max-width: none; margin: 0; padding: 1.4rem 1rem 1.6rem; border-radius: 0; box-shadow: none; align-self: auto; }
.sdn-root.iframe-only .sdnw-inner { max-width: 480px; margin: 0 auto; }
.sdn-root.iframe-only .lang-select { top: 10px; right: 10px; }

/* ── "Autre" morphs into the free-amount field, in its own row ── */
.sdn-root.sdn-customing .donation-options label.btn[data-custom] { display: none; }
.sdn-root.sdn-tpl-split.sdn-customing .donation-options { margin-bottom: 0.5rem; }
.sdn-root.sdn-tpl-split .custom-amount .form-input { border-color: hsl(var(--maincolor)); }

/* ── project card (ShowImpact): photo, name, the donation option closest to the amount, arrows, learn more ── */
/* the card's corners are capped: at pill radii the curve would run under the arrows */
.sdn-root .sdnw-impact { display: flex; gap: 0.8rem; align-items: stretch; margin: 0 0 0.8rem; padding: 0.65rem; border: 2px solid hsl(var(--accentcolor, var(--maincolor)) / 0.25); border-radius: min(var(--borderradius), 22px); background: hsl(var(--accentcolor, var(--maincolor)) / 0.04); }
.sdn-root .sdnw-impact-img { flex: 0 0 88px; min-height: 88px; border-radius: min(calc(var(--borderradius) * 0.7), 16px); background: hsl(var(--maincolor) / 0.12) center / cover no-repeat; }
.sdn-root .sdnw-impact-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.sdn-root .sdnw-impact-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.sdn-root .sdnw-impact-top strong { flex: 1 1 auto; min-width: 0; font-size: 0.98rem; line-height: 1.3; color: #1c2230; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sdn-root .sdnw-impact-nav { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.15rem; }
.sdn-root .sdnw-impact-nav button { width: 26px; height: 26px; padding: 0; border: 1.5px solid #d5dbe5; border-radius: 50%; background: #ffffff; color: #45505f; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; transition: border-color 0.12s ease, color 0.12s ease; }
.sdn-root .sdnw-impact-nav button:hover { border-color: hsl(var(--maincolor)); color: hsl(var(--maincolortext)); }
.sdn-root .sdnw-impact-nav em { font-style: normal; font-size: 0.78rem; font-weight: 700; color: #8a93a3; min-width: 30px; text-align: center; }
.sdn-root .sdnw-impact-tier { display: block; width: 100%; margin: 0; padding: 0.4rem 0.6rem; text-align: left; border: 1.5px solid transparent; border-radius: min(calc(var(--borderradius) * 0.7), 14px); background: #ffffff; font-family: var(--fontfamily); font-size: 0.86rem; line-height: 1.4; color: #45505f; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
/* the amount runs into the text; a fixed 3-line box so the card never jumps between options */
.sdn-root .sdnw-impact-tiertxt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 4.2em; }
.sdn-root .sdnw-impact-tier strong { display: inline; color: hsl(var(--accentcolortext, var(--maincolortext))); font-weight: 800; white-space: nowrap; }
.sdn-root .sdnw-impact-tiertxt span { display: inline; }
/* same for the name when the arrows browse projects of different name lengths */
.sdn-root .sdnw-impact-top:has(.sdnw-impact-nav) strong { min-height: 2.6em; }
.sdn-root .sdnw-impact-tier:hover { border-color: hsl(var(--accentcolor, var(--maincolor)) / 0.5); }
.sdn-root .sdnw-impact-tier.act { border-color: hsl(var(--accentcolor, var(--maincolor))); background: hsl(var(--accentcolor, var(--maincolor)) / 0.07); }
.sdn-root .sdnw-impact .sdnw-more { align-self: flex-start; }
.sdn-root[style*="--sdnbg"] .sdnw-impact-tier:not(.act), .sdn-root[style*="--sdnbg"] .sdnw-impact-nav button { background: color-mix(in srgb, var(--sdnbg) 16%, #ffffff); }

/* ── compact step (ShowImpact): the whole first screen without scrolling ── */
.sdn-root.sdn-compact .sdnw-brand { padding: 2.2rem 2rem; }
.sdn-root.sdn-compact h1.title { font-size: 1.5rem; }
.sdn-root.sdn-compact p.subtitle { font-size: 0.95rem; }
.sdn-root.sdn-compact .sdnw-panel { padding: 1.4rem 1.6rem 1.8rem; }
.sdn-root.sdn-compact .sdnw-steps { margin-bottom: 0.9rem; }
.sdn-root.sdn-compact .sdnw-dot { width: 26px; height: 26px; font-size: 0.8rem; }
.sdn-root.sdn-compact .sdnw-quest { font-size: 1.05rem; margin-bottom: 0.7rem; }
.sdn-root.sdn-compact #frequency-switch { gap: 0.4rem; margin-bottom: 0.6rem; }
.sdn-root.sdn-compact #frequency-switch label.btn { height: 38px; font-size: 0.88rem; }
.sdn-root.sdn-compact #frequency-switch label.btn i { font-size: 1rem; }
.sdn-root.sdn-compact .donation-options { gap: 0.4rem; margin-bottom: 0.45rem; }
.sdn-root.sdn-compact .donation-options label.btn { height: 42px; font-size: 1.1rem; }
.sdn-root.sdn-compact .donation-options label.btn:last-child { height: 38px; font-size: 0.9rem; }
.sdn-root.sdn-compact.sdn-amt-list .donation-options label.btn { height: 40px; font-size: 1rem; }
.sdn-root.sdn-compact.sdn-customing .donation-options { margin-bottom: 0.4rem; }
.sdn-root.sdn-compact .custom-amount { margin-bottom: 0.45rem; }
.sdn-root.sdn-compact .custom-amount .form-input { height: 38px; font-size: 1.05rem; }
.sdn-root.sdn-compact .sdnw-impact { margin-bottom: 0.6rem; padding: 0.55rem; gap: 0.7rem; }
.sdn-root.sdn-compact .form-input { height: 42px; font-size: 0.95rem; }
.sdn-root.sdn-compact .form-section { margin-bottom: 0.65rem; }
.sdn-root.sdn-compact .form-section > label { font-size: 0.88rem; margin-bottom: 0.3rem; }
.sdn-root.sdn-compact .info-box.fiscal-reduction { padding: 0.5rem 0.75rem; margin-bottom: 0.6rem; }
.sdn-root.sdn-compact .info-box.fiscal-reduction p { font-size: 0.8rem; line-height: 1.45; }
.sdn-root.sdn-compact .info-text { font-size: 0.78rem; line-height: 1.5; padding: 0.5rem 0.7rem; margin-bottom: 0.6rem; }
.sdn-root.sdn-compact .sdnw-projfeat { padding: 0.6rem; gap: 0.7rem; }
.sdn-root.sdn-compact .sdnw-projfeat-body p { -webkit-line-clamp: 1; }
.sdn-root.sdn-compact .sdnw-projpills button { padding: 0.45rem 0.75rem; font-size: 0.86rem; }
.sdn-root.sdn-compact button.primary { height: 46px; font-size: 0.98rem; }
.sdn-root.sdn-compact .sdn-trust { margin-top: 0.5rem; font-size: 0.8rem; }

@container (max-width: 900px) {
    .sdn-root .sdnw-panel { flex: 1 1 100%; }
    .sdn-root .sdnw-brand { flex: 1 1 100%; padding: 2rem 1.5rem 1.6rem; }
    /* stacked: the banner is part of the flow again */
    .sdn-root.sdn-tpl-split .sdnw-brand { position: relative; top: auto; height: auto; align-self: auto; }
    .sdn-root.sdn-root .sdnw-brand img.logo { max-width: max(110px, var(--logosize)); max-height: 90px; margin-bottom: 0.8rem; }
    .sdn-root h1.title { font-size: 1.45rem; }
    .sdn-root p.subtitle { font-size: 0.95rem; }
    .sdn-root .sdn-intro { display: none; }
    .sdn-root .sdnw-panel { padding: 1.6rem 1.1rem 2.5rem; }
    /* the photo layouts fold back into the stack */
    .sdn-root.sdn-tpl-split.sdn-hl-inset .sdnw-brand { flex-basis: 100%; top: auto; margin: 14px 14px 0; height: auto; border-radius: 22px; }
    .sdn-root.sdn-tpl-split:is(.sdn-hl-cover, .sdn-hl-diagonal) .sdnw-brand { position: relative; inset: auto; flex: 1 1 100%; width: auto; padding: 2rem 1.5rem 1.6rem; }
    .sdn-root.sdn-tpl-split.sdn-hl-diagonal .sdnw-brand { clip-path: none; }
    .sdn-root.sdn-tpl-split:is(.sdn-hl-cover, .sdn-hl-diagonal) .sdnw-panel { flex: 1 1 100%; align-self: auto; width: auto; margin: 0; padding: 1.6rem 1.1rem 2.5rem; border-radius: 0; box-shadow: none; }
}
