/* ═══════════════════════════════════════════════════════════════════════════
   Music Video Mode — CorkBoard Studio
   Copyright © 2025 Jack Allen. All Rights Reserved.
   ═══════════════════════════════════════════════════════════════════════════ */

#musicvideo-app {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg, #f9fafb);
}
body.dark #musicvideo-app { background: var(--bg, #0f1117); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.mv-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mv-content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  align-items: start;
}
.mv-main    { display: flex; flex-direction: column; gap: 18px; }
.mv-sidebar { position: sticky; top: 16px; }

/* ── Track Banner ────────────────────────────────────────────────────────── */
.mv-track-banner {
  background: linear-gradient(135deg, #2d1a4a 0%, #7c3aed 60%, #db2777 100%);
  color: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
body.dark .mv-track-banner {
  background: linear-gradient(135deg, #1e0f33 0%, #5b21b6 60%, #9d174d 100%);
}
.mv-track-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 100%;
  flex-wrap: wrap;
  margin-bottom: -2px;
}
.mv-track-artist {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .01em;
}
.mv-track-sep { opacity: .5; font-size: .9rem; }
.mv-track-song {
  font-size: .95rem;
  font-weight: 600;
  opacity: .9;
  font-style: italic;
}
.mv-track-label {
  font-size: .65rem;
  font-weight: 700;
  background: rgba(255,255,255,.2);
  border-radius: 5px;
  padding: 2px 7px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mv-track-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.mv-pill {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 5px 10px;
  gap: 1px;
  min-width: 60px;
}
.mv-pill-label {
  font-size: .56rem;
  font-weight: 700;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.mv-pill-val {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.3;
}
.mv-edit-btn {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .77rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.mv-edit-btn:hover { background: rgba(255,255,255,.3); }

/* ── Section cards ───────────────────────────────────────────────────────── */
.mv-section-card-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}
body.dark .mv-section-card-wrap {
  background: #1a1f2e;
  border-color: #2d3447;
}
.mv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mv-section-header h3 {
  margin: 0;
  font-size: .93rem;
  font-weight: 800;
  color: var(--ink, #111827);
}

/* ── Treatment ───────────────────────────────────────────────────────────── */
.mv-treatment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.mv-treat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mv-treat-wide { grid-column: 1 / -1; }
.mv-treat-label {
  font-size: .63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted, #6b7280);
}
.mv-treat-val {
  font-size: .84rem;
  color: var(--ink, #111827);
  line-height: 1.5;
}

/* ── Song sections list ──────────────────────────────────────────────────── */
.mv-sections-list { display: flex; flex-direction: column; gap: 8px; }

.mv-seg-card {
  border: 1px solid #e5e7eb;
  border-left: 4px solid #9ca3af;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f9fafb;
  transition: box-shadow .12s;
}
body.dark .mv-seg-card {
  background: #111827;
  border-color: #2d3447;
  border-left-color: inherit;
}
.mv-seg-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.mv-seg-head {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.mv-seg-type {
  font-size: .64rem;
  font-weight: 800;
  border-radius: 5px;
  padding: 2px 7px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.mv-seg-label {
  font-weight: 700;
  font-size: .86rem;
  color: var(--ink, #111827);
  flex: 1;
  min-width: 0;
}
.mv-seg-time {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mv-seg-actions { display: flex; gap: 4px; margin-left: auto; }
.mv-action-btn {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 3px 7px;
  cursor: pointer;
  font-size: .74rem;
  color: var(--muted, #6b7280);
  transition: background .12s, color .12s;
}
.mv-action-btn:hover { background: #f3f4f6; color: #111827; }
.mv-action-btn.danger:hover { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
body.dark .mv-action-btn { border-color: #2d3447; }
body.dark .mv-action-btn:hover { background: #1f2937; color: #e5e7eb; }

.mv-seg-lyrics {
  font-size: .78rem;
  color: var(--muted, #6b7280);
  font-style: italic;
  line-height: 1.5;
  margin-top: 3px;
  white-space: pre-wrap;
}
.mv-seg-note {
  font-size: .76rem;
  color: var(--ink, #374151);
  line-height: 1.4;
  margin-top: 3px;
}
.mv-seg-note-lbl {
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted, #6b7280);
}

/* ── Empty states ────────────────────────────────────────────────────────── */
.mv-empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted, #6b7280);
  font-size: .86rem;
  line-height: 1.6;
}
.mv-empty-state > div:first-child { font-size: 2.4rem; margin-bottom: 8px; }
.mv-empty-small {
  font-size: .82rem;
  color: var(--muted, #6b7280);
  padding: 8px 0 4px;
  font-style: italic;
}

/* ── Deliverables panel ──────────────────────────────────────────────────── */
.mv-deliverables-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}
body.dark .mv-deliverables-panel { background: #1a1f2e; border-color: #2d3447; }

.mv-del-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mv-del-header h3 {
  margin: 0;
  font-size: .9rem;
  font-weight: 800;
  color: var(--ink, #111827);
}
.mv-del-progress {
  font-size: .71rem;
  font-weight: 800;
  color: #7c3aed;
  background: #f5f3ff;
  border-radius: 20px;
  padding: 2px 9px;
}
body.dark .mv-del-progress { background: #2e1065; color: #c4b5fd; }

.mv-progress-bar {
  height: 5px;
  background: #e5e7eb;
  border-radius: 3px;
  margin-bottom: 12px;
  overflow: hidden;
}
body.dark .mv-progress-bar { background: #2d3447; }
.mv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #db2777);
  border-radius: 3px;
  transition: width .3s ease;
}

.mv-del-items { display: flex; flex-direction: column; gap: 1px; }
.mv-del-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .1s;
  user-select: none;
}
.mv-del-item:hover { background: #f3f4f6; }
body.dark .mv-del-item:hover { background: #1f2937; }
.mv-del-item input[type=checkbox] {
  width: 14px;
  height: 14px;
  accent-color: #7c3aed;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.mv-del-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: .81rem;
  font-weight: 600;
  color: var(--ink, #111827);
  line-height: 1.3;
}
.mv-del-sub { font-size: .67rem; font-weight: 500; color: var(--muted, #6b7280); }
.mv-del-item.mv-checked .mv-del-label { opacity: .45; text-decoration: line-through; }

/* ── Setup modal intro ───────────────────────────────────────────────────── */
.mv-setup-intro {
  font-size: .84rem;
  color: var(--muted, #6b7280);
  line-height: 1.55;
  padding: 10px 14px;
  background: #faf5ff;
  border-radius: 8px;
  border-left: 3px solid #7c3aed;
}
body.dark .mv-setup-intro { background: #1e0f33; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .mv-content-grid   { grid-template-columns: 1fr; }
  .mv-sidebar        { position: static; }
  .mv-layout         { padding: 12px 14px 70px; }
  .mv-treatment-grid { grid-template-columns: 1fr; }
  .mv-treat-wide     { grid-column: 1; }
}
