/* ═══════════════════════════════════════════════════════════════════════════
   The studios' loading card (R-183). Driven by assets/js/bh-studio-load.js (BHStudioLoad), shared by Beat Studio and Vocal Studio.

   A small flat card in the studio's empty space (under its transport bar, or at its foot; the window's foot when it has no anchor): one row per thing that is loading, its name, what is true of it now (a size, a count, a
   share, or just "Loading"), and under the row a 2px line only when the load really knows how far it is. Flat on purpose: one solid
   fill, no gradient, no shine, no spinner, nothing that moves unless a number moved. It takes no touch: the studio under it is
   already usable, and the card only says what is still on its way.
   Appended to <body>, outside #main, so the theme's #main p / #main h1-h4 rules do not reach it (it uses no p or heading anyway).
   ═══════════════════════════════════════════════════════════════════════════ */
.bh-sl{
  position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom,0px));
  z-index:9000; max-width:360px; margin:0 auto; box-sizing:border-box;
  padding:10px 14px; border:1px solid rgba(255,255,255,.10); border-radius:12px;
  background:#0b0d13; color:rgba(244,246,249,.86);
  font-size:13px; line-height:1.3; font-weight:500; letter-spacing:normal; text-transform:none;
  /* (a sans, not the studio's own face: inside Beat Studio that one is a monospace) */
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  pointer-events:none;
  opacity:0; visibility:hidden; transform:translateY(6px);
  transition:opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
/* Anchored (BHStudioLoad.anchor): under a transport bar, on the empty canvas, or in the flow at the foot of the studio. It covers no control. */
.bh-sl.bh-sl--below{ position:absolute; right:auto; bottom:auto; margin:0; }
.bh-sl.bh-sl--end{ position:relative; left:auto; right:auto; bottom:auto; margin:12px auto 0; width:calc(100% - 24px); }
.bh-sl.is-in{ opacity:1; visibility:visible; transform:none; transition:opacity .2s ease, transform .2s ease, visibility 0s; }
.bh-sl *{ box-sizing:border-box; }
.bh-sl-list{ display:flex; flex-direction:column; gap:8px; }
.bh-sl-row{ position:relative; display:flex; align-items:baseline; gap:12px; padding-bottom:6px; }
.bh-sl-name{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:rgba(244,246,249,.86); }
.bh-sl-det{ flex:0 0 auto; color:rgba(244,246,249,.6); font-variant-numeric:tabular-nums; white-space:nowrap; }
.bh-sl-row[data-state="loading"] .bh-sl-det{ color:#22b6ff; }
.bh-sl-row[data-state="failed"] .bh-sl-det{ color:#ff8a8a; }
.bh-sl-row[data-state="waiting"] .bh-sl-name{ color:rgba(244,246,249,.6); }
.bh-sl-bar{ position:absolute; left:0; right:0; bottom:0; height:2px; border-radius:1px; background:rgba(255,255,255,.10); overflow:hidden; }
.bh-sl-bar[hidden]{ display:none; }
.bh-sl-bar i{ display:block; height:100%; width:0; background:#22b6ff; transition:width .2s linear; }
/* A failed part is the one row that takes a touch: its own "Try again". */
.bh-sl-retry{
  flex:0 0 auto; pointer-events:auto; margin:0; padding:2px 0; border:0; background:none;
  font:inherit; font-weight:600; color:#22b6ff; cursor:pointer; text-decoration:underline; text-underline-offset:2px;
}
.bh-sl-retry[hidden]{ display:none; }
.bh-sl-row[data-state="failed"]{ padding-bottom:0; }
.bh-sl-sr{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (prefers-reduced-motion: reduce){
  .bh-sl, .bh-sl.is-in{ transition:none; transform:none; }
  .bh-sl-bar i{ transition:none; }
}
