/* ============================================================================
   VOICE-MAP.CSS -- Multi-voice detector UI ("Voice Map")
   Matches the studio theme (dark panels, orange/cyan/green accents).
   ========================================================================== */

.vm-card {
  margin: 0 0 16px;
  padding: 16px 16px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.vm-card.vm-hidden { display: none; }

.vm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.vm-head h4 { margin: 0; font-size: 15px; }
.vm-head .pro-badge { margin-left: 0; }
.vm-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.vm-intro { margin: 6px 0 12px; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }

/* ---- auto / manual toggle ---- */
.vm-mode {
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.vm-mode-btn {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, background .15s;
}
.vm-mode-btn:hover { border-color: var(--accent-2); }
.vm-mode-btn.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255,107,53,0.14), rgba(255,107,53,0.04));
  box-shadow: 0 0 0 1px rgba(255,107,53,0.35) inset;
}
.vm-mode-btn b { font-size: 13px; }
.vm-mode-btn span { font-size: 11.5px; color: var(--text-dim); line-height: 1.35; }

/* ---- summary + legend ---- */
.vm-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  font-size: 13px;
}
.vm-count {
  font-weight: 700;
  font-size: 14px;
}
.vm-count.one { color: var(--accent-2); }
.vm-count.multi { color: var(--accent); }
.vm-conf {
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
}
.vm-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.vm-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  background: var(--panel-2);
}
.vm-chip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.vm-chip .vm-chip-sub { color: var(--text-dim); font-size: 11px; }

/* voice colours */
.vm-c1 { background: #ff6b35; }
.vm-c2 { background: #38bdf8; }
.vm-c3 { background: #a78bfa; }
.vm-c4 { background: #35ff9e; }
.vm-c5 { background: #f472b6; }

/* ---- strip ---- */
.vm-strip {
  display: flex;
  width: 100%;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 0 0 6px;
  background: var(--panel-2);
}
.vm-seg {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: #0b0d12;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border-right: 1px solid rgba(0,0,0,0.25);
  transition: filter .12s;
  overflow: hidden;
}
.vm-seg:last-child { border-right: 0; }
.vm-seg:hover { filter: brightness(1.12); }
.vm-seg .vm-seg-num { font-size: 11px; line-height: 1; }
.vm-seg .vm-seg-reg { font-size: 9px; opacity: .85; line-height: 1.1; margin-top: 1px; text-transform: uppercase; letter-spacing: .02em; }
.vm-seg.harmony::after {
  content: "\2261";
  position: absolute;
  top: 1px; right: 2px;
  font-size: 10px;
  opacity: .9;
}
.vm-seg.sel { outline: 2px solid #fff; outline-offset: -2px; }
.vm-seg.keep-ai { filter: saturate(.35) brightness(.7); }

.vm-strip-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-dim);
  margin: 0 0 12px;
}
.vm-strip-legend span { display: inline-flex; align-items: center; gap: 5px; }
.vm-strip-legend .swatch { width: 12px; height: 8px; border-radius: 2px; }

/* ---- recommendation banners ---- */
.vm-reco {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.vm-reco.info { border-color: rgba(56,189,248,0.4); background: rgba(56,189,248,0.07); }
.vm-reco.warn { border-color: rgba(255,107,53,0.45); background: rgba(255,107,53,0.08); }
.vm-reco b { color: var(--text); }
.vm-reco .vm-reco-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---- assignment table ---- */
.vm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.vm-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-dim);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.vm-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.vm-table tr:last-child td { border-bottom: 0; }
.vm-table tr.vm-row-keepai { opacity: .72; }
.vm-table .vm-sec-num { font-weight: 700; }
.vm-table .vm-time { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.vm-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-transform: capitalize;
}
.vm-tag.chorus { color: var(--accent); border-color: rgba(255,107,53,0.4); }
.vm-tag.verse { color: var(--accent-2); border-color: rgba(56,189,248,0.4); }
.vm-tag.bridge { color: #a78bfa; border-color: rgba(167,139,250,0.4); }
.vm-tag.harmony { color: #f472b6; border-color: rgba(244,114,182,0.45); }
.vm-reg { font-weight: 600; }
.vm-reg.male { color: #7dd3fc; }
.vm-reg.female { color: #fca5a5; }
.vm-reg.neutral { color: var(--text-dim); }
.vm-regconf {
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  border: 1px solid var(--border);
  vertical-align: middle;
}
.vm-regconf.low { color: var(--accent); border-color: rgba(255,107,53,0.45); }
.vm-table tr.vm-row-lowconf > td { background: rgba(255,107,53,0.06); }
.vm-reg-override { margin-top: 4px; }
.vm-regsel {
  padding: 2px 6px;
  background: var(--panel-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.vm-regsel:hover { color: var(--text); border-color: var(--accent-2); }

.vm-select {
  width: 100%;
  padding: 5px 8px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}
.vm-select:disabled { opacity: .7; cursor: not-allowed; }
.vm-select.mismatch { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(255,107,53,0.35) inset; }

.vm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.vm-status { margin-top: 10px; font-size: 12.5px; color: var(--text-dim); min-height: 18px; }
.vm-status.ok { color: var(--accent-3); }
.vm-status.err { color: var(--danger); }
.vm-status.warn { color: var(--accent); }
.vm-progress { height: 6px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin: 8px 0 0; }
.vm-progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s; }

.vm-empty { font-size: 12.5px; color: var(--text-dim); padding: 8px 0; }

@media (max-width: 640px) {
  .vm-table .vm-col-time, .vm-table .vm-col-f0 { display: none; }
}
