/* Clean voice dialog */
.cv-modal { position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.66); }
.cv-modal[hidden] { display: none; }
.cv-card { width: min(520px, 100%); max-height: 92vh; overflow: auto; background: var(--surface, #0f0d09); color: var(--ink, #f5f0df); border: 1px solid var(--line, #3a2f12); border-radius: 16px; padding: 1rem 1.15rem 1.1rem; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); }
.cv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.cv-head h3 { margin: 0; font-size: 1.12rem; }
.cv-sub { font-size: 0.8rem; color: var(--muted, #b2a47c); margin-top: 0.15rem; word-break: break-word; }
.cv-x { appearance: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; min-width: 34px; padding: 0; margin: 0; line-height: 1; border-radius: 9px; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; }
.cv-x svg { display: block; pointer-events: none; }
.cv-x:hover { background: rgba(255, 255, 255, 0.07); }
.cv-lead { margin: 0 0 0.8rem; font-size: 0.88rem; line-height: 1.5; color: var(--muted, #b2a47c); }
.cv-sub2 { font-size: 0.78rem; color: var(--muted, #b2a47c); margin: 0.5rem 0; line-height: 1.4; }
.cv-note { padding: 0.55rem 0.7rem; border-radius: 10px; font-size: 0.84rem; margin-bottom: 0.6rem; background: rgba(255, 255, 255, 0.05); }
.cv-note.is-bad { background: #2a1210; color: #f2b3ab; border: 1px solid #5a2a22; }
.cv-list { display: grid; gap: 0.3rem; margin: 0.4rem 0 0.6rem; }
.cv-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line, #2a2517); border-radius: 10px; cursor: pointer; font-size: 0.86rem; }
.cv-row input { accent-color: #d4aa32; }
.cv-row.has { border-color: #2f5a3d; }
.cv-row-meta { font-size: 0.74rem; color: #8fd9a8; white-space: nowrap; }
.cv-row-acts { display: inline-flex; gap: 0.3rem; }
.cv-btn, .cv-mini { appearance: none; border: 1px solid #2c2313; background: #15120b; color: inherit; border-radius: 9px; padding: 0.5rem 0.85rem; font: inherit; font-size: 0.84rem; cursor: pointer; width: auto; }
.cv-mini { padding: 0.25rem 0.5rem; font-size: 0.74rem; }
.cv-btn:hover, .cv-mini:hover { border-color: #4a3912; }
.cv-btn.is-primary { background: #d4aa32; color: #130e03; border-color: #d4aa32; font-weight: 650; }
.cv-btn.is-danger, .cv-mini.is-danger { color: #ff8a7e; border-color: #5a2a22; }
.cv-btn:disabled { opacity: 0.5; cursor: default; }
.cv-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.cv-job { border: 1px solid var(--line, #2a2517); border-radius: 12px; padding: 0.75rem; background: rgba(255, 255, 255, 0.025); }
.cv-job-line { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; line-height: 1.4; }
.cv-bar { height: 5px; border-radius: 4px; background: #1b170d; overflow: hidden; margin-top: 0.6rem; }
.cv-bar i { display: block; height: 100%; background: #d4aa32; transition: width 0.5s ease; }
@keyframes cv-spin { to { transform: rotate(360deg); } }
@keyframes cv-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.cv-spin, .cv-loading i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #3a3220; border-top-color: #d4aa32; animation: cv-spin 0.8s linear infinite; display: inline-block; }
.cv-clock { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d4aa32; animation: cv-pulse 1.4s ease-in-out infinite; display: inline-block; }
.cv-loading { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 0; color: var(--muted, #b2a47c); font-size: 0.88rem; }
.icon-clean-voice {
  mask-image: url('assets/svg/clean-voice.svg');
  -webkit-mask-image: url('assets/svg/clean-voice.svg');
}

#videoCleanVoiceBtn.is-on, #svCleanVoiceBtn.is-on { color: #5fcf8a; border-color: color-mix(in srgb, #5fcf8a 70%, #1a1309); background: color-mix(in srgb, #5fcf8a 14%, transparent); }
#videoCleanVoiceBtn[hidden], #svCleanVoiceBtn[hidden] { display: none; }

/* icon buttons (Listen / Download / Delete) */
.cv-ib { appearance: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; padding: 0; margin: 0; border-radius: 10px; border: 1px solid #2c2313; background: #15120b; color: #d8cda5; cursor: pointer; text-decoration: none; transition: border-color 120ms, color 120ms, background 120ms, transform 60ms; }
.cv-ib:hover { border-color: #5a4515; color: #f0d27a; background: #1b160c; }
.cv-ib:active { transform: translateY(1px); }
.cv-ib:focus-visible, .cv-btn:focus-visible, .cv-play:focus-visible, .cv-skip:focus-visible, .cv-linkbtn:focus-visible { outline: 2px solid #d4aa32; outline-offset: 2px; }
.cv-ib.is-danger { color: #e98a7e; border-color: #4d241d; }
.cv-ib.is-danger:hover { color: #ff9d92; border-color: #8a3b30; background: #221210; }
.cv-ib.is-sm { width: 28px; height: 28px; border-radius: 8px; }
.cv-ib svg, .cv-btn svg { display: block; pointer-events: none; }
.cv-btn { display: inline-flex; align-items: center; gap: 0.45rem; }
.cv-row-acts { gap: 0.35rem; }
a.cv-btn { text-decoration: none; color: inherit; }

/* the built-in player of the clean version */
.cv-player { margin-top: 0.85rem; padding: 0.75rem 0.9rem 0.8rem; border-radius: 14px; border: 1px solid #3a2f13; background: linear-gradient(180deg, #181408, #120f08); display: grid; gap: 0.55rem; }
.cv-player-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 0.86rem; }
.cv-player-title { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; color: #e9d9a4; }
.cv-player-title b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-pl { display: grid; gap: 0.3rem; }
.cv-pl-row { display: flex; align-items: center; gap: 0.55rem; }
.cv-grow { flex: 1 1 auto; }
.cv-play { appearance: none; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: linear-gradient(180deg, #e3bd45, #c99a1c); color: #1b1304; box-shadow: 0 4px 14px rgba(212, 170, 50, 0.28); transition: transform 80ms, box-shadow 120ms; }
.cv-play:hover { box-shadow: 0 6px 18px rgba(212, 170, 50, 0.4); }
.cv-play:active { transform: scale(0.96); }
.cv-play svg { margin-left: 2px; }
.cv-play.is-playing svg { margin-left: 0; }
.cv-skip { appearance: none; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #cdbf90; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color 120ms, background 120ms; }
.cv-skip:hover { color: #f0d27a; background: rgba(255, 255, 255, 0.05); }
.cv-time { flex: none; min-width: 2.9rem; font-size: 0.76rem; font-variant-numeric: tabular-nums; color: #b9ab80; }
.cv-time:last-child { text-align: right; }
.cv-seek { -webkit-appearance: none; appearance: none; flex: 1 1 auto; min-width: 0; height: 22px; margin: 0; padding: 0; background: transparent; cursor: pointer; --p: 0%; --b: 0%; }
.cv-seek:focus { outline: none; }
.cv-seek::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: linear-gradient(90deg, #d4aa32 var(--p), #55441b var(--p) var(--b), #241e0f var(--b)); }
.cv-seek::-moz-range-track { height: 5px; border-radius: 999px; background: linear-gradient(90deg, #d4aa32 var(--p), #55441b var(--p) var(--b), #241e0f var(--b)); }
.cv-seek::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -4.5px; border-radius: 50%; background: #f6e7b4; border: 2px solid #d4aa32; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55); transition: transform 100ms; }
.cv-seek::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #f6e7b4; border: 2px solid #d4aa32; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55); }
.cv-seek:hover::-webkit-slider-thumb, .cv-seek:focus-visible::-webkit-slider-thumb { transform: scale(1.2); }
.cv-seek:focus-visible::-webkit-slider-runnable-track { box-shadow: 0 0 0 2px rgba(212, 170, 50, 0.4); }
.cv-player-links { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.cv-linkbtn { appearance: none; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0; border: 0; background: transparent; color: #b9ab80; font: inherit; font-size: 0.78rem; cursor: pointer; }
.cv-linkbtn:hover { color: #f0d27a; }
.cv-player-err { color: #ff9a8e; font-size: 0.8rem; }
@media (max-width: 430px) {
  .cv-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cv-row-meta { display: none; }
  .cv-ib { width: 36px; height: 36px; }
}

/* pick what to clean: the mix and / or tracks one by one */
.cv-pickbar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; margin: 0.5rem 0 0.1rem; font-size: 0.8rem; color: var(--muted, #b2a47c); }
.cv-chips { display: inline-flex; gap: 0.3rem; flex-wrap: wrap; }
.cv-chip { appearance: none; padding: 0.18rem 0.6rem; border-radius: 999px; border: 1px solid #3a2f14; background: #14110a; color: #cdbd8a; font: inherit; font-size: 0.74rem; cursor: pointer; }
.cv-chip:hover { border-color: #8b6f25; color: #f0d27a; background: #1b160c; }
.cv-row input[type="checkbox"] { width: 17px; height: 17px; margin: 0; }
.cv-state { display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none; }
.cv-state.is-ready { border-radius: 50%; background: #1d3a29; color: #8fd9a8; border: 1px solid #2f5a3d; width: 17px; height: 17px; }
.cv-row.is-busy { border-color: #5a4713; cursor: default; }
.cv-row-meta.is-busy { color: #e0b93d; }
.cv-row-meta.is-bad { color: #f2a59b; }
.cv-row:not(.has):not(.is-busy):has(input:checked) { border-color: #8b6f25; background: rgba(212, 170, 50, 0.07); }
.cv-btn:disabled { opacity: 0.45; cursor: default; }

/* the clean-voice switch of the video players: a speaking person with "AI" */
.cv-ai-ico { width: 21px; height: 21px; display: block; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#videoCleanVoiceBtn, #svCleanVoiceBtn { width: auto; min-width: 38px; }
/* while it is on, the waveform is green (drawn in the player) and the level meters get a green top line: they show the clean voice */
.preview-stage.is-clean-voice .meter-panel { box-shadow: inset 0 2px 0 #5fcf8a; }
