/* Studio layout, round 2: one settings section at a time, a variant strip under the preview, a fullscreen
   preview, and a phone layout that leaves room for the settings. Loaded after the other studio styles. */

/* ───────── settings: one section at a time (the tabs switch it) ───────── */
.st-panel[data-view] .st-sec:not(.is-view) { display: none; }
.st-panel[data-view] .st-sec { border-bottom: 0; }
.st-panel[data-view] .st-sec-head { display: none; }
.st-panel[data-view] .st-sec .st-sec-body { grid-template-rows: 1fr; }
.st-panel[data-view] .st-sec .st-sec-inner { opacity: 1; padding-top: 14px; gap: 8px; }
.st-panel[data-view] #collapseAll { display: none; }
.st-panel[data-view] .st-sec.is-view { animation: st-view-in .18s var(--ease) both; }
@keyframes st-view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.st-tab[aria-current="true"] { color: var(--text); }
.st-tab[aria-current="true"] i { color: var(--accent); }

/* ───────── the variant strip under the preview ───────── */
.st-varbar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-varbar[hidden] { display: none; }
.st-varbar .vb-l { flex: none; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.st-varbar .vb-list { display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px; scrollbar-width: none; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.st-varbar .vb-list::-webkit-scrollbar { display: none; }
.vb-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 8px; border-radius: var(--r-pill, 999px); border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font: 500 12.5px/1 var(--font-ui); white-space: nowrap; cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast); }
.vb-chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.vb-chip:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; }
.vb-chip[aria-checked="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.vb-chip .sw { display: inline-flex; }
.vb-chip .sw i { width: 12px; height: 12px; border-radius: 50%; margin-left: -4px; box-shadow: 0 0 0 1.5px var(--panel); }
.vb-chip .sw i:first-child { margin-left: 0; }

/* ───────── fullscreen preview ───────── */
.st-viewer { position: relative; }
.st-fs-fab { display: none; position: absolute; top: 12px; right: 12px; z-index: 6; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(5, 8, 10, .62); color: #fff; font-size: 17px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; }
.st-fs-ctl { display: none; }
.st-viewer.is-fs { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; min-height: 0; background: #000; display: grid; grid-template-rows: minmax(0, 1fr); }
.st-viewer.is-fs .st-vbar, .st-viewer.is-fs .st-vstats, .st-viewer.is-fs .st-fs-fab { display: none; }
.st-viewer.is-fs .st-canvas-wrap { height: 100%; padding: 0; cursor: pointer; }
.st-viewer.is-fs .st-safe { display: none; }
.st-viewer.is-fs .st-fs-ctl { display: flex; position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(10, 12, 14, .66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.st-fs-play, .st-fs-close { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 18px; cursor: pointer; }
.st-fs-play { background: var(--accent); color: var(--accent-ink, #05080a); }
.st-fs-close { background: rgba(255, 255, 255, .08); }
.st-fs-tc { min-width: 92px; text-align: center; font-size: 14px; color: #e8ecee; }
body.st-fs-lock { overflow: hidden; }

/* ───────── desktop: the dock gets the variant strip on top ───────── */
.st-dock { row-gap: 8px; }

/* ───────── phones & small tablets ───────── */
@media (max-width: 860px) {
  .st-fs-fab { display: flex; }
  .st-viewer { height: 28svh; min-height: 196px; }
  .st-canvas-wrap { padding: 6px 0 2px; }
  .st-dock { padding: 0 12px 8px; gap: 6px; }
  .st-varbar .vb-l { display: none; }
  .st-varbar .vb-list { margin-right: -12px; padding-right: 12px; }
  .vb-chip { height: 32px; }
  .st-transport { height: 40px; }
  .st-play { width: 34px; height: 34px; }
  .st-tl { height: 40px; }
  .st-tab { height: 44px; }
  .st-panel[data-view] .st-sec .st-sec-inner { padding-top: 12px; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .st-viewer { height: 24svh; min-height: 160px; }
}

/* ───────── Video tab: the file with a small picture, and the video looks as tiles ───────── */
.st-vinfo .st-vpic { width: 40px; height: 40px; flex: none; border-radius: 6px; box-shadow: 0 0 0 1px var(--line-2); }
.st-vlooks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.st-vlook { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 0; text-align: left; color: var(--muted); cursor: pointer; }
.st-vlook .im { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--panel); box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow var(--t-fast); }
.st-vlook .im img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-vlook b { margin-top: 4px; font: 500 12.5px/1.2 var(--font-ui); color: var(--text); }
.st-vlook .mono { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.st-vlook:hover .im { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, var(--line-2)); }
.st-vlook[aria-checked="true"] .im { box-shadow: 0 0 0 2px var(--accent); }
.st-vlook:focus-visible { outline: none; }
.st-vlook:focus-visible .im { box-shadow: 0 0 0 2px var(--focus, var(--accent)); }

/* ───────── setting labels: long names wrap onto a second line instead of being cut off ───────── */
.st-row .st-lab { white-space: normal; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-overflow: clip; overflow-wrap: break-word; }
