/* Song to Video (/video): the Studio's editor frame (studio-edit.css) with a
   song lane + a video lane on the left and the live preview above the tabs
   on the right. Only the video-specific parts live here. */

/* left: the lanes */
.mv-tl[hidden] { display: none; }
.mv-lane { min-height: 0; }
.mv-th { cursor: default; gap: 6px; }
.mv-th-sub { font-size: 11.5px; color: var(--text-faint); line-height: 1.4; }
.mv-lane-c { position: relative; flex: 1; min-width: 0; padding: 12px 18px 12px 14px; }
.mv-wave { position: relative; height: 68px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); overflow: hidden; touch-action: none; cursor: pointer; }
.mv-wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mv-win {
  position: absolute; top: 0; bottom: 0; left: 0; border-radius: 10px; cursor: grab;
  border: 2px solid var(--accent-hi); background: rgba(233, 168, 58, 0.16); box-shadow: 0 0 0 9999px rgba(10, 11, 15, 0.55);
}
.mv-win:active { cursor: grabbing; }
.mv-win.full { cursor: default; }
.mv-win span { position: absolute; top: 4px; left: 6px; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px #000; white-space: nowrap; }
.mv-head, .mv-vhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.8); pointer-events: none; z-index: 2; }
.mv-head[hidden] { display: none; }
.mv-vhead { top: 8px; bottom: 8px; }
.mv-ruler-row { position: static; }
.mv-ruler-pad { position: static; font-size: 11.5px; font-weight: 700; color: var(--text-faint); }
.mv-ruler { flex: 1; min-width: 0; height: 34px; margin: 0 18px 0 14px; }
.mv-lane-v .mv-lane-c { padding-top: 8px; padding-bottom: 8px; }
#mv-scenes { display: block; width: 100%; height: 118px; cursor: pointer; }
.mv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 18px 0 234px; font-size: 11.5px; color: var(--text-faint); }
.mv-legend .mv-beat { color: #8b93ac; }

/* right: the preview on top */
.mv-side { grid-template-rows: minmax(220px, 50%) minmax(0, 1fr); }
.mv-stagebox { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 14px; border-bottom: 1px solid var(--border-soft);
  background: radial-gradient(circle at 50% 45%, rgba(233, 168, 58, 0.08), transparent 65%); }
.mv-screen {
  position: relative; flex-shrink: 0; width: 200px; height: 356px; border-radius: 16px; overflow: hidden; background: #000;
  border: 1px solid rgba(233, 168, 58, 0.3); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.9), 0 0 50px -20px rgba(233, 168, 58, 0.25);
}
.mv-screen[data-size="wide"] { border-radius: 12px; }
.mv-screen canvas, .mv-screen video { position: absolute; inset: 0; width: 100%; height: 100%; }
.mv-screen video { background: #000; }
.mv-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; color: var(--text-faint); font-size: 13px; }
.mv-empty svg { width: 34px; height: 34px; color: var(--accent-hi); }
.mv-empty[hidden] { display: none; }

/* tabs: the pictures, the words */
.mv-src { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mv-src button {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.02); color: var(--text); font: inherit;
}
.mv-src button b { font-size: 13px; }
.mv-src button span { font-size: 11.5px; color: var(--text-faint); line-height: 1.4; }
.mv-src button:hover { border-color: rgba(233, 168, 58, 0.5); }
.mv-src button.on { border-color: var(--accent); background: rgba(233, 168, 58, 0.12); box-shadow: inset 0 0 0 1px var(--accent); }
.mv-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.mv-thumb { position: relative; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.mv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mv-thumb.off { opacity: .35; }
.mv-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.mv-addph {
  width: 58px; height: 58px; border-radius: 10px; border: 1.5px dashed rgba(233, 168, 58, 0.5); background: rgba(233, 168, 58, 0.05);
  color: var(--accent-hi); font: inherit; font-size: 22px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.mv-addph:hover:not(:disabled) { background: rgba(233, 168, 58, 0.12); }
.mv-addph:disabled { opacity: .35; cursor: default; }
.mv-count { font-size: 12px; font-weight: 800; color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.mv-song { display: flex; align-items: center; gap: 12px; }
.mv-song .sp-cover { width: 44px; height: 44px; }
.mv-song b { display: block; font-size: 14px; }
.mv-song span { font-size: 12px; color: var(--text-faint); }
.mv-field { display: block; margin-bottom: 12px; }
.mv-field span { display: block; margin-bottom: 5px; font-size: 12.5px; color: var(--text-dim); }
.mv-field input { width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: rgba(7, 8, 11, 0.5); color: var(--text); font: inherit; font-size: 14px; }
.mv-field input:focus { outline: none; border-color: rgba(233, 168, 58, 0.6); }
.mv-chip-i { font-style: normal; font-size: 11px; font-weight: 600; opacity: .75; margin-left: 4px; }

/* making it */
.mv-cancel { margin-left: 10px; border: none; background: none; color: var(--text-faint); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.mv-support { margin: 0; padding: 8px 18px; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--warn, #e6a95c); }
.mv-support[hidden] { display: none; }
.mv-busy .mv-tl, .mv-busy .sx-insp { pointer-events: none; opacity: .6; }

@media (max-width: 900px) {
  .mv-side { grid-template-rows: auto auto; order: -1; }
  .mv-stagebox { height: 62vh; }
  .mv-legend { margin-left: 16px; }
  .mv-src { grid-template-columns: 1fr; }
}
