/* ---------- the studio bar's styling, in one place ----------
   Linked by the signed-in Studio and by the public listening page a share
   link opens, so the two transports cannot drift apart. Its markup is in
   the file beside this one.

   Depends on the host page providing the palette tokens it uses
   (--cream, --dim, --gray, --sans, --gold, --line2) — both pages do.
   ============================================================ */

/* ============================================================
   THE STUDIO BAR
   Approved design, 2026-08-25 (artifact 6e1aacb5). One bar for
   whatever is playing, wherever it was started from.

   It is a flex sibling of `.dashcanvas`, not an overlay. The canvas
   carries `flex:1` inside `#dashSection`, so the bar claiming its own
   height is exactly what pulls every node up — the founder's "other
   nodes will move around and adjust upward". A fixed-position bar
   would have sat on top of the bottom row instead.
   ============================================================ */
@keyframes omPop{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* `position:relative` and a z-index above the board's own furniture: the
   popups open *upward*, over the canvas, and the Ask-TUTTI card is pinned
   inside it at z-index 30 — so without this the queue opened behind it. */
.stbar{flex:none;position:relative;z-index:40;
  background:#121110;border-top:1px solid #22211e;
  padding:12px 16px;color:var(--cream);font-family:var(--sans);
  border-radius:0 0 16px 16px}
/* Full bleed on the Studio tab, where the canvas loses its own corners. */
.studiofull .stbar{border-radius:0}
.stbar-row{display:flex;align-items:center;gap:18px}

/* ---- who is playing ---- */
.stbar-id{display:flex;align-items:center;gap:11px;width:258px;flex:none;min-width:0}
.stbar-art{width:44px;height:44px;border-radius:7px;flex:none;
  background:linear-gradient(145deg,#d8893c,#59322d 60%,#151928) center/cover no-repeat}
.stbar-name{flex:1;min-width:0}
.stbar-kicker{font:500 9px var(--sans);letter-spacing:.16em;color:var(--dim);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase}
.stbar-title{font-size:13.5px;font-weight:560;margin-top:4px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---- transport ---- */
.stbar-transport{display:flex;align-items:center;gap:6px;flex:none}
.stbtn{width:32px;height:32px;display:grid;place-items:center;border:0;
  border-radius:8px;background:none;color:#a49c92;cursor:pointer;padding:0;
  transition:background-color .14s ease,color .14s ease}
.stbtn:hover{background:#1d1a17;color:var(--cream)}
.stbtn svg{display:block}
#stPrev,#stNext{color:#e6dfd4}
.stbtn-play{width:36px;height:36px;color:var(--cream)}
.stbtn-sm{width:24px;height:24px;border-radius:6px}
/* Which glyph the play button wears is a fact about `audio.paused`, said
   once here rather than by rewriting the button's markup on every tick. */
.stbtn-play .sticon-pause{display:none}
.stbar.playing .stbtn-play .sticon-play{display:none}
.stbar.playing .stbtn-play .sticon-pause{display:block}
#stLoop.on{background:#1d1a17;color:#c9a45c}

/* ---- the clocks and the wave ---- */
.stbar-clock{font:500 11.5px var(--sans);font-variant-numeric:tabular-nums;
  color:#8a837a;flex:none;width:34px;text-align:right}
.stbar-clock-end{text-align:left}
/* `touch-action:none` so a scrub on a touch screen is a scrub and not the
   page scrolling out from under it — the gesture is horizontal and so is the
   thing it would otherwise trigger. `col-resize` rather than `pointer`: this
   is a position along a line, and the cursor should say so before the press
   rather than after it. */
.stbar-wave{position:relative;flex:1;min-width:0;height:48px;cursor:col-resize;
  touch-action:none}
.stbar-wave.scrubbing{cursor:grabbing}
/* The head thickens while it is being carried, so the thing under the hand is
   the thing that looks held. */
.stbar-wave.scrubbing .stbar-head{width:2px;box-shadow:0 0 8px rgba(242,237,230,.5)}
.stbar-wave canvas{display:block;width:100%;height:48px}
.stbar-wave:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:4px}
.stbar-head{position:absolute;top:0;bottom:0;left:0;width:1px;
  background:var(--cream);pointer-events:none}

/* ---- the four tools ---- */
.stbar-tools{display:flex;align-items:center;gap:4px;flex:none}
.stbar-hold{position:relative;display:flex}
.stbtn-ver{width:auto;height:32px;padding:0 9px;display:flex;align-items:center;gap:7px}
.stbtn-ver span{font:560 12.5px var(--sans);font-variant-numeric:tabular-nums;
  color:var(--stver,#c9a45c)}
.stbtn-ver svg{color:var(--stver,#c9a45c)}
.stbtn.on{background:#1d1a17;color:var(--cream)}

/* ---- the popups ---- */
.stpop{position:absolute;bottom:calc(100% + 12px);right:0;z-index:22;
  background:#161412;border:1px solid #22211e;border-radius:12px;padding:8px;
  box-shadow:0 22px 50px rgba(0,0,0,.6);animation:omPop .16s ease both}
/* Was `left:0;right:0` — the sheet spanned the whole seek bar, which on a
   wide window is most of the screen for four short rows, and it stretched
   every version's waveform to match (founder, 2026-08-25: "too long").
   It is as wide as its contents need and no wider, anchored to the right
   where the button that opens it is. */
.stpop-versions{left:auto;right:0;bottom:calc(100% + 14px);width:460px;
  max-width:min(460px,calc(100vw - 32px))}
.stpop-notes{width:300px;padding:12px}
.stpop-queue{width:308px}
.stpop-vol{width:184px;padding:13px}
.stpopkick{display:flex;align-items:center;gap:8px;padding:6px 8px 8px;
  font:500 9px var(--sans);letter-spacing:.16em;color:var(--dim);
  text-transform:uppercase}
.stpopkick b{margin-left:auto;font:500 10.5px var(--sans);
  font-variant-numeric:tabular-nums;color:#55504a;letter-spacing:0}

/* ---- one version, with its own wave ---- */
.stver{display:flex;align-items:center;gap:11px;padding:9px 8px;border-radius:9px;
  background:none;border:0;width:100%;text-align:left;cursor:pointer;
  transition:background-color .14s ease}
.stver:hover{background:#1e1b18}
.stver.on{background:#1d1a17}
.stverdot{flex:none;width:5px;height:5px;border-radius:50%;background:var(--hue)}
/* The name takes what is left rather than a fixed 104px. A version is named
   after the file it came out of — "In Mind_DEMO_STEMS Stereo Out" — and 104px
   held about a third of that. */
.stvercol{flex:1;min-width:0}
/* `display:block` is the whole fix for the founder's overlapping drawer
   (2026-08-25). This is a `<span>`, and `overflow`/`text-overflow` do
   nothing to an inline box — so the name did not clip at its column, it ran
   straight on underneath the waveform beside it. Nothing was wrong with the
   waveform; it was being painted over a name that should have ended. */
.stvername{display:block;font-size:12.5px;color:#c8c1b7;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.stver.on .stvername{color:var(--cream)}
.stvermeta{display:block;font:500 10px var(--sans);
  font-variant-numeric:tabular-nums;color:var(--dim);margin-top:3px}
/* 200 × 28, the size its bars are laid out for. Not `flex:1`: a flexed box
   is whatever width is left over, and the drawing inside it was stretched to
   fill that. Fixed here and flexible on the name, which is the way round
   that matters — a waveform reads the same at any length, a truncated
   filename does not. */
.stverwave{flex:none;width:200px;height:28px;fill:var(--hue);fill-opacity:.65}
.stver.on .stverwave{fill-opacity:1}
/* Always occupies its 13px, marked or not. Rendering it only on the current
   version made that row's name column 24px narrower than its neighbours, so
   the waveforms beside them started at different places down the sheet —
   which reads as three drawings that do not line up rather than one list. */
.stvermark{flex:none;width:13px;height:13px;display:flex;
  align-items:center;justify-content:center;color:var(--hue)}

/* ---- notes ---- */
.stnote{display:block;width:100%;box-sizing:border-box;margin-top:10px;
  border:1px solid #221f1b;border-radius:10px;outline:0;resize:none;
  background:#1a1714;color:#e6dfd4;font:400 12.5px/21px var(--sans);
  padding:10px 11px;height:104px}
.stnote:focus{border-color:var(--line2)}
.stnotefoot{display:flex;align-items:center;gap:7px;margin-top:9px;
  font-size:11px;color:var(--dim)}

/* ---- queue ---- */
.stqscroll{max-height:236px;overflow-y:auto}
.stq{display:flex;align-items:center;gap:10px;padding:8px;border-radius:9px;
  background:none;border:0;width:100%;text-align:left;cursor:pointer;
  transition:background-color .14s ease}
.stq:hover{background:#1e1b18}
.stq.on{background:#1d1a17}
.stqn{flex:none;width:16px;font:500 10.5px var(--sans);
  font-variant-numeric:tabular-nums;color:#55504a}
.stq.on .stqn{color:#c9a45c}
.stqcol{flex:1;min-width:0}
.stqname{font-size:12.5px;color:#c8c1b7;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.stq.on .stqname{color:var(--cream)}
.stqmeta{font:500 10px var(--sans);font-variant-numeric:tabular-nums;
  color:var(--dim);margin-top:3px}
.stqmark{flex:none;color:#c9a45c}
.stquiet{display:block;padding:10px 8px;font-size:12px;color:var(--dim)}

/* ---- volume ---- */
.stvol{display:flex;align-items:center;gap:9px}
.stvolrange{flex:1;min-width:0;accent-color:var(--gold);height:3px}
.stvolnum{font:500 11px var(--sans);font-variant-numeric:tabular-nums;
  color:#8a837a;flex:none;width:26px;text-align:right}

/* A narrow window drops the identity column and the clocks before it drops
   a control — the transport is the reason the bar is there. */
@media(max-width:1180px){
  .stbar-id{width:180px}
}
@media(max-width:900px){
  .stbar-row{gap:12px}
  .stbar-id{display:none}
  .stbar-clock{display:none}
}
@media(prefers-reduced-motion:reduce){
  .stpop{animation:none}
  .stbtn{transition:none}
}
.stnotemore{margin-left:auto;border:0;background:none;padding:0;cursor:pointer;
  font:500 11px var(--sans);color:var(--gold);white-space:nowrap}
.stnotemore:hover{text-decoration:underline}

/* ---- a picked part ----
   The song list's own marker, and `.mxpart` needs `position:relative` for it:
   the ::before edge is positioned, and without a positioned parent it hangs
   off whichever ancestor happens to have one. */
.mxpart{position:relative}
.mxpart.picked{background:rgba(124,192,136,.08)}
.mxpart.picked::before{content:"";position:absolute;left:0;top:6px;bottom:6px;
  width:2px;border-radius:2px;background:#7cc088}
.mxpart.picked .mxparticon{color:#7cc088}
body.carrying-many .mxpart.picked::after{content:var(--carry-count);
  position:absolute;right:6px;top:50%;transform:translateY(-50%);
  font:600 9px var(--mono);color:#7cc088}
/* The stems bar carries a Delete the songs' bar does not: a part has no
   right-click stack to reach the verb through, so the bar is the door. */
.mxpickdel{border:0;background:none;cursor:pointer;padding:0;
  font:500 11.5px var(--sans);color:#d6584a}
.mxpickdel:hover{text-decoration:underline}

/* An upload that was already here. Not a failure — it is the state the
   person wanted, reached before they asked — so it wears the quiet colour
   rather than the red one, and gets no Retry. */
.uprow.already .upstate{color:var(--gray)}
.upsame{font-size:11.5px;color:var(--gray);padding:0 0 6px 0}


/* ---- the same bar, fewer permissions ----
   The public listening page wears `.stbar.listening`. A listener has no
   business with two of these: which mix is the record is the artist's
   decision, not their audience's, and the notes sheet is the artist's own
   page about their own song. Hidden rather than shipped as a second markup,
   so there is one transport with two permissions instead of two transports.

   `display:none`, not disabled: a control somebody cannot use is better
   absent than present and dead. */
/* The listening page has no board for the bar to be a sibling of. It is
   appended to the body of an ordinary scrolling page, so `position:relative`
   left it wherever the tracklist happened to end — halfway up the window on
   a two-track release, which is exactly where it was found (founder,
   2026-08-25). Pinned to the foot of the window instead; `.page` already
   keeps 150px of room under its content for it. */
.stbar.listening{position:fixed;left:0;right:0;bottom:0;z-index:60;
  border-radius:0;
  background:rgba(18,17,16,.94);
  backdrop-filter:blur(22px) saturate(1.1);
  -webkit-backdrop-filter:blur(22px) saturate(1.1)}
.stbar.listening #stVersions,
.stbar.listening #stNotes{display:none}
/* Its own hold collapses with it, or the gap it kept stays behind. */
.stbar.listening .stbar-hold:has(#stNotes){display:none}
