/* SDCountdown — shared by the homepage and the dashboard. Loud on purpose:
   this is the last window to buy lifetime, and a student who misses it pays
   monthly forever. Theme-aware, and readable at 400px. */

.sd-countdown.sdc-hidden { display: none !important; }

.sd-countdown {
    --sdc-amber: #f59e0b;
    --sdc-amber-2: #fbbf24;
    display: block;
    background: linear-gradient(135deg, rgba(245,158,11,0.16) 0%, rgba(239,68,68,0.10) 100%);
    border: 1px solid rgba(245,158,11,0.5);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(245,158,11,0.14);
}

.sdc-inner { padding: 22px 24px; text-align: center; }
.sdc-inner.sdc-compact { padding: 16px 18px; }

.sdc-head {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 10px;
}
.sdc-eyebrow {
    font-size: 0.68rem; font-weight: 800; letter-spacing: 1.4px;
    text-transform: uppercase; color: var(--sdc-amber);
}
/* A live pulse, so the clock reads as running rather than as a printed date. */
.sdc-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #ef4444; flex-shrink: 0;
    animation: sdcPulse 1.6s ease-in-out infinite;
}
@keyframes sdcPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,0.55); }
    70%      { opacity: .75; box-shadow: 0 0 0 7px rgba(239,68,68,0); }
}
@media (prefers-reduced-motion: reduce) {
    .sdc-dot { animation: none; }
}

.sdc-headline {
    font-size: clamp(1.5rem, 5.5vw, 2.3rem);
    font-weight: 900; line-height: 1.12; letter-spacing: -0.02em;
    color: var(--bd-text, #f3efe7);
    margin-bottom: 4px;
}
.sdc-compact .sdc-headline { font-size: clamp(1.25rem, 5vw, 1.7rem); }

.sdc-clock {
    display: flex; justify-content: center; gap: 8px;
    margin: 14px 0 10px; flex-wrap: nowrap;
}
.sdc-unit {
    flex: 0 1 74px; min-width: 0;
    background: rgba(0,0,0,0.30);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 12px;
    padding: 9px 4px 7px;
}
.sdc-compact .sdc-unit { flex-basis: 64px; padding: 7px 3px 5px; }
.sdc-num {
    display: block;
    font-size: clamp(1.35rem, 5vw, 2rem); font-weight: 900; line-height: 1;
    color: var(--sdc-amber-2);
    font-variant-numeric: tabular-nums;
    /* Fixed-width digits: without this the whole row jitters every second. */
    font-feature-settings: "tnum";
}
.sdc-label {
    display: block; margin-top: 5px;
    font-size: 0.56rem; font-weight: 800; letter-spacing: 1.1px;
    text-transform: uppercase; color: rgba(var(--bd-text-rgb, 243,239,231), 0.6);
}

.sdc-sub {
    font-size: 0.88rem; line-height: 1.5;
    color: rgba(var(--bd-text-rgb, 243,239,231), 0.78);
    max-width: 44ch; margin: 0 auto;
}

.sdc-cta {
    margin-top: 14px;
    background: linear-gradient(135deg, var(--sdc-amber), #d97706);
    color: #0a0e16; border: none;
    padding: 13px 30px; border-radius: 50px;
    font-size: 1rem; font-weight: 800; font-family: inherit;
    cursor: pointer; box-shadow: 0 6px 25px rgba(245,158,11,0.35);
    transition: transform .18s ease;
}
.sdc-cta:hover { transform: translateY(-2px); }
.sdc-cta:active { transform: none; }

/* Light theme: the dark digit wells need inverting or they go muddy. */
[data-theme="light"] .sd-countdown {
    background: linear-gradient(135deg, rgba(245,158,11,0.14) 0%, rgba(239,68,68,0.07) 100%);
}
[data-theme="light"] .sdc-unit { background: rgba(255,255,255,0.72); }
[data-theme="light"] .sdc-num { color: #b45309; }
[data-theme="light"] .sdc-label { color: rgba(0,0,0,0.5); }
[data-theme="light"] .sdc-sub { color: rgba(0,0,0,0.65); }

@media (max-width: 420px) {
    .sdc-inner { padding: 18px 14px; }
    .sdc-clock { gap: 6px; }
    .sdc-unit { flex-basis: 0; flex-grow: 1; padding: 8px 2px 6px; }
    .sdc-label { font-size: 0.5rem; letter-spacing: 0.6px; }
}
