/* ============================================================================
   anota-forms.css — shared stylesheet for SSR form rendering.
   All classes are `af-` prefixed and driven by CSS custom properties that the
   host sets from FormTheme (see ThemeStyle.cs). Zero JS dependency.
   ============================================================================ */

.af-form {
    /* Fallback theme tokens; hosts override these on the container via ThemeStyle. */
    --af-primary: #21a884;
    --af-bg: #f4f7f6;
    --af-page: #ffffff;
    --af-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --af-radius: 8px;
    --af-btn-radius: 8px;

    /* Derived / static tokens. */
    --af-text: #1e293b;
    --af-muted: #64748b;
    --af-border: #e2e8f0;
    --af-border-strong: #cbd5e1;
    --af-error: #dc2626;
    --af-focus: color-mix(in srgb, var(--af-primary) 35%, transparent);
    --af-primary-soft: color-mix(in srgb, var(--af-primary) 10%, transparent);

    font-family: var(--af-font);
    color: var(--af-text);
    background: var(--af-bg);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.af-form *,
.af-form *::before,
.af-form *::after {
    box-sizing: border-box;
}

/* ---- Page + grid ---------------------------------------------------------- */

.af-page {
    background: var(--af-page);
    border-radius: calc(var(--af-radius) * 1.5);
    padding: 32px;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .04);
}

.af-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px 16px;
    align-items: start;
}

.af-page-title {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Column-span widths (1–12). */
.af-w-1  { grid-column: span 1; }
.af-w-2  { grid-column: span 2; }
.af-w-3  { grid-column: span 3; }
.af-w-4  { grid-column: span 4; }
.af-w-5  { grid-column: span 5; }
.af-w-6  { grid-column: span 6; }
.af-w-7  { grid-column: span 7; }
.af-w-8  { grid-column: span 8; }
.af-w-9  { grid-column: span 9; }
.af-w-10 { grid-column: span 10; }
.af-w-11 { grid-column: span 11; }
.af-w-12 { grid-column: span 12; }

/* ---- Field wrapper -------------------------------------------------------- */

.af-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.af-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.af-label {
    font-weight: 600;
    font-size: .925rem;
    color: var(--af-text);
}

.af-tooltip {
    position: relative;
    display: inline-flex;
}

.af-tooltip-trigger {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--af-primary-soft);
    color: var(--af-primary);
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.af-tooltip-trigger:hover,
.af-tooltip-trigger:focus-visible {
    background: var(--af-primary);
    color: #fff;
    outline: none;
}

.af-tooltip-panel {
    display: none;
    position: absolute;
    z-index: 5;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: calc(var(--af-radius) - 2px);
    background: var(--af-text);
    color: #fff;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.af-tooltip-panel::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--af-text);
}

.af-tooltip:hover .af-tooltip-panel,
.af-tooltip:focus-within .af-tooltip-panel {
    display: block;
}

.af-required {
    color: var(--af-error);
    margin-left: 2px;
}

/* Client-applied require/unrequire overrides (form-logic.js). The native marker above is
   server-rendered from Field.Required only, so an override hides it and paints a synthetic
   asterisk instead — never both at once. */
.af-label.af-req-override .af-required { display: none; }

.af-label.af-req-override.af-req-on::after {
    content: "*";
    color: var(--af-error);
    margin-left: 2px;
}

.af-help {
    margin: 0;
    font-size: .8125rem;
    color: var(--af-muted);
}

.af-error {
    margin: 0;
    font-size: .8125rem;
    color: var(--af-error);
    font-weight: 500;
}

/* ---- Inputs --------------------------------------------------------------- */

.af-input {
    width: 100%;
    font: inherit;
    color: var(--af-text);
    background: var(--af-page);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    padding: 10px 12px;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.af-input::placeholder { color: var(--af-muted); opacity: .8; }

.af-input:hover { border-color: var(--af-border-strong); }

.af-input:focus,
.af-input:focus-visible {
    outline: none;
    border-color: var(--af-primary);
    box-shadow: 0 0 0 3px var(--af-focus);
}

.af-textarea { resize: vertical; min-height: 96px; }

.af-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
}
.af-select[multiple] {
    background-image: none;
    padding-right: 12px;
    min-height: 120px;
}

.af-has-error .af-input {
    border-color: var(--af-error);
}
.af-has-error .af-input:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-error) 25%, transparent);
}

/* Prefix / suffix affixes for number fields. */
.af-affix {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    overflow: hidden;
}
.af-affix:focus-within {
    border-color: var(--af-primary);
    box-shadow: 0 0 0 3px var(--af-focus);
}
.af-affix .af-input {
    border: none;
    border-radius: 0;
}
.af-affix .af-input:focus { box-shadow: none; }
.af-affix-prefix,
.af-affix-suffix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--af-bg);
    color: var(--af-muted);
    font-size: .875rem;
    white-space: nowrap;
}

/* ---- Choice groups (radio / checkbox) ------------------------------------- */

.af-choice-group {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.af-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.af-choice:hover { border-color: var(--af-border-strong); background: var(--af-primary-soft); }

.af-choice input[type="radio"],
.af-choice input[type="checkbox"] {
    accent-color: var(--af-primary);
    width: 18px;
    height: 18px;
    flex: none;
    margin: 0;
}
.af-choice-label { flex: 1; }

.af-choice-other { flex-wrap: wrap; }
.af-choice-other-input { flex: 1 1 160px; padding: 6px 10px; }

/* ---- Composite (full name / address) -------------------------------------- */

.af-subgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.af-subgrid-stack { grid-template-columns: repeat(4, 1fr); }

.af-sub { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.af-sub-full   { grid-column: 1 / -1; }
.af-sub-grow   { grid-column: span 2; }
.af-sub-narrow { grid-column: span 1; }
.af-subgrid:not(.af-subgrid-stack) .af-sub-grow { grid-column: auto; }

.af-sub-label {
    font-size: .75rem;
    color: var(--af-muted);
}

/* ---- Rating (stars) ------------------------------------------------------- */

.af-rating { display: inline-flex; gap: 4px; }
.af-rating-star {
    cursor: pointer;
    line-height: 1;
    position: relative;
}
.af-rating-star input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.af-star {
    font-size: 30px;
    color: var(--af-border-strong);
    transition: color .1s ease;
}
.af-rating-star:hover .af-star,
.af-rating-star input:checked + .af-star,
.af-rating-star input:focus-visible + .af-star {
    color: var(--af-primary);
}

/* ---- Scale (numbered row) ------------------------------------------------- */

.af-scale {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.af-scale-row { display: flex; gap: 6px; flex-wrap: wrap; }
.af-scale-point { cursor: pointer; position: relative; }
.af-scale-point input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.af-scale-num {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    font-weight: 600;
    font-size: .875rem;
    transition: all .1s ease;
}
.af-scale-point:hover .af-scale-num { border-color: var(--af-primary); }
.af-scale-point input:checked + .af-scale-num {
    background: var(--af-primary);
    border-color: var(--af-primary);
    color: #fff;
}
.af-scale-point input:focus-visible + .af-scale-num { box-shadow: 0 0 0 3px var(--af-focus); }
.af-scale-minlabel,
.af-scale-maxlabel { font-size: .8125rem; color: var(--af-muted); }

/* ---- Matrix --------------------------------------------------------------- */

.af-matrix-wrap { overflow-x: auto; }
.af-matrix {
    border-collapse: collapse;
    width: 100%;
    font-size: .875rem;
}
.af-matrix th,
.af-matrix td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--af-border);
}
.af-matrix-row { text-align: left; font-weight: 500; }
.af-matrix-col { font-weight: 600; color: var(--af-muted); }
.af-matrix thead th { border-bottom: 2px solid var(--af-border-strong); }
.af-matrix input { accent-color: var(--af-primary); width: 18px; height: 18px; }

/* ---- Appointment ---------------------------------------------------------- */

.af-appointment { grid-template-columns: repeat(2, 1fr); }

/* ---- File upload ---------------------------------------------------------- */

.af-file-input {
    padding: 8px 12px;
    cursor: pointer;
}
.af-file-input::file-selector-button {
    font: inherit;
    margin-right: 12px;
    padding: 6px 12px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    background: var(--af-bg);
    color: var(--af-text);
    cursor: pointer;
}
.af-file-hint { margin: 4px 0 0; font-size: .75rem; color: var(--af-muted); }

.af-file-staged {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    gap: 6px;
}
.af-file-staged li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    background: var(--af-bg);
    font-size: .875rem;
}
.af-file-staged-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.af-file-staged-size { color: var(--af-muted); white-space: nowrap; }
.af-file-remove {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .8125rem;
    color: var(--af-muted);
    cursor: pointer;
    white-space: nowrap;
}
.af-file-remove input { accent-color: var(--af-primary); width: 15px; height: 15px; cursor: pointer; }

/* ---- Signature ------------------------------------------------------------ */

.af-signature-pad {
    height: 140px;
    border: 2px dashed var(--af-border-strong);
    border-radius: var(--af-radius);
    display: grid;
    place-items: center;
    background: var(--af-bg);
    touch-action: none;
}
.af-signature-hint { color: var(--af-muted); font-style: italic; }
.af-signature-img { max-width: 100%; max-height: 140px; display: block; }
.af-signature-clear {
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--af-muted);
    font: inherit;
    font-size: .8rem;
    text-decoration: underline;
    cursor: pointer;
}
.af-signature-clear:hover { color: var(--af-text); }

/* ---- Captcha (reCAPTCHA v3 — invisible, no widget) ------------------------- */

.af-captcha-note { margin: 0; font-size: .8125rem; color: var(--af-muted); }

/* ---- Products ------------------------------------------------------------- */

.af-products { display: flex; flex-direction: column; gap: 12px; }
.af-product {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
}
.af-product:hover { border-color: var(--af-border-strong); }
.af-product-select input { accent-color: var(--af-primary); width: 18px; height: 18px; }
.af-product-img {
    width: 56px; height: 56px;
    object-fit: cover;
    border-radius: var(--af-radius);
    flex: none;
}
.af-product-body { flex: 1; min-width: 0; }
.af-product-name { font-weight: 600; }
.af-product-desc { font-size: .8125rem; color: var(--af-muted); }
.af-product-price { font-weight: 600; color: var(--af-primary); margin-top: 4px; }
.af-product-qty { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.af-qty-input { width: 72px; }

/* ---- Display-only fields -------------------------------------------------- */

.af-heading-text { margin: 0; font-weight: 700; line-height: 1.25; }
.af-heading-1 .af-heading-text { font-size: 1.75rem; }
.af-heading-2 .af-heading-text { font-size: 1.375rem; }
.af-heading-3 .af-heading-text { font-size: 1.125rem; }
.af-heading-sub { margin: 4px 0 0; color: var(--af-muted); font-size: .9375rem; }

.af-paragraph { color: var(--af-text); }
.af-paragraph a { color: var(--af-primary); }

.af-image { margin: 0; }
.af-image img { max-width: 100%; height: auto; border-radius: var(--af-radius); display: block; }
.af-image-placeholder {
    height: 160px; display: grid; place-items: center;
    background: var(--af-bg); color: var(--af-muted);
    border: 1px dashed var(--af-border-strong); border-radius: var(--af-radius);
}
.af-image-caption { margin-top: 6px; font-size: .8125rem; color: var(--af-muted); text-align: center; }

.af-divider { border: none; border-top: 1px solid var(--af-border); margin: 8px 0; }

.af-section { padding-bottom: 4px; border-bottom: 2px solid var(--af-border); }
.af-section-title { margin: 0; font-size: 1.1875rem; font-weight: 700; }
.af-section-desc { margin: 4px 0 0; color: var(--af-muted); font-size: .9375rem; }

/* ---- Submit button + progress (host chrome) ------------------------------- */

.af-btn {
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--af-primary);
    border: none;
    border-radius: var(--af-btn-radius);
    padding: 12px 28px;
    cursor: pointer;
    transition: filter .12s ease, box-shadow .12s ease;
}
.af-btn:hover { filter: brightness(.94); }
.af-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--af-focus); }
.af-btn-secondary {
    color: var(--af-primary);
    background: transparent;
    border: 1px solid var(--af-border-strong);
}

.af-progress {
    height: 6px;
    background: var(--af-border);
    border-radius: 999px;
    overflow: hidden;
}
.af-progress-bar { height: 100%; background: var(--af-primary); border-radius: 999px; }

/* ---- Design mode (builder canvas) ----------------------------------------- */

.af-design .af-control {
    pointer-events: none;
    user-select: none;
}

/* ---- Logic-hidden / logic-disabled fields ---------------------------------- */

/* Toggled server-side (initial state) and by form-logic.js as answers change. */
.af-hidden { display: none !important; }

/* Disable action: still visible, dimmed, inputs carry the disabled attribute. */
.af-disabled { opacity: .6; }
.af-disabled .af-control { pointer-events: none; }

/* ---- Accessibility helper ------------------------------------------------- */

.af-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ---- Responsive ----------------------------------------------------------- */

@media (max-width: 640px) {
    .af-page { padding: 20px; border-radius: var(--af-radius); }

    /* Collapse all column spans to full width on small screens. */
    .af-grid > .af-field { grid-column: 1 / -1; }

    .af-subgrid,
    .af-subgrid-stack,
    .af-appointment { grid-template-columns: 1fr; }
    .af-subgrid .af-sub-grow,
    .af-subgrid .af-sub-narrow,
    .af-subgrid .af-sub-full { grid-column: 1 / -1; }

    .af-scale-num { width: 34px; height: 34px; }
    .af-star { font-size: 26px; }
}

/* language switcher (shared by all anota surfaces) */
.an-lang { display: inline-flex; align-items: center; gap: 2px; }
.an-lang-link, .an-lang-current {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 4px 7px;
    border-radius: 5px;
    text-decoration: none;
}
.an-lang-link { color: #94A3B8; }
.an-lang-link:hover { color: #16A385; background: rgba(22, 163, 133, .08); }
.an-lang-current { color: #16A385; background: rgba(22, 163, 133, .10); }

/* ---- Card layout (one question per full-screen card) ----
   Styled after Jotform Cards: a vivid theme-primary background, a white panel per question
   with the action button fused to its bottom edge as a full-width colored bar, fixed up/down
   pagers bottom-right, and a "page N of M" marker bottom-left. */

.af-form.cf-mode {
    background: linear-gradient(180deg,
        var(--af-primary) 0%,
        color-mix(in srgb, var(--af-primary) 86%, #04241c) 100%);
}

/* Thank-you / message states center their card on the background; the live form's .cf-card
   manages its own full-viewport layout. */
.af-form.cf-mode {
    display: grid;
    align-content: center;
    min-height: 100dvh;
    padding: 40px 16px;
}

.af-form.cf-mode:has(.cf-card) {
    display: block;
    padding: 0;
}

.cf-card {
    max-width: 700px;
    margin: 0 auto;
    /* Card mode has no panel/header above it (see PublicForm.razor's FormWrapperStyle) --
       .cf-card IS the full-viewport page, so size it to the dynamic viewport to avoid a
       scrollbar from the static 100vh including mobile browser chrome. */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 24px 96px;
    animation: cf-enter 480ms cubic-bezier(.16, 1, .3, 1);
}

@keyframes cf-enter {
    from { opacity: 0; transform: translateY(28px) scale(.985); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cf-card, .cf-done { animation: none; }
}

/* Slim progress rail across the top. */
.cf-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255, 255, 255, .22);
    z-index: 2;
}

.cf-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 12px rgba(255, 255, 255, .5);
    transition: width 300ms ease;
}

/* The white panel: question content + the fused action bar below it. */
.cf-panel {
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 20px 50px color-mix(in srgb, var(--af-primary) 35%, rgba(4, 24, 18, .55)),
        0 4px 14px rgba(4, 24, 18, .22);
}

.cf-card-body {
    background: var(--af-page);
    padding: 44px 48px 40px;
}

/* Jotform Cards signature action: a full-width primary bar fused to the card bottom. */
.cf-btn-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    font: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    background: var(--af-primary);
    border: none;
    padding: 18px 24px;
    cursor: pointer;
    transition: filter 140ms ease;
}

.cf-btn-bar:hover { filter: brightness(1.08); }
.cf-btn-bar:active { filter: brightness(.95); }

.cf-btn-bar:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -5px;
}

.cf-btn-arrow { font-size: 1.0625rem; }

/* Question number chip, "3 ->". */
.cf-qnum {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--af-primary);
    margin-bottom: 14px;
}

.cf-qnum-arrow { font-size: .875rem; opacity: .85; }

/* Card-scale typography: the one question deserves headline treatment. */
.cf-card-body .af-label {
    font-size: 1.4375rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.cf-card-body .af-help { font-size: 1rem; }

.cf-card-body .af-input {
    font-size: 1.125rem;
    padding: 14px 16px;
}

.cf-card-body .af-choice {
    font-size: 1.0625rem;
    padding: 14px 18px;
}

.cf-card-body .af-page-title,
.cf-card-body h1 { font-size: 2rem; line-height: 1.2; }

/* Welcome / statement cards read as a hero, not a form. */
.cf-card-body.cf-display {
    text-align: center;
    padding: 60px 56px 48px;
}

.cf-card-body.cf-display .af-label { font-size: 2rem; }

.cf-card-body.cf-display .af-heading-text { font-size: 2.25rem; line-height: 1.15; margin: 0 0 8px; }

.cf-card-body.cf-display .af-heading-sub,
.cf-card-body.cf-display .af-paragraph,
.cf-card-body.cf-display p { font-size: 1.1875rem; line-height: 1.6; color: var(--af-muted); }

.cf-card-body.cf-display .af-paragraph p { margin: 8px 0 0; }

/* Welcome card's "N questions" badge, like Jotform's counter. */
.cf-qcount {
    display: inline-block;
    margin-top: 18px;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--af-muted);
    background: color-mix(in srgb, var(--af-primary) 8%, var(--af-page));
    border: 1px solid color-mix(in srgb, var(--af-primary) 22%, transparent);
    border-radius: 999px;
    padding: 5px 14px;
}

/* Fixed pagers: joined up/down buttons bottom-right, page marker bottom-left. */
.cf-pager {
    position: fixed;
    right: 22px;
    bottom: 20px;
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(4, 24, 18, .3);
    z-index: 2;
}

.cf-pager-btn {
    width: 46px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--af-primary);
    background: #fff;
    border: none;
    cursor: pointer;
    transition: background 130ms ease;
}

.cf-pager-btn + .cf-pager-btn { border-left: 1px solid color-mix(in srgb, var(--af-primary) 18%, #e8eeec); }

.cf-pager-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--af-primary) 10%, #fff); }

.cf-pager-btn:disabled { color: #b9c6c2; cursor: default; }

.cf-pager-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.cf-pager-count {
    position: fixed;
    left: 24px;
    bottom: 30px;
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, .92);
    z-index: 2;
}

/* Card-mode thank-you: a celebration card on the same background. */
.cf-done {
    max-width: 560px;
    margin: 0 auto;
    background: var(--af-page);
    border-radius: 14px;
    padding: 64px 56px;
    text-align: center;
    box-shadow:
        0 20px 50px color-mix(in srgb, var(--af-primary) 35%, rgba(4, 24, 18, .55)),
        0 4px 14px rgba(4, 24, 18, .22);
    animation: cf-enter 480ms cubic-bezier(.16, 1, .3, 1);
}

.cf-done-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    background: var(--af-primary);
    border-radius: 50%;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--af-primary) 55%, transparent);
}

.cf-done-title { font-size: 2rem; margin: 0 0 10px; }

.cf-done-text { font-size: 1.125rem; color: var(--af-muted); margin: 0; }

/* Branding footer sits on the primary background in card mode - light-on-dark. */
.af-form.cf-mode .af-footer { padding-bottom: 24px; }
.af-form.cf-mode .af-footer p,
.af-form.cf-mode .af-footer div { color: rgba(255, 255, 255, .78); }
.af-form.cf-mode .af-footer a { color: #fff !important; }
.af-form.cf-mode .an-lang-link { color: rgba(255, 255, 255, .65); }
.af-form.cf-mode .an-lang-link:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.af-form.cf-mode .an-lang-current { color: #fff; background: rgba(255, 255, 255, .2); }

@media (max-width: 640px) {
    .cf-card { padding: 40px 14px 92px; }
    .cf-card-body { padding: 30px 22px 26px; }
    .cf-card-body.cf-display { padding: 42px 24px 34px; }
    .cf-card-body.cf-display .af-heading-text { font-size: 1.625rem; }
    .cf-pager { right: 14px; bottom: 14px; }
    .cf-pager-count { left: 16px; bottom: 24px; }
}
