/* ═══════════════════════════════════════
   WORKBENCH CUTSCENES — a cutscene's Shots sub-tab
   (WorkbenchStoryboardShots.js, markup in WorkbenchStoryboardShotTemplates.js
   and WorkbenchStoryboardShotCard.js)
   ═══════════════════════════════════════ */

/* ── The surface fills its slot and scrolls inside it ── */
.wbsb-surface {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

/* ── A heading with its summary or buttons beside it ── */
.wbsb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── The shot list ── */
.wbsb-ord {
  width: 28px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.wbsb-shot {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.wbsb-thumb {
  flex: none;
  width: 96px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-tertiary);
}

.wbsb-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wbsb-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wbsb-line {
  color: var(--text-secondary);
  font-size: 12.5px;
}

.wbsb-warn {
  color: var(--amber);
  font-size: 12px;
}

.wbsb-sync {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.wbsb-media,
.wbsb-acts {
  white-space: nowrap;
}

.wbsb-acts {
  text-align: right;
}

.wbsb-acts .wb-btn + .wb-btn {
  margin-left: 6px;
}

/* ── The timeline: one bar per shot, the clip solid, held frame hatched ── */
.wbsb-timeline {
  display: flex;
  height: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wbsb-bar {
  position: relative;
  border-right: 1px solid var(--border);
  background: repeating-linear-gradient(
    45deg,
    var(--bg-tertiary) 0 4px,
    var(--bg-hover) 4px 8px
  );
}

.wbsb-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  background: var(--accent);
  opacity: 0.55;
}

.wbsb-bar span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-primary);
}

/* ── The shot editor ── */
/* A fieldset only so a read-only tier, or a save in flight, disables every
   input at once — it draws nothing itself. */
.wbsb-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* The still, clickable to open the image editor, and the empty plates. */
.wbsb-still {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 8px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-tertiary);
  cursor: pointer;
}

.wbsb-still:disabled {
  cursor: default;
}

.wbsb-still:hover:not(:disabled) {
  border-color: var(--accent);
}

.wbsb-still img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wbsb-still.none {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  cursor: default;
}

.wbsb-media-el {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  border-radius: var(--radius);
}

/* ── The sync ruler: video against voice, the held part hatched ── */
.wbsb-ruler {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.wbsb-ruler-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.wbsb-track {
  display: flex;
  height: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-tertiary);
}

.wbsb-track i {
  display: block;
}

.wbsb-clip {
  background: var(--accent);
}

.wbsb-voice {
  background: var(--green);
}

.wbsb-held {
  display: block;
  background: repeating-linear-gradient(
    45deg,
    var(--amber-dim) 0 4px,
    var(--amber) 4px 8px
  );
}
