/* ── Layout — reuses creator sidebar pattern ──────────────────────────────── */

.layout {
  display: flex;
  gap: 0;
  min-height: 60vh;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 2rem;
}

.pageTitle {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.subtitle {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ── Waveform ─────────────────────────────────────────────────────────────── */

.waveformWrap {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.waveformLabel {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}

.waveformCanvas {
  min-height: 128px;
}

/* ── Bulk actions bar ─────────────────────────────────────────────────────── */

.bulkBar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.bulkBtn {
  padding: 0.375rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.bulkBtn:hover {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

.bulkBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.bulkBtnPrimary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.bulkBtnPrimary:hover {
  opacity: 0.9;
}

.selectedCount {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Chapter list ─────────────────────────────────────────────────────────── */

.chapterList {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chapterRow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  transition: border-color 0.15s;
}

.chapterRow:hover {
  border-color: var(--color-accent);
}

.chapterCheckbox {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.chapterIndex {
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.chapterTitle {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: border-color 0.15s;
}

.chapterTitle:focus {
  border-color: var(--color-accent);
  outline: none;
  background: var(--color-bg-surface-hover);
}

.chapterTimes {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Status badge ─────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.badgeDraft {
  background: var(--color-badge-pending-bg);
  color: var(--color-badge-pending-text);
}

.badgeApproved {
  background: var(--color-badge-approved-bg);
  color: var(--color-badge-approved-text);
}

.badgeHidden {
  background: var(--color-badge-rejected-bg);
  color: var(--color-badge-rejected-text);
}

/* ── Row action buttons ───────────────────────────────────────────────────── */

.rowActions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.iconBtn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.iconBtn:hover {
  color: var(--color-accent);
  background: var(--color-accent-subtle);
}

.iconBtn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.iconBtn svg {
  width: 16px;
  height: 16px;
}

/* ── States ────────────────────────────────────────────────────────────────── */

.loadingState {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.emptyState {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.emptyState h2 {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin: 0 0 0.5rem;
}

.emptyState p {
  font-size: 0.875rem;
  margin: 0;
}

.errorState {
  background: var(--color-error-bg, rgba(220, 38, 38, 0.1));
  color: var(--color-error, #ef4444);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .content {
    padding: 1.25rem;
  }

  .chapterRow {
    flex-wrap: wrap;
  }

  .chapterTitle {
    width: 100%;
    order: 10;
  }

  .bulkBar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Video Picker ─────────────────────────────────────────────────────────── */

.videoPickerList {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.videoPickerCard {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  background: var(--surface-2, #1e293b);
  border: 1px solid var(--border, #334155);
  color: var(--text-primary, #e2e8f0);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.videoPickerCard:hover {
  background: var(--surface-3, #2d3a4d);
  border-color: var(--accent, #22d3ee);
}

.videoPickerIcon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-secondary, #94a3b8);
}

.videoPickerInfo {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.videoPickerName {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
