/* Planner flow: tab status badges and the "Next:" line (race-steps.js), the
   compact live ticker (race-ticker.js) and the plan summary's Hide/Show
   (deltas.js). Theme tokens only. */

/* ---------- tab badges ---------- */
.tb-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    vertical-align: 1px;
    color: var(--text-4);
}
.tb-badge.is-done { color: var(--accent); }
.tb-badge.is-need { background: var(--warn); color: var(--ink); }
.tb-badge.is-live { color: var(--accent); animation: tb-pulse 1.6s ease-in-out infinite; }
@keyframes tb-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tb-badge.is-live { animation: none; } }
/* The Alerts tab (alerts.js): the count on the tab, one row a warning. */
.tb-badge.al-count[hidden] { display: none; }
.al-list { list-style: none; margin: 8px 0; padding: 0; }
.al-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin: 0 0 8px; padding: 10px 12px;
    border: 1px solid var(--warn); border-left-width: 4px; border-radius: 8px; background: var(--warn-dim); }
.al-row.is-safety { border-color: var(--crit); background: var(--crit-dim); }
.al-text { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.al-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.al-ignored .al-row { opacity: .75; }
.al-none { color: var(--text-2); }
/* Read out with the tab name, not shown. */
.tb-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- next step, one line ---------- */
.rs-next {
    margin: 0;
    font-size: var(--fs-small);
    color: var(--text-3);
    overflow-wrap: anywhere;
}
.rs-next[hidden] { display: none; }
.rs-next-k { color: var(--text-4); }
.rs-next .rs-go,
.rs-next .rs-watch {
    min-height: 0;
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}
.rs-next .rs-go { color: var(--accent); font-weight: 650; text-decoration: underline; }
.rs-next .rs-go.is-need { color: var(--warn); }
.rs-next .rs-go.is-need + .rs-why { color: var(--warn); }
.rs-next .rs-watch { margin-left: var(--s1); color: var(--text-3); text-decoration: underline; }
.rs-next .rs-go:hover, .rs-next .rs-watch:hover { color: var(--text); }
.rs-next button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- live ticker: one compact line ---------- */
.race-ticker { height: 28px; }
body.has-race-ticker #app { padding-top: 32px; }
body.is-embed.has-race-ticker #app { padding-top: 0; }
body.has-race-ticker:not(.split-on) #tab0 .plan-jump { top: 28px; }
body.split-on.has-race-ticker .top-bar { top: 28px; }
.race-ticker .ticker-item { padding: 0 10px; }
/* Pace detail lives on the Race tab; here it is where the car is and what is left. */
.race-ticker .ticker-item:has([data-tk="last"]),
.race-ticker .ticker-item:has([data-tk="avg5"]),
.race-ticker .ticker-item:has([data-tk="best"]) { display: none; }
@media (max-width: 600px) {
    .race-ticker .ticker-item { padding: 0 7px; gap: 4px; }
    .race-ticker .ticker-item:has([data-tk="gap"]),
    .race-ticker .ticker-item:has([data-tk="lap"]) { display: none; }
}

