/* The builder's dark shell v2 (2026-09-07) — loaded ONLY by
   /occasions/create + /occasions/thanks (EN + ES twins), activated by
   body.occ-shell-dark. occasions.css is NEVER edited for this: 20+
   storefront/unsubscribe pages share it (the occasions-home.css:3
   collision warning) — everything here rides the body-class scope.

   v2 after the founder's walk: v1 made the WHOLE form the light paper,
   which still read as a web page. Now the INTERIOR is dark like every app
   screen, and the light "card paper" belongs to the one thing that IS a
   card: the live preview demo (.occ-demo stays white by design).
   Requires tokens.css (loaded first on both pages). */

body.occ-shell-dark {
    background: var(--color-bg, #1A1A1A);
    color: var(--color-text-primary, #FFFFFF);
}

/* The dark app bar: back arrow + context title */
body.occ-shell-dark .occ-app-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--color-bg, #1A1A1A);
    color: var(--color-text-primary, #FFFFFF);
}
/* The platform back button (option B, founder-picked 2026-09-07): a bare
   white SVG arrow, no chrome — the padding/negative-margin pair keeps a
   44px tap target without disturbing the bar geometry. Keep in step with
   .kiln-back-btn and .pp-back-btn (the one standard, three stylesheets). */
body.occ-shell-dark .occ-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: -10px 0 -10px -10px;
    color: var(--color-text-primary, #FFFFFF);
    text-decoration: none;
    flex-shrink: 0;
}
body.occ-shell-dark .occ-app-bar-title {
    font-weight: 700;
    font-size: 16px;
}

/* ---- The dark interior: re-derive the builder chrome on the app ground.
   The live preview (.occ-demo) is deliberately NOT touched — it is the
   card, and it stays light paper. ---- */

body.occ-shell-dark main.occ-page {
    background: transparent;
    color: var(--color-text-primary, #FFFFFF);
}
body.occ-shell-dark .occ-page h1,
body.occ-shell-dark .occ-step-title,
body.occ-shell-dark .occ-step-card .occ-preview h2,
body.occ-shell-dark .occ-invite-title {
    color: var(--color-text-primary, #FFFFFF);
}
body.occ-shell-dark .occ-eyebrow { color: var(--color-accent, #FF6B6B); }
body.occ-shell-dark .occ-lede,
body.occ-shell-dark .occ-hint,
body.occ-shell-dark .occ-preview-sub,
body.occ-shell-dark .occ-wiz-count,
body.occ-shell-dark .occ-share .occ-share-sub,
body.occ-shell-dark .occ-repeat-row,
body.occ-shell-dark .occ-empty {
    color: var(--color-text-secondary, #A0A0A0);
}
body.occ-shell-dark .occ-status { color: var(--color-text-secondary, #A0A0A0); }
body.occ-shell-dark .occ-status.error { color: var(--color-accent, #FF6B6B); }
body.occ-shell-dark .occ-page a { color: var(--color-accent, #FF6B6B); }

/* Cards and panels -> app surfaces */
body.occ-shell-dark .occ-step-card,
body.occ-shell-dark .occ-share,
body.occ-shell-dark .occ-invite,
body.occ-shell-dark .occ-card {
    background: var(--color-surface, #252525);
    border-color: var(--color-border, #333333);
    color: var(--color-text-primary, #FFFFFF);
}

/* Inputs (name, message, date, code, share link...) -> dark fields.
   Blanket on purpose: every input in the builder should read app-dark;
   the display-only .occ-demo contains no inputs. */
body.occ-shell-dark .occ-page input:not([type='file']):not([type='checkbox']),
body.occ-shell-dark .occ-page textarea,
body.occ-shell-dark .occ-page select {
    background: #1E1E1E;
    border-color: var(--color-border, #333333);
    color: var(--color-text-primary, #FFFFFF);
}
body.occ-shell-dark .occ-page input::placeholder,
body.occ-shell-dark .occ-page textarea::placeholder {
    color: #77777E;
}
body.occ-shell-dark .occ-field label { color: var(--color-text-primary, #FFFFFF); }

/* Relationship chips: the home-sheet idiom */
body.occ-shell-dark .occ-rel-chip {
    background: #1E1E1E;
    border-color: var(--color-border, #333333);
    color: #DDDDDD;
}
body.occ-shell-dark .occ-rel-chip.active {
    background: var(--color-accent, #FF6B6B);
    border-color: var(--color-accent, #FF6B6B);
    color: #FFFFFF;
}
body.occ-shell-dark .occ-rel-line,
body.occ-shell-dark .occ-rel-caret { color: var(--color-text-secondary, #A0A0A0); }
body.occ-shell-dark .occ-rel-line-chip {
    background: var(--color-accent, #FF6B6B);
    border-color: var(--color-accent, #FF6B6B);
    color: #FFFFFF;
}

/* Upload dropzone + progress */
body.occ-shell-dark .occ-file-label,
body.occ-shell-dark .occ-step-card .occ-file-label {
    background: #1E1E1E;
    border-color: var(--color-border, #333333);
    color: var(--color-text-primary, #FFFFFF);
}
body.occ-shell-dark .occ-progress {
    background: #1E1E1E;
    border-color: var(--color-border, #333333);
}

/* Wizard dots on the dark ground (active/done coral rules keep winning) */
body.occ-shell-dark .occ-wiz-dot { background: var(--color-border, #333333); }

/* Quiet buttons: dark-outline variant (coral primaries stay as they are) */
body.occ-shell-dark .occ-btn-quiet {
    color: var(--color-text-primary, #FFFFFF);
    border-color: #444444;
    background: transparent;
}
/* ...EXCEPT inside the light card preview: .occ-demo is the one light island
   (a white quiet button vanished there — "Seal it again", founder-caught
   2026-09-08). Restore the storefront ink inside the island. */
body.occ-shell-dark .occ-demo .occ-btn-quiet {
    color: var(--occ-coral-ink, #D64545);
    border-color: var(--occ-border, #E8E2DB);
}

/* Footer: quiet dark legal links (they STAY at the point of sale) */
body.occ-shell-dark .occ-footer,
body.occ-shell-dark .occ-footer a {
    color: var(--color-text-secondary, #A0A0A0);
    background: transparent;
}

/* ---- The embedded payment sheet (create page only) ----
   The sheet interior stays light: it is Stripe's payment paper. */
.occ-pay-sheet-overlay[hidden] { display: none !important; }
.occ-pay-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
}
.occ-pay-sheet {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 18px 18px 0 0;
    padding: 46px 10px 16px;
}
@media (min-width: 560px) {
    .occ-pay-sheet-overlay { align-items: center; }
    .occ-pay-sheet { border-radius: 18px; }
}
.occ-pay-sheet-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #E8E2DB;
    background: #FFFFFF;
    color: #1A1A1A;
    font-size: 14px;
    cursor: pointer;
}
#occ-pay-sheet-body { min-height: 320px; }

/* ---- The minimal signup pane + guest-build chrome (2026-09-08; visual
   pass 2026-09-09 — the fields read as thin browser defaults because the
   shape kit only covered input[type=text]; occasions.css now shapes every
   field type, and this block finishes the pane on the dark ground). ---- */

/* Native widgets (date picker, checkbox) render dark with the shell */
body.occ-shell-dark { color-scheme: dark; }

/* One visible focus treatment for every builder field (keyboard + touch) */
body.occ-shell-dark .occ-page input:not([type='file']):not([type='checkbox']):focus,
body.occ-shell-dark .occ-page textarea:focus {
    outline: none;
    border-color: var(--color-accent, #FF6B6B);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.25);
}

#occ-signup { padding: 20px 18px 16px; }
#occ-signup .occ-step-title { margin: 0 0 4px; }
#occ-signup .occ-aside-lede {
    color: var(--color-text-secondary, #A0A0A0);
    font-size: 14px;
    margin: 0 0 18px;
}
#occ-signup .occ-field { margin: 0 0 14px; }
#occ-signup .occ-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0 0 6px;
}
#occ-signup .occ-hint {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-secondary, #A0A0A0);
}
#occ-signup .occ-btn { width: 100%; }
#occ-signup .occ-center { margin: 10px 0 0; }

.occ-su-pw-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.occ-su-pw-row input { flex: 1; min-width: 0; }
.occ-su-pw-toggle {
    flex-shrink: 0;
    min-width: 64px;
    padding: 0 14px;
    border: 1px solid var(--color-border, #333333);
    border-radius: 12px;
    background: #1E1E1E;
    color: var(--color-text-secondary, #A0A0A0);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.occ-su-pw-toggle:focus-visible {
    outline: 2px solid var(--color-accent, #FF6B6B);
    outline-offset: 2px;
}

/* The agreement row: a real tappable row, not a floating checkbox */
.occ-su-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 16px;
    padding: 12px 14px;
    background: #1E1E1E;
    border: 1px solid var(--color-border, #333333);
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}
.occ-su-check input {
    margin: 1px 0 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent, #FF6B6B);
}

/* The 6-digit code reads like a code */
#occ-su-code {
    text-align: center;
    letter-spacing: 0.3em;
    font-size: 22px;
    font-weight: 700;
}

#occ-signup .occ-linklike { font-size: 0.85rem; }

/* Restore banner: quiet card, one coral action */
.occ-restore { text-align: center; }
.occ-restore-title { font-weight: 700; margin: 0 0 4px; }
