/* Studio OS — Recall module (capture-style) */

.recall {
  padding: 36px 36px 80px;
  width: 100%;
}

/* ═════════════════════════════════════════════════════════════════════
   Editable workbook tabs — Recall only. Base .wb-tab / .wb-tabs sizing
   comes from inputsheet.css (shared with Input Sheets' own song tabs);
   everything editing-related lives here since Input Sheets never sets
   these modifier classes.
   ═════════════════════════════════════════════════════════════════════ */
.wb-tabs--editing .wb-tab.plus { display: none; }

.wb-tab--editing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 8px 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  position: relative;
  top: 1px;
}
.rc-tab-rename {
  width: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  padding: 3px 6px;
}
.rc-tab-rename:focus { outline: none; border-color: var(--accent); }

.rc-tab-remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-faint);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.rc-tab-remove:hover:not(:disabled) {
  color: oklch(0.72 0.16 25);
  border-color: color-mix(in oklab, oklch(0.72 0.16 25) 50%, var(--border));
}
.rc-tab-remove.confirm {
  width: auto;
  padding: 0 7px;
  color: #fff;
  background: oklch(0.62 0.19 25);
  border-color: oklch(0.62 0.19 25);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}
.rc-tab-remove:disabled { opacity: 0.35; cursor: not-allowed; }

.rc-tab-edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: color 0.12s;
}
.rc-tab-edit-toggle:hover { color: var(--text-primary); }
.rc-tab-edit-toggle.active { color: var(--accent); }

/* Empty state — no active session to capture */
.rc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  max-width: 460px;
  margin: 40px auto 0;
}
.rc-empty-glyph { font-size: 34px; color: var(--text-faint); margin-bottom: 12px; }
.rc-empty-title { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.rc-empty-body { font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }

/* ═════════════════════════════════════════════════════════════════════
   Workspace — left section index + focused main stage
   ═════════════════════════════════════════════════════════════════════ */
.rc-workspace {
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 20px;
  align-items: flex-start;
  margin-top: 18px;
}

/* ─── Left index ────────────────────────────────────────────────────── */
.rc-index {
  position: sticky;
  top: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rc-index::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, oklch(0.42 0.012 65 / 0.6), transparent);
  pointer-events: none;
}

.rc-index-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.rc-ring { flex-shrink: 0; }
.rc-ring-track { stroke: var(--surface-3); }
.rc-ring-fill {
  stroke: var(--accent);
  filter: drop-shadow(0 0 4px color-mix(in oklab, var(--accent) 50%, transparent));
  transition: stroke-dasharray 0.4s ease;
}
.rc-ring-num {
  fill: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.rc-ring-pct {
  fill: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 5.5px;
  letter-spacing: 0.18em;
}
.rc-index-progress-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rc-index-progress-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.rc-index-progress-count {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1;
}
.rc-index-progress-count span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.rc-index-progress-when {
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-top: 1px;
}

/* Section nav */
.rc-index-nav {
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 1px;
}
.rc-index-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 0.12s, border-color 0.12s;
}
.rc-index-item:hover { background: var(--surface-2); }
.rc-index-item.active {
  background: color-mix(in oklab, var(--accent) 9%, var(--surface));
  border-color: color-mix(in oklab, var(--accent) 30%, var(--border-strong));
}
.rc-index-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px; width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--accent);
}
.rc-index-glyph {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 5px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.rc-index-item.active .rc-index-glyph {
  background: color-mix(in oklab, var(--accent) 16%, var(--surface-3));
  border-color: color-mix(in oklab, var(--accent) 40%, var(--border-strong));
  color: var(--accent);
}
.rc-index-item.done:not(.active) .rc-index-glyph { color: var(--text-secondary); }
.rc-index-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}
.rc-index-item.active .rc-index-label { color: var(--text-primary); font-weight: 500; }
.rc-index-status { display: inline-flex; align-items: center; }
.rc-index-count {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rc-index-item.active .rc-index-count { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 30%, var(--border)); }
.rc-index-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
}
.rc-index-dot.done {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.rc-index-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.rc-index-actions .tb-btn { width: 100%; }
.rc-index-capture { height: 32px; }

/* ─── Main stage ────────────────────────────────────────────────────── */
.rc-stage {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
  min-width: 0;
  animation: rcStageIn 0.22s ease-out;
}
.rc-stage::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, oklch(0.42 0.012 65 / 0.6), transparent);
  z-index: 4;
  pointer-events: none;
}
@keyframes rcStageIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rc-stage-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.rc-stage-head-l { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.rc-stage-glyph {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 7px;
  background: color-mix(in oklab, var(--accent) 14%, var(--surface-3));
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border-strong));
  color: var(--accent);
  font-size: 16px;
  box-shadow: 0 0 10px color-mix(in oklab, var(--accent) 22%, transparent);
  flex-shrink: 0;
}
.rc-stage-titles { min-width: 0; }
.rc-stage-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.018em;
  margin: 0;
  line-height: 1.1;
}
.rc-stage-sub {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 3px;
}
.rc-stage-head-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rc-stage-head-r .sm-btn { height: 30px !important; padding: 0 13px; font-size: 12px !important; }
.rc-stage-body { padding: 20px; }

/* ─── Empty state inside the stage ──────────────────────────────────── */
.capture-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.capture-empty-glyph {
  font-size: 26px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.capture-empty-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.capture-empty-body {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

/* ═════════════════════════════════════════════════════════════════════
   Photo slot — real upload (drag/drop or click), persisted to localStorage
   ═════════════════════════════════════════════════════════════════════ */
.rc-slot {
  --slot-bg: oklch(0.16 0.005 60);
  --slot-border: var(--border-strong);
  --slot-text: var(--text-muted);
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--slot-bg);
  border: 1px dashed var(--slot-border);
  border-radius: 4px;
  color: var(--slot-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
html[data-theme="light"] .rc-slot {
  --slot-bg: oklch(0.96 0.003 80);
}
.rc-slot:hover {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 4%, var(--slot-bg));
  color: var(--accent);
}
.rc-slot.drag-over {
  border-color: var(--accent);
  border-style: solid;
  background: color-mix(in oklab, var(--accent) 10%, var(--slot-bg));
  color: var(--accent);
}
.rc-slot.has-photo {
  border-style: solid;
  border-color: color-mix(in oklab, var(--accent) 30%, var(--border-strong));
  cursor: default;
}

/* Shape variants */
.rc-slot-rect    { border-radius: 0; }
.rc-slot-rounded { border-radius: 4px; }
.rc-slot-pill    { border-radius: 999px; }
.rc-slot-circle  { border-radius: 50%; }

/* Empty state */
.rc-slot-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
  pointer-events: none;
}
.rc-slot-icon { font-size: 18px; opacity: 0.75; }
.rc-slot-text { font-size: 11.5px; line-height: 1.3; }

/* Filled image */
.rc-slot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Remove button (only when filled) */
.rc-slot-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #fff;
  background: color-mix(in oklab, #000 55%, transparent);
  border: 1px solid color-mix(in oklab, #fff 25%, transparent);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}
.rc-slot.has-photo:hover .rc-slot-clear { opacity: 1; }
.rc-slot-clear:hover { background: color-mix(in oklab, var(--bad, #e5564e) 75%, #000); }

/* Hidden native input */
.rc-slot-input { display: none; }

.rc-slot.busy { cursor: progress; }

/* ═════════════════════════════════════════════════════════════════════
   Shared form controls within captures
   ═════════════════════════════════════════════════════════════════════ */
.capture-textarea,
.capture-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  letter-spacing: -0.005em;
  padding: 8px 10px;
  resize: vertical;
  transition: border-color 0.12s, box-shadow 0.12s;
  line-height: 1.5;
}
.capture-textarea.small { min-height: 56px; font-size: 11.5px; }
.capture-textarea.large {
  min-height: 140px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.capture-textarea.large:focus { color: var(--text-primary); }
.capture-input { padding: 6px 10px; font-size: 11.5px; }
.capture-textarea::placeholder,
.capture-input::placeholder {
  color: var(--text-faint);
  font-family: var(--font-serif);
  font-style: italic;
  opacity: 0.7;
}
.capture-textarea:focus,
.capture-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--accent), 0 0 12px color-mix(in oklab, var(--accent) 22%, transparent);
}
.capture-mini-btn {
  height: 24px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.capture-mini-btn:hover { color: var(--accent); border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }

/* ═════════════════════════════════════════════════════════════════════
   Console capture
   ═════════════════════════════════════════════════════════════════════ */
.capture-console {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.capture-console-import {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
}
.capture-import-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.capture-import-icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  background: color-mix(in oklab, oklch(0.74 0.16 145) 14%, var(--surface));
  border: 1px solid color-mix(in oklab, oklch(0.74 0.16 145) 35%, var(--border));
  border-radius: 6px;
  color: oklch(0.74 0.16 145);
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 8px color-mix(in oklab, oklch(0.74 0.16 145) 25%, transparent);
}
.capture-import-row.empty .capture-import-icon {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--text-faint);
  box-shadow: none;
}
.capture-import-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.capture-import-name {
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  font-family: var(--font-mono);
}
.capture-import-row.empty .capture-import-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--text-secondary);
}
.capture-import-meta {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.capture-import-side { display: flex; gap: 6px; flex-shrink: 0; }

.capture-console-photo {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
  align-items: stretch;
}

/* ═════════════════════════════════════════════════════════════════════
   Outboard capture
   ═════════════════════════════════════════════════════════════════════ */
.capture-outboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.capture-outboard-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.capture-outboard-card.done {
  border-color: color-mix(in oklab, var(--accent) 25%, var(--border-strong));
}
.capture-outboard-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.capture-outboard-id {
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
/* Kept to one line — a bus preamp can serve a dozen channels, and the full
   list lives in the title attribute. */
.capture-outboard-source {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.capture-outboard-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.capture-outboard-brand {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.capture-outboard-model {
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.012em;
  font-weight: 500;
}

/* ═════════════════════════════════════════════════════════════════════
   Mic positions capture
   ═════════════════════════════════════════════════════════════════════ */
.capture-mics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.capture-mic-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.capture-mic-card.done {
  border-color: color-mix(in oklab, var(--accent) 22%, var(--border-strong));
}
.capture-mic-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 2px 0;
}
.capture-mic-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.capture-mic-ch {
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.capture-mic-source {
  font-size: 12px;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.capture-mic-id {
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ═════════════════════════════════════════════════════════════════════
   Room state capture
   ═════════════════════════════════════════════════════════════════════ */
.capture-room-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.capture-room-photo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Responsive collapse to single column on narrower */
@media (max-width: 1200px) {
  .capture-console-photo,
  .capture-room-photos { grid-template-columns: 1fr; }
}

/* ═════════════════════════════════════════════════════════════════════
   Session picker — reuses the .is-bk-* booking cards from Input Sheets
   ═════════════════════════════════════════════════════════════════════ */
.rc-sheet-row {
  grid-template-columns: auto auto 1fr auto;
}
.rc-progress-chip {
  justify-self: end;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  background: color-mix(in oklab, var(--text-faint) 12%, transparent);
}
.rc-progress-chip.part {
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 16%, transparent);
}
.rc-progress-chip.full {
  color: oklch(0.85 0.12 145);
  background: color-mix(in oklab, oklch(0.72 0.14 145) 20%, transparent);
}
.rc-no-sheet {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-faint);
}

/* ═════════════════════════════════════════════════════════════════════
   Editable capture cards
   ═════════════════════════════════════════════════════════════════════ */
.capture-outboard-head .rc-player-input {
  max-width: 110px;
  text-align: right;
  padding: 2px 4px;
}
.rc-card-remove {
  align-self: flex-start;
  margin-top: 2px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 10.5px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.rc-card-remove:hover {
  color: oklch(0.72 0.16 25);
  border-color: color-mix(in oklab, oklch(0.72 0.16 25) 50%, var(--border));
}
