/* =====================================================================
 * components/admission-flow.css — admission timeline process bar.
 *
 * Mobile (<768px): vertical stack. Each step is a single row,
 * "● Feb 2026 — Registration opens". The em-dash separator is a
 * ::after pseudo on the date (dropped at >=768px).
 *
 * Desktop (>=768px): flex-row, equal-width steps (flex:1), dot at top,
 * date below, label below that — all centered. A hairline ::before on
 * the row passes through the dot centres, spanning from the centre of
 * the first step to the centre of the last (left/right: 12.5% — half
 * the width of one step on each side, for a 4-step bar). Dots sit at
 * z-index 1 so the hairline appears to "touch" the dot edges and
 * disappear behind them.
 *
 * Moved out of pages/programs.css (was unscoped, sitting on a
 * page-only sheet) into a shared component so both the Programs
 * Overview and the country pages can render it. No hex literals.
 * ===================================================================== */

.programs-admission-flow {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.programs-admission-flow__step {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.programs-admission-flow__dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: var(--radius-pill);
    background-color: var(--color-primary);
    flex-shrink: 0;
}

.programs-admission-flow__date {
    margin: 0;
    font-weight: var(--fw-semibold);
    color: var(--color-text);
}

.programs-admission-flow__date::after {
    content: " — ";
    color: var(--color-text-muted);
    font-weight: var(--fw-regular);
}

.programs-admission-flow__label {
    margin: 0;
    color: var(--color-text-muted);
}

@media (min-width: 768px) {
    .programs-admission-flow {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        gap: var(--space-4);
        /* Top padding so the hairline (anchored at top: 0.5rem of the
         * dot zone) has breathing room above the dot row. */
        padding-block-start: var(--space-2);
    }

    /* Connector hairline through dot centres. Each of the four steps
     * is flex:1 (equal width), with the dot centered horizontally;
     * dot centres therefore land at 12.5%, 37.5%, 62.5%, 87.5% of the
     * row. The hairline spans from the first dot's centre to the last.
     * Vertical position aligns with the dot centre (0.5rem from top of
     * step content, plus the row's top padding). */
    .programs-admission-flow::before {
        content: "";
        position: absolute;
        top: calc(var(--space-2) + 0.5rem);
        left: 12.5%;
        right: 12.5%;
        height: 1px;
        background-color: color-mix(in srgb, var(--color-ink) 15%, transparent);
        z-index: 0;
    }

    .programs-admission-flow__step {
        flex: 1;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-3);
    }

    .programs-admission-flow__dot {
        width: 1rem;
        height: 1rem;
        position: relative;
        z-index: 1;
    }

    .programs-admission-flow__date {
        margin-top: var(--space-1);
        font-size: var(--fs-md);
    }

    /* Drop the em-dash separator on desktop — the column layout makes
     * the date and label visually distinct without it. */
    .programs-admission-flow__date::after {
        content: "";
    }

    .programs-admission-flow__label {
        font-size: var(--fs-sm);
        max-width: 18ch;
        line-height: var(--lh-normal);
    }
}
