/* The IN, RUN and OUT cells of an /automation page, one at a time as slides (steps.js): a bar of their labels,
   kept under the top bar, and the cell shown slides across to the next, the page brought to its top. The cells keep
   their own look. */

.steps-bar{
  position:sticky; top:52px; z-index:15; margin-top:30px;
  display:flex; flex-wrap:wrap; align-items:center; padding:7px;
  background:rgba(14,19,32,.9); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  border:1px solid var(--border); border-radius:10px;
}
.steps-tabs{display:flex; gap:3px; flex:1; min-width:0; overflow-x:auto; scrollbar-width:none; justify-content:safe center;}
.steps-tabs::-webkit-scrollbar{display:none;}
.steps-tab{
  flex:none; display:inline-flex; align-items:baseline; gap:6px;
  font-family:var(--font-mono); font-size:12px; letter-spacing:.06em; white-space:nowrap;
  color:var(--teal); background:none; border:1px solid transparent; border-radius:6px; padding:5px 10px; cursor:pointer;
  transition:color .15s, background .15s, border-color .15s;
  position:relative;                                  /* its state in words (.sr-only) kept inside it, in the row that scrolls */
}
/* the step's short name beside its label, in the label's colour: what the step is, without hovering */
.steps-name{font-family:var(--font-body); font-size:12.5px; letter-spacing:0;}
.steps-tab:hover{background:var(--cell-hover);}
/* by where it is (steps.js): before the step shown, done (teal, ✓) or not done (amber, ○); the step shown, amber with
   its cell's mark; after it, dimmed and unmarked */
.steps-tab.later{color:var(--text-mute);}
.steps-tab.now, .steps-tab.undone{color:var(--amber);}
/* the step shown, once it is done: teal as the steps done before it, not amber */
.steps-tab.now.ok{color:var(--teal);}
/* each state a mark as well as a colour, drawn only: a screen reader hears the state in words (steps.js).
   ready (Build, ready to press) has its own, so it is not told from waiting by its colour alone. The glyphs are
   drawn as shapes (access.css), centred in the tab */
.steps-tab.need::after{content:"○"; content:"○" / "";}
.steps-tab.ok::after{content:"✓"; content:"✓" / "";}
.steps-tab.busy::after{content:"●"; content:"●" / "";}
.steps-tab.go::after{content:"▶"; content:"▶" / "";}
/* too many names for the bar: only the step shown keeps its name (steps.js) */
.steps-bar.tight .steps-tab:not([aria-selected="true"]) .steps-name{display:none;}
/* the line naming the step shown, on a phone only (where the names give way) */
.steps-now{display:none;}
@media (prefers-reduced-motion:no-preference){
  .steps-tab.busy::after{animation:blink .8s ease-in-out infinite alternate;}
}
.steps-tab[aria-selected="true"]{background:rgba(240,184,96,.08); border-color:var(--amber-dim);}
.steps-tab.now.ok[aria-selected="true"]{background:rgba(88,217,198,.08); border-color:var(--teal-dim);}

.steps-view{position:relative;}
/* the cell shown and its buttons; at least a screen tall less what is above it (steps.js), so the page can be brought
   to a short cell's top as to a long one's: the room under the buttons */
.steps-stage{margin-top:16px;}
/* in line with the cells' boxes, past the column their labels sit in */
.steps-bar, .steps-foot{margin-left:64px;}
.steps-view.moving{overflow:hidden;}
.steps-view > .cell{margin-top:0;}
.steps-view > .cell:focus-visible{outline-offset:6px; border-radius:12px;}   /* Tab from the bar: round the whole cell */
/* not the one shown: out of sight, but still laid out at full width, so what is drawn in it measures right */
.steps-view > .cell.step-off{position:absolute; top:0; left:0; right:0; visibility:hidden; pointer-events:none;}

.steps-foot{display:flex; justify-content:space-between; gap:12px; margin-top:16px;}
.steps-go{
  display:flex; flex-direction:column; gap:2px; max-width:48%; min-width:0; text-align:left;
  background:none; border:1px solid var(--border); border-radius:8px; padding:9px 14px; cursor:pointer; color:inherit;
  transition:border-color .15s, background .15s;
}
.steps-go:hover{border-color:var(--teal); background:rgba(88,217,198,.04);}
.steps-go.next{margin-left:auto; text-align:right; align-items:flex-end;}
.steps-go[hidden]{display:none;}
.steps-go .k{font-family:var(--font-mono); font-size:11.5px; color:var(--teal); letter-spacing:.06em;}
.steps-go .t{font-size:13px; color:var(--text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;}

/* on to the next step once the step shown is done (steps.js, feet()): teal and glowing. On to OUT once a build has
   finished, until it is gone to, two strokes go round its edge too, as round Build's in the walkthrough (sheet.css),
   in teal where Build's are green. With reduced motion it glows without breathing or strokes. */
.steps-go.glow{position:relative; border-color:var(--teal); background:rgba(88,217,198,.07); box-shadow:0 0 0 1px var(--teal-dim), 0 0 22px rgba(88,217,198,.4);}
.steps-go.glow:hover{border-color:#6EE5D2; background:rgba(88,217,198,.13);}
.steps-go.glow .k{color:var(--teal);}
.steps-go.glow .t{color:var(--text);}
.steps-go .build-trace rect{stroke:var(--teal); filter:drop-shadow(0 0 4px var(--teal));}
@media (prefers-reduced-motion:no-preference){
  .steps-go.glow{animation:steps-breathe 1.8s ease-in-out infinite alternate;}
}
@keyframes steps-breathe{from{box-shadow:0 0 0 1px var(--teal-dim), 0 0 10px rgba(88,217,198,.25)} to{box-shadow:0 0 0 1px var(--teal), 0 0 28px rgba(88,217,198,.55)}}
@media (prefers-reduced-motion:reduce){
  .steps-go .build-trace{display:none;}
}

@media(max-width:640px){
  .steps-bar, .steps-foot{margin-left:0;}
  .steps-bar{top:46px; margin-top:22px; padding:5px;}
  .steps-tab{font-size:11px; padding:4px 7px; gap:5px;}
  .steps-name{display:none;}
  .steps-tabs{flex-basis:100%;}                       /* a line of its own, the step's name on the next */
  .steps-now{display:block; flex-basis:100%; margin-top:3px; padding:0 6px 1px; text-align:center;
    font-size:12px; line-height:1.4; color:var(--text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .steps-stage{margin-top:12px;}
  .steps-go{padding:8px 11px;}
}
