/* ============================================================
   BuildrLabs — cohort countdown banner
   Plain CSS on purpose. The theme's Tailwind bundle (redesign.css)
   is pre-compiled from the Lovable source, so any new utility class
   used here would silently have no rule behind it.

   HEIGHT CONTRACT
   ---------------
   The banner lives inside the fixed <header>, so it occupies no
   document flow. header.php prints .bl-cd-spacer right after
   </header> to reserve the space. Both read --bl-cd-h, so the
   banner and the spacer can never drift apart — change the height
   in ONE place (the media queries below) and both follow.
   ============================================================ */

:root {
    --bl-cd-h: 92px;      /* mobile: two rows */
    --bl-cd-bg: #202020;
    --bl-cd-line: rgba(255, 255, 255, 0.10);
}

@media (min-width: 768px) {
    :root { --bl-cd-h: 68px; }
}

/* ---------- The bar ---------- */

.bl-cd {
    height: var(--bl-cd-h);
    background-color: var(--bl-cd-bg);
    border-top: 1px solid var(--bl-cd-line);
    border-bottom: 1px solid var(--bl-cd-line);
    color: #fff;
    overflow: hidden;
}

.bl-cd__inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

/* The spacer that stands in for the banner in the document flow. Dark so it
   reads as part of the header rather than as a gap above the page. */
.bl-cd-spacer {
    height: var(--bl-cd-h);
    background-color: #1a1a1a;
}

/* The nav row is transparent until scroll (navbar.js). With a banner attached
   a see-through nav floating above a solid bar looks broken, so pin it dark.
   Higher specificity than navbar.js's utility class, same colour — no fight. */
#site-nav.bl-nav-has-banner {
    background-color: #1a1a1a;
}

/* ---------- Left: eyebrow ---------- */

.bl-cd__lead {
    display: none;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.bl-cd__mark {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background-color: var(--primary);
    /* Nods to the 5-block logo mark without shipping another asset. */
    clip-path: polygon(0 0, 55% 0, 55% 45%, 100% 45%, 100% 100%, 45% 100%, 45% 55%, 0 55%);
}

.bl-cd__eyebrow {
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    white-space: nowrap;
}

/* ---------- Middle: title ---------- */

.bl-cd__body {
    min-width: 0;
    flex: 1 1 auto;
}

.bl-cd__title {
    margin: 0;
    font-family: "Space Mono", ui-monospace, monospace;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.25;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-cd__sub {
    display: none;
    margin: 2px 0 0;
    font-size: 12.5px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.62);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Clock ---------- */

.bl-cd__clock {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    flex-shrink: 0;
}

.bl-cd__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 30px;
}

.bl-cd__num {
    font-family: "Space Mono", ui-monospace, monospace;
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.bl-cd__lbl {
    margin-top: 2px;
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.bl-cd__sep {
    font-family: "Space Mono", ui-monospace, monospace;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.28);
}

.bl-cd__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- Meta column ---------- */

.bl-cd__meta {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
    border-left: 1px solid var(--bl-cd-line);
    padding-left: 1.25rem;
}

.bl-cd__meta li {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-family: "Space Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    white-space: nowrap;
}

.bl-cd__meta li + li { margin-top: 3px; }
.bl-cd__meta svg { flex-shrink: 0; color: var(--primary); }

/* ---------- CTA ---------- */

.bl-cd__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-family: "Space Mono", ui-monospace, monospace;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.625rem 1.125rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.bl-cd__cta:hover {
    background-color: #fff;
    color: #1a1a1a;
    transform: translateY(-1px);
}

.bl-cd__cta:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ============================================================
   BREAKPOINTS
   Mobile is two rows: [eyebrow + title] / [clock ....... CTA].
   Each tier adds back a column as the width allows.
   ============================================================ */

/* Mobile: force the title onto its own row above the clock/CTA row. */
@media (max-width: 767px) {
    .bl-cd__inner { align-content: center; gap: 0.5rem; }
    .bl-cd__body { flex: 1 0 100%; }
    .bl-cd__title { font-size: 12px; white-space: normal; }
    .bl-cd__clock { flex: 1 1 auto; }
    .bl-cd__num { font-size: 15px; }
    .bl-cd__unit { min-width: 26px; }
    .bl-cd__cta { padding: 0.5rem 0.875rem; font-size: 10px; }
    .bl-cd__cta svg { display: none; }
}

/* Tablet: one row, but only title + clock + CTA. The eyebrow is deliberately
   held back until 1024px — squeezing it in at 768 truncates the programme
   name, and the name matters more than the date the countdown already implies. */
@media (min-width: 768px) {
    .bl-cd__inner { flex-wrap: nowrap; }
    .bl-cd__title { font-size: 14px; }
}

/* Room for the "Starts 22 August 2026" eyebrow and the strapline. */
@media (min-width: 1024px) {
    .bl-cd__lead { display: flex; }
    .bl-cd__lead::after {
        content: "";
        width: 1px;
        height: 26px;
        margin-left: 1.25rem;
        background-color: var(--bl-cd-line);
    }
    .bl-cd__sub { display: block; }
    .bl-cd__num { font-size: 18px; }
}

/* Widest tier: the schedule/price column from the design. */
@media (min-width: 1240px) {
    .bl-cd__meta { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .bl-cd__cta { transition: none; }
    .bl-cd__cta:hover { transform: none; }
}
