/**
 * Day of Giving — Countdown component
 *
 * Reference: docs/day-of-giving.html (.countdown block, ~L253–289 + L382–388)
 * Tokens only — no hardcoded colors. Sizes scale via CSS custom properties
 * per variant.
 */

.hcs-dog-countdown {
    text-align: center;
    font-family: var(--hcs-font-display);
    color: var(--wp--preset--color--white);
}

.hcs-dog-countdown__units {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
}

.hcs-dog-countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: var(--cd-unit-min, 64px);
    gap: 0.5rem;
}
.hcs-dog-countdown__unit[hidden],
.hcs-dog-countdown__sep[hidden] { display: none; }

.hcs-dog-countdown__number {
    display: block;
    min-width: 100%;
    padding: 0.6rem 0.25rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--wp--preset--color--white);
    font-family: var(--hcs-font-display);
    font-weight: 500;
    font-size: var(--cd-number-size, 2.5rem);
    line-height: 1;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.hcs-dog-countdown__label {
    font-family: var(--hcs-font-display);
    font-weight: 500;
    font-size: var(--cd-label-size, 0.6875rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hcs-text-soft);
}

.hcs-dog-countdown__sep {
    align-self: flex-start;
    padding: 0.6rem 0;
    font-family: var(--hcs-font-display);
    font-weight: 500;
    font-size: var(--cd-number-size, 2.5rem);
    line-height: 1;
    color: var(--giving-amber);
    opacity: 0.65;
}

.hcs-dog-countdown__zero {
    margin: 0;
    padding: 0.5rem 0;
    font-family: var(--hcs-font-display);
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: var(--giving-orange);
}

/* Size variants — set custom props consumed by the rules above. */
.hcs-dog-countdown--sm {
    --cd-number-size: 1.5rem;
    --cd-label-size: 0.625rem;
    --cd-unit-min: 48px;
}

.hcs-dog-countdown--md {
    --cd-number-size: 2rem;
    --cd-label-size: 0.6875rem;
    --cd-unit-min: 56px;
}

.hcs-dog-countdown--lg {
    --cd-number-size: 3rem;
    --cd-label-size: 0.75rem;
    --cd-unit-min: 80px;
}

/* Light-context variant — for use inside light banners/popups. */
.hcs-dog-countdown--light .hcs-dog-countdown__number {
    background: var(--hcs-beige);
    color: var(--hcs-navy);
}

.hcs-dog-countdown--light .hcs-dog-countdown__label,
.hcs-dog-countdown--light .hcs-dog-countdown__sep {
    color: var(--hcs-text-muted);
}

/* Zero state — JS toggles the [hidden] attr on __zero and on __units. */
.hcs-dog-countdown__zero[hidden] {
    display: none;
}

.hcs-dog-countdown__units[hidden] {
    display: none;
}

/* Responsive tightening on narrow viewports. */
@media (max-width: 480px) {
    .hcs-dog-countdown__units {
        gap: 0.25rem;
    }

    .hcs-dog-countdown__number {
        padding: 0.5rem 0.2rem;
    }

    .hcs-dog-countdown__label {
        font-size: 0.625rem;
    }
}
