/* Birthday Countdown Calculator - light & dark theme */

.bg-subtle-grid-indigo {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
}

html.dark .bg-subtle-grid-indigo {
    background-image:
        linear-gradient(to right, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
}

/* Card surface */
.bday-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(228, 228, 231, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

html.dark .bday-card {
    background: rgba(14, 14, 20, 0.92);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
}

@media (max-width: 767px) {
    .bday-card,
    html.dark .bday-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* iOS zooms into inputs below 16px */
#bday-workspace select,
#bday-workspace input {
    font-size: 16px;
}

#dob-year::-webkit-inner-spin-button,
#dob-year::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#dob-year {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Progress ring */
.bday-ring {
    transition: stroke-dashoffset 0.6s ease;
}

/* Ticker boxes */
.bday-tick {
    padding: 0.625rem 0.375rem;
    border-radius: 0.875rem;
    background: rgba(244, 244, 245, 0.85);
    border: 1px solid rgba(228, 228, 231, 0.9);
    transition: all 0.2s ease;
}

html.dark .bday-tick {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.bday-tick:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.35);
}

.bday-tick--secs {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.25);
}

html.dark .bday-tick--secs {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}

/* Fact and stat tiles */
.bday-fact,
.bday-stat {
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(244, 244, 245, 0.7);
    border: 1px solid rgba(228, 228, 231, 0.95);
}

html.dark .bday-fact,
html.dark .bday-stat {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.07);
}

.bday-fact dt,
.bday-stat dt {
    font-size: 0.75rem;
    font-weight: 600;
    color: #71717a;
}

.bday-fact dd {
    margin-top: 0.125rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #18181b;
}

.bday-stat {
    display: flex;
    flex-direction: column-reverse;
}

.bday-stat dd {
    font-size: 1.125rem;
    font-weight: 800;
    color: #18181b;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

html.dark .bday-fact dt,
html.dark .bday-stat dt {
    color: #a1a1aa;
}

html.dark .bday-fact dd,
html.dark .bday-stat dd {
    color: #ffffff;
}

/* Desktop: the result column spans every row so the left cards stack without gaps */
@media (min-width: 1024px) {
    .bday-results-column {
        grid-column: 8 / span 5;
        grid-row: 1 / span 12;
        align-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bday-ring {
        transition: none;
    }
}
