/* ═══════════════════════════════════════════════════════════════════════════
   PODCAST FUNNY — Studio CSS
   Palette tokens from app.css (Deep Navy + Violet + Cyan + Amber)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Studio Layout ──────────────────────────────────────────────────────── */
.studio-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-base);
}

/* ── Studio Header ──────────────────────────────────────────────────────── */
.studio-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 50;
}

.studio-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: .82rem;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: all var(--t);
}
.studio-back:hover {
  color: var(--violet-light);
  background: var(--violet-dim);
  text-decoration: none;
}

.studio-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.studio-brand { font-size: 1.25rem; flex-shrink: 0; }

.studio-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
  border-radius: var(--r-sm);
  padding: 3px 8px;
  transition: background var(--t), box-shadow var(--t);
}
.studio-title:focus {
  background: var(--bg-elevated);
  box-shadow: var(--violet-glow);
  white-space: normal;
  overflow: visible;
}

.studio-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.save-indicator {
  font-size: .75rem;
  color: var(--text-dim);
  transition: color .3s;
}
.save-indicator.saving { color: var(--amber); }
.save-indicator.error  { color: var(--danger); }

/* ── Episode Meta Bar ───────────────────────────────────────────────────── */
.studio-meta-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  font-size: .8rem;
}
.meta-spacer { flex: 1; }

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: border-color var(--t);
}
.meta-pill:hover { border-color: var(--violet); }

.meta-pill label {
  font-size: .62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.meta-pill input,
.meta-pill select {
  background: none;
  border: none;
  color: var(--text);
  font-size: .82rem;
  outline: none;
  min-width: 90px;
  font-family: inherit;
}
.meta-pill select { cursor: pointer; }

.meta-pill-info {
  border-style: dashed;
  color: var(--text-muted);
  font-size: .75rem;
}
.meta-pill-info span:nth-child(2) {
  color: var(--cyan);
  font-weight: 700;
}

.meta-shortcuts { color: var(--text-dim) !important; }
.meta-shortcuts span:nth-child(2) {
  color: var(--text-dim) !important;
  font-weight: 400 !important;
  font-size: .7rem;
}
@media (max-width: 900px) { .meta-shortcuts { display: none; } }

/* ── Studio Body ────────────────────────────────────────────────────────── */
.studio-body {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  overflow: hidden;
}
.panel-left  { border-right: 1px solid var(--border); }
.panel-right { border-left:  1px solid var(--border); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.panel-action {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: all var(--t);
}
.panel-action:hover {
  border-color: var(--violet);
  color: var(--violet-light);
  background: var(--violet-dim);
}

.panel-divider { height: 1px; background: var(--border); }
.panel-section { padding: 10px 14px; }

/* ── Panel Empty States ─────────────────────────────────────────────────── */
.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}
.panel-empty-icon  { font-size: 2.4rem; opacity: .4; }
.panel-empty-msg   { font-size: .85rem; font-weight: 600; color: var(--text); }
.panel-empty-hint  { font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; }
.panel-empty-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* Stage empty CTA */
.stage-empty-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}
.stage-empty-icon  { font-size: 3rem; opacity: .4; }
.stage-empty-title { font-size: 1rem; color: var(--text); }

/* ── Cast List ──────────────────────────────────────────────────────────── */
.cast-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cast-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t);
}
.cast-item:hover { border-color: var(--border-md); background: var(--bg-hover); }
.cast-item.active {
  border-color: var(--violet);
  background: var(--violet-dim);
  box-shadow: 0 0 0 1px rgba(245,130,10,.12);
}

.cast-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.cast-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cast-info { flex: 1; min-width: 0; }
.cast-name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-role { font-size: .7rem; color: var(--text-muted); }

.cast-position {
  font-size: .62rem;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--t);
  user-select: none;
  letter-spacing: .04em;
}
.cast-position:hover {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-color: var(--cyan);
}

.cast-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: .85rem;
  padding: 2px 4px;
  border-radius: var(--r-sm);
  transition: color var(--t);
}
.cast-remove:hover { color: var(--danger); }

/* ── Room Selector ──────────────────────────────────────────────────────── */
.room-selector { padding: 8px; }

.room-selected-card {
  padding: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t);
}
.room-selected-card:hover {
  border-color: var(--violet);
  box-shadow: 0 0 12px rgba(245,130,10,.15);
}
.room-selected-img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-bottom: 6px;
}
.room-selected-name { font-size: .82rem; font-weight: 600; }
.room-selected-light { font-size: .7rem; color: var(--cyan); }

.room-none {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  transition: color var(--t);
}
.room-none:hover { color: var(--violet-light); }

/* ── Select SM ──────────────────────────────────────────────────────────── */
.label-sm {
  font-size: .72rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: .04em;
}
.select-sm {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: .8rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.select-sm:focus {
  border-color: var(--violet);
  box-shadow: var(--violet-glow);
}

/* ── Stage ──────────────────────────────────────────────────────────────── */
.stage-wrap {
  display: flex;
  flex-direction: column;
  background: #050508;
  overflow: hidden;
}
.stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0a0a14 0%, #050508 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
}
.stage-empty-msg {
  color: var(--text-muted);
  font-size: .88rem;
  text-align: center;
  padding: 24px;
}

.stage-characters {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.stage-character {
  position: absolute;
  bottom: 0;
  height: 85%;
  object-fit: contain;
  transition: left .45s cubic-bezier(.4,0,.2,1), width .45s cubic-bezier(.4,0,.2,1);
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.7));
}
.stage-character.pos-left   { left: 8%; }
.stage-character.pos-center { left: 50%; transform: translateX(-50%); }
.stage-character.pos-right  { right: 8%; left: auto; }

.stage-char-placeholder {
  position: absolute;
  bottom: 0;
  height: 85%;
  width: 120px;
  background: var(--bg-elevated);
  border: 2px dashed var(--border-md);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: .75rem;
}
.stage-char-placeholder span { font-size: 2.5rem; opacity: .4; }

/* Camera overlay */
.stage-camera-overlay {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
  transition: all .5s ease;
  border-radius: 2px;
}
.stage-camera-overlay.show {
  border-color: rgba(245,130,10,.55);
  box-shadow: inset 0 0 0 1px rgba(245,130,10,.2),
              inset 0 0 40px rgba(245,130,10,.05);
}

.stage-shot-label {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8,8,16,.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-md);
  color: var(--violet-light);
  font-size: .68rem;
  padding: 3px 12px;
  border-radius: 99px;
  opacity: 0;
  transition: opacity .3s;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
}
.stage-shot-label.show { opacity: 1; }

/* Dialogue bar */
.stage-dialogue {
  padding: 12px 20px;
  background: rgba(8,8,16,.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dialogue-speaker {
  font-size: .68rem;
  font-weight: 800;
  color: var(--violet-light);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.dialogue-line {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.5;
}

/* ── Script Editor ──────────────────────────────────────────────────────── */
.script-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.script-beat {
  padding: 9px 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t);
  user-select: none;
}
.script-beat:hover   { border-color: var(--border-md); background: var(--bg-hover); }
.script-beat.active  {
  border-color: var(--violet);
  background: var(--violet-dim);
  box-shadow: 0 0 0 1px rgba(245,130,10,.12);
}
.script-beat.dragging       { opacity: .35; cursor: grabbing; }
.script-beat.drop-target    {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(90,141,224,.15);
}

.beat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.beat-num {
  font-size: .62rem;
  color: var(--text-dim);
  min-width: 18px;
  font-variant-numeric: tabular-nums;
}
.beat-speaker {
  font-size: .7rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .07em;
  flex: 1;
}
.beat-emotion {
  font-size: .62rem;
  padding: 1px 6px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t);
}
.beat-emotion:hover { border-color: var(--amber); color: var(--amber); }
.beat-shot-icon { font-size: .78rem; color: var(--text-muted); }

.beat-line {
  font-size: .82rem;
  color: var(--text);
  line-height: 1.45;
  outline: none;
}
.beat-line:focus { color: var(--text); }

.beat-actions {
  display: none;
  gap: 4px;
  margin-top: 7px;
}
.script-beat:hover .beat-actions,
.script-beat.active .beat-actions { display: flex; }

.beat-action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .68rem;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t);
}
.beat-action-btn:hover {
  border-color: var(--violet);
  color: var(--violet-light);
  background: var(--violet-dim);
}
.beat-delete { color: var(--danger) !important; }
.beat-delete:hover {
  border-color: var(--danger) !important;
  background: rgba(248,113,113,.08) !important;
  color: var(--danger) !important;
}

/* ── Beat speaker / shot click affordance ──────────────────────────────── */
.beat-speaker-btn {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color var(--t), color var(--t);
}
.beat-speaker-btn:hover {
  border-bottom-color: var(--cyan);
  color: var(--cyan-light);
}
.beat-shot-btn {
  cursor: pointer;
  padding: 1px 5px;
  border-radius: var(--r-sm);
  transition: background var(--t);
}
.beat-shot-btn:hover { background: var(--bg-surface); }

/* ── Speaker Picker Popover ─────────────────────────────────────────────── */
.speaker-menu {
  position: fixed;
  z-index: 400;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(245,130,10,.08);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.speaker-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all var(--t);
  width: 100%;
}
.speaker-menu-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-md);
}
.speaker-menu-item.active {
  border-color: var(--violet);
  background: var(--violet-dim);
}

.speaker-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  overflow: hidden;
}
.speaker-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }

.speaker-menu-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.speaker-menu-name { font-size: .82rem; font-weight: 600; }
.speaker-menu-role { font-size: .68rem; color: var(--text-muted); }

/* ── Flash hint ─────────────────────────────────────────────────────────── */
.flash-hint {
  position: fixed;
  z-index: 500;
  padding: 4px 12px;
  background: var(--danger);
  color: #fff;
  font-size: .72rem;
  border-radius: var(--r-sm);
  pointer-events: none;
  animation: hint-fade 1.5s ease forwards;
}
@keyframes hint-fade {
  0%   { opacity: 0; transform: translateY(4px); }
  10%  { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}

/* ── Timeline ───────────────────────────────────────────────────────────── */
.studio-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 14px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
.timeline-label {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  flex-shrink: 0;
}
.timeline-track {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  padding: 4px 0;
}
.timeline-beat {
  flex-shrink: 0;
  width: 44px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t);
  font-size: .62rem;
  color: var(--text-muted);
  gap: 2px;
}
.timeline-beat:hover { border-color: var(--violet); color: var(--violet-light); }
.timeline-beat.active {
  border-color: var(--violet);
  background: var(--violet-dim);
  color: var(--violet-light);
  box-shadow: 0 0 10px rgba(245,130,10,.2);
}
.tl-shot-icon { font-size: .92rem; }

.timeline-actions { flex-shrink: 0; }
.tl-btn {
  background: none;
  border: 1px solid var(--border-md);
  color: var(--text-muted);
  font-size: .75rem;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t);
  font-weight: 500;
}
.tl-btn:hover {
  border-color: var(--violet);
  color: var(--violet-light);
  background: var(--violet-dim);
}

/* ── Drawers ─────────────────────────────────────────────────────────────── */
.drawer {
  position: fixed;
  top: 54px;        /* header height */
  right: 0;
  bottom: 54px;     /* timeline height */
  width: 320px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-md);
  z-index: 150;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: drawer-in .2s cubic-bezier(.4,0,.2,1);
}
@keyframes drawer-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 600;
}
.drawer-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  transition: all var(--t);
}
.drawer-header button:hover { color: var(--text); background: var(--bg-elevated); }

.drawer-search { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.drawer-search input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: .85rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.drawer-search input:focus {
  border-color: var(--violet);
  box-shadow: var(--violet-glow);
}
.drawer-search input::placeholder { color: var(--text-muted); }

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.drawer-rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.drawer-char-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t);
}
.drawer-char-item:hover {
  border-color: var(--violet);
  background: var(--violet-dim);
}

.drawer-char-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
}
.drawer-char-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.drawer-char-name { font-size: .82rem; font-weight: 600; }
.drawer-char-role { font-size: .7rem; color: var(--text-muted); }

.drawer-room-item {
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t);
}
.drawer-room-item:hover {
  border-color: var(--violet);
  box-shadow: 0 0 12px rgba(245,130,10,.12);
}

.drawer-room-thumb {
  width: 100%;
  height: 68px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-bottom: 6px;
  background: var(--bg-surface);
}
.drawer-room-thumb-placeholder {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: .4;
}
.drawer-room-name  { font-size: .78rem; font-weight: 600; }
.drawer-room-light { font-size: .7rem; color: var(--cyan); }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(8,8,16,.4);
  backdrop-filter: blur(2px);
}

/* ── AI Loading State ───────────────────────────────────────────────────── */
@keyframes ai-pulse {
  0%, 100% { border-color: var(--violet); }
  50%       { border-color: var(--cyan); }
}
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: .65;
}
.btn-loading::after {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Video status chip (inside timeline) ────────────────────────────────── */
.tl-video-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 4px;
}

.vbar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border-bright);
}
.vbar-dot[data-status="pending"],
.vbar-dot[data-status="submitted"] {
  background: #f59e0b;
  animation: vbar-pulse 1.6s ease-in-out infinite;
}
.vbar-dot[data-status="processing"] {
  background: #38bdf8;
  animation: vbar-pulse 1s ease-in-out infinite;
}
.vbar-dot[data-status="completed"] { background: #22c55e; }
.vbar-dot[data-status="error"]     { background: #ef4444; }

@keyframes vbar-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

.tl-video-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
}

.vbar-provider {
  font-size: .7rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 7px;
}

.tl-btn-watch {
  border-color: #22c55e;
  color: #22c55e;
}
.tl-btn-watch:hover {
  border-color: #22c55e;
  background: rgba(34,197,94,.12);
  color: #22c55e;
}

/* ── Video modal ─────────────────────────────────────────────────────────── */
.modal-video {
  width: min(900px, 94vw);
}

.video-modal-body {
  padding: 0;
  max-height: none;
  overflow-y: visible;
  background: #000;
  border-radius: 0 0 var(--r-lg, 10px) var(--r-lg, 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.vmodal-video {
  width: 100%;
  max-height: 70vh;
  display: block;
  border-radius: 0;
}

/* ── Scrollbars ─────────────────────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--border-md) transparent; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }
