/* spec_lr_road_1124 — the road and the firefly in every run panel (guide: The road;
   Motion and the pulse rule). The panel's track (<id>-track) is the road; its old
   fill and waiting stripe are hidden here, so app.css and its tests keep them. */

.progress-container .lr-road-track {
    position: relative;
    height: 48px;
    margin-bottom: 52px;
    overflow: visible;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--gold) 45%, transparent) 50%, transparent 0) center / 14px 2px repeat-x,
        var(--night);
}
.progress-container .lr-road-track::after { display: none; }
.progress-container .lr-road-track > .progress-bar-fill { display: none; }

.lr-road { position: absolute; inset: 0; --lr-pad: 28px; }
.lr-road__trail {
    position: absolute;
    left: 0;
    top: 50%;
    height: 8px;
    transform: translateY(-50%);
    width: calc(var(--lr-pad) + (100% - 2 * var(--lr-pad)) * var(--x, 0));
    border-radius: var(--radius-xl);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 55%, transparent));
    transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lr-road__lamps { position: absolute; inset: 0; }
.lr-road__step {
    position: absolute;
    top: 50%;
    left: calc(var(--lr-pad) + (100% - 2 * var(--lr-pad)) * var(--p, 1));
    transform: translate(-50%, -50%);
    line-height: 0;
}
.lr-road__label {
    position: absolute;
    top: calc(100% + 26px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 104px;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-secondary);
    text-align: center;
    white-space: normal;
}
.lr-road__note { display: block; font-weight: 400; color: var(--text-muted); }
.lr-road__step--passed .lr-road__label { color: var(--text-muted); }
.lr-road__fly {
    position: absolute;
    top: 50%;
    left: calc(var(--lr-pad) + (100% - 2 * var(--lr-pad)) * var(--x, 0));
    transform: translate(-50%, -100%);
    line-height: 0;
    transition: left 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lr-road__fly .lr-firefly { width: 30px; height: 22px; }
.lr-road__fly .lr-wing { fill: var(--mist); }
.lr-road__fly.is-gone { display: none; }
/* spec_lookfix_1128 — a run that failed or was cancelled: the firefly stays where it was, its tail red */
.lr-road__fly.is-stopped .lr-tail { fill: var(--fault); filter: drop-shadow(0 0 4px var(--fault)); }

/* the nav's running mark (pulse rule: the nav dot) */
.lr-nav-running {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    font-size: 11px;
    color: var(--glow);
}
.lr-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-round);
    background: var(--gold);
    animation: lr-lamp-pulse 1.6s ease-in-out infinite;
}

/* every animation stops under reduced motion */
@media (prefers-reduced-motion: reduce) {
    .lr-road__fly, .lr-road__trail { transition: none; }
    .lr-nav-dot { animation: none; }
}
