/* ==========================================================================
   Anniversary Factory design tokens
   Source: Claude Design "Anniversary Factory.dc.html" (carnival palette,
   2026-07 revision). Semantic names so they can be re-themed without
   touching component markup. Do not add a component-library or external
   font dependency here — see spec section 15.9.
   ========================================================================== */
:root {
    /* Color: surfaces */
    --color-bg-app: #1e0e36;
    --color-bg-app-gradient: radial-gradient(circle at 15% 10%, #3b1057 0%, #1e0e36 55%, #170a29 100%);
    --color-surface: #fffaf3;
    --color-surface-raised: #ffffff;
    /* Lilac tint used by chips, picker cells, back buttons and date chips (design #F5EEFB).
       Deliberately distinct from the pink "number card" gradient below — the design treats
       these as two different surfaces, so they are two tokens here rather than one overloaded
       one (they used to share --color-surface-hero-card). */
    --color-surface-tint: #f5eefb;
    /* Landing "1 000 000 000" number card only: pink→lilac gradient + dashed pink border. */
    --color-surface-hero-card: linear-gradient(135deg, #ffe1ee 0%, #f1e4ff 100%);
    --color-border-hero-card: #ff6fab;
    /* Hairline dividers, input borders and card outlines (design #F0E1F4). Was folded into
       --color-border-hero-card before; split out so the number card can keep its pink dashed
       border while everything else uses the neutral lilac hairline. */
    --color-border-subtle: #f0e1f4;

    /* Color: text */
    --color-text-primary: #241239;
    --color-text-secondary: #7a6e8c;
    --color-text-inverse: #fff9ef;
    --color-text-on-brand: #fff9ef;
    /* Dark ink used on the gold countdown pill (design #3D2600). */
    --color-on-gold: #3d2600;

    /* Color: brand + gradients */
    --color-brand-pink: #ff2e88;
    --color-brand-pink-dark: #c0116a;
    --color-brand-purple: #8b5cf6;
    /* Solid bottom "lip" under the chunky CTA (design box-shadow:0 4px 0 #8E0D4F). */
    --color-cta-lip: #8e0d4f;
    --gradient-brand-badge: linear-gradient(135deg, #ff2e88 0%, #8b5cf6 100%);
    --gradient-cta: linear-gradient(135deg, #ff2e88 0%, #c0116a 100%);
    --gradient-hero-result: linear-gradient(135deg, #ff2e88 0%, #8b5cf6 100%);

    /* Color: accents (carnival confetti) */
    --color-accent-gold: #ffc53d;
    --color-accent-teal: #00c2b3;
    --color-accent-coral: #ff6b35;
    --color-accent-blue: #2e9bff;

    /* Color: light icon-badge tints, one per accent above — used by the "Who or what is
       this about?" subject-structure cards (spec 11.6). Paired 1:1 with an accent color
       for the glyph itself: pink/purple are the two brand colors, the rest reuse the
       confetti accents so no new hues were introduced for this screen. Values match the
       per-subject tints in the Claude Design (SUBJECTS[].tint). */
    --color-icon-bg-pink: #ffe1ee;
    --color-icon-bg-purple: #ede4ff;
    --color-icon-bg-coral: #ffe6da;
    --color-icon-bg-teal: #d8f5f0;
    --color-icon-bg-gold: #fff3d6;
    --color-icon-bg-blue: #e1f0ff;

    /* Typography */
    --font-body: -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    --font-number: ui-monospace, "Cascadia Code", "Consolas", "SFMono-Regular", Menlo, monospace;
    /* Landing headline (design 34px). Sub-screen headings ("Who or what…", "Add the date")
       are smaller in the design (22px) — see --font-size-screen-heading. */
    --font-size-hero-heading: 2.125rem;
    --font-size-screen-heading: 1.375rem;
    --font-size-hero-number: 1.9rem;
    --line-height-tight: 1.2;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;

    /* Radii + elevation */
    --radius-card: 16px;
    --radius-button: 14px;
    --radius-badge: 10px;
    /* Hard 4px offset, no blur — the "chunky candy button" lip from the Claude Design
       (box-shadow:0 4px 0 #8E0D4F), not a soft drop shadow. */
    --shadow-cta: 0 4px 0 var(--color-cta-lip);
    --shadow-card: 0 1px 2px rgba(30, 27, 41, 0.04);

    /* Motion */
    --motion-duration-fast: 150ms;
    --motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);

    color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --motion-duration-fast: 0ms;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-primary);
    background: var(--color-bg-app-gradient);
}

/* ==========================================================================
   Shared global classes
   Blazor CSS isolation (.razor.css) scopes rules to the component that
   defines them. These classes are deliberately used from more than one
   screen in AnniversaryFactory.UI (brand badge/wordmark, primary CTA,
   flex spacer), so they live here instead of being duplicated per
   component. Screen-specific classes stay in each component's own
   .razor.css — do not add single-screen styles to this file.
   ========================================================================== */
.hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-badge);
    background: var(--gradient-brand-badge);
    color: var(--color-text-on-brand);
    font-weight: 700;
    font-size: 0.85rem;
}

.hero__wordmark {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.hero__spacer {
    flex: 1;
    min-height: var(--space-8);
}

.hero__cta {
    appearance: none;
    border: none;
    cursor: pointer;
    width: 100%;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-button);
    background: var(--gradient-cta);
    color: var(--color-text-on-brand);
    font-size: 1.0625rem;
    font-weight: 700;
    /* The chunky "candy button" from the Claude Design: a solid 4px lip directly under the
       button (no blur), so it reads as a physical, pressable slab. */
    box-shadow: var(--shadow-cta);
    transition: transform var(--motion-duration-fast) var(--motion-easing-standard),
                box-shadow var(--motion-duration-fast) var(--motion-easing-standard);
    min-height: 44px;
}

.hero__cta:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--color-cta-lip);
}

.hero__cta:focus-visible {
    outline: 3px solid var(--color-brand-purple);
    outline-offset: 2px;
}

/* Date-picker sheets (YearPickerSheet, MonthPickerSheet, DayPickerSheet). These three
   components are siblings, not parent/child, so their shared "picker-*" classes have to
   live here rather than in one component's scoped .razor.css — same reasoning as the
   hero__* classes above. See spec section 11.9. */
.picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.picker-chip {
    appearance: none;
    cursor: pointer;
    border: none;
    padding: var(--space-2) var(--space-4);
    border-radius: 999px;
    background: var(--color-surface-tint);
    color: var(--color-text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 36px;
}

/* Selected picker chips/cells and the voice toggle use flat brand pink in the design, not
   the CTA gradient — the gradient is reserved for the big action buttons. */
.picker-chip--selected {
    background: var(--color-brand-pink);
    color: var(--color-text-on-brand);
}

.picker-subtitle {
    margin: 0 0 var(--space-3);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-1);
    margin-bottom: var(--space-2);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.picker-grid {
    display: grid;
    gap: var(--space-2);
}

.picker-grid--years,
.picker-grid--days {
    grid-template-columns: repeat(4, 1fr);
}

.picker-grid--days {
    grid-template-columns: repeat(7, 1fr);
}

.picker-grid--months {
    grid-template-columns: repeat(3, 1fr);
}

.picker-cell {
    appearance: none;
    cursor: pointer;
    border: none;
    min-height: 44px;
    border-radius: var(--radius-button);
    background: var(--color-surface-tint);
    color: var(--color-text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.picker-grid--days .picker-cell {
    min-height: 40px;
    font-weight: 600;
    font-size: 0.85rem;
}

.picker-cell--selected {
    background: var(--color-brand-pink);
    color: var(--color-text-on-brand);
}

.picker-cell--empty {
    background: transparent;
}

.picker-cell:focus-visible {
    outline: 3px solid var(--color-brand-purple);
    outline-offset: 2px;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxp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zI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}