/* ---- The speed trainer's steps (2 Dec 2026) ----
   Founder: "on ramp up, we need a visual that shows where we're at". One segment per step,
   from the start percent to the stop, under the trainer's settings: done steps full, the one
   sounding filling bar by bar, tinted by its phase (count-in lighter, the break grey). Before
   Start it is the plan, every segment empty. A progress bar you can't click, so pills.
   Drawn by renderTrainerSteps in metronome-tool.js; the rule is trainerProgress in
   metronome-modes.js. */
@layer components {
  .av-trainer-steps {
    display: flex;
    gap: 3px;
    margin: 2px 0 4px;
  }

  .av-trainer-steps:empty {
    display: none;
  }

  .av-trainer-steps__seg {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .av-trainer-steps__seg > i {
    position: relative;
    display: block;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
    overflow: hidden;
  }

  .av-trainer-steps__seg > i::after {
    content: "";
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform: scaleX(var(--fill, 0));
    background: var(--av-accent);
    transition: transform 240ms linear;
  }

  .av-trainer-steps__seg > b {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: rgba(15, 23, 42, 0.55);
    white-space: nowrap;
  }

  .av-trainer-steps__seg.is-current > b {
    color: var(--av-ink);
    font-weight: 800;
  }

  .av-trainer-steps.is-many .av-trainer-steps__seg:not(.is-edge):not(.is-current) > b {
    visibility: hidden;
  }

  .av-trainer-steps[data-phase="count"] .is-current > i::after {
    background: #8fd0d4;
  }

  .av-trainer-steps[data-phase="rest"] .is-current > i::after {
    background: rgba(15, 23, 42, 0.35);
  }

  @media (prefers-reduced-motion: reduce) {
    .av-trainer-steps__seg > i::after {
      transition: none;
    }
  }
}
