/* Voice Clone — ElevenLabs-style Instant Voice Cloning (Audio Studio tab).
 * All rules scoped under #audioPanel-voiceclone. Reuses the --tc-* tokens
 * (dark purple Audio Studio palette) with the same fallbacks as parrot.css.
 */
#audioPanel-voiceclone .vc-shell { display: flex; flex-direction: column; gap: 18px; padding: 18px 22px 32px; }
#audioPanel-voiceclone .vc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#audioPanel-voiceclone .vc-title { margin: 0 0 4px; font-size: 20px; color: var(--tc-text, #e2e8f0); }
#audioPanel-voiceclone .vc-sub { margin: 0; color: var(--tc-text-muted, #94a3b8); font-size: 13px; max-width: 640px; }
#audioPanel-voiceclone .vc-count {
    padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--tc-card-bg, #1a1f2e); border: 1px solid var(--tc-border, #2b3342);
    color: var(--tc-primary, #a855f7);
}
#audioPanel-voiceclone .vc-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 18px; }
@media (max-width: 860px) { #audioPanel-voiceclone .vc-grid { grid-template-columns: 1fr; } }
#audioPanel-voiceclone .vc-card {
    background: var(--tc-card-bg, #0f172a); border: 1px solid var(--tc-border, #2b3342);
    border-radius: 14px; padding: 18px;
}
#audioPanel-voiceclone .vc-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    min-height: 220px; padding: 24px; text-align: center; cursor: pointer;
    border: 2px dashed var(--tc-border-strong, #475569); border-radius: 12px;
    background: rgba(168, 85, 247, 0.04); transition: border-color .15s, background .15s;
}
#audioPanel-voiceclone .vc-drop:hover,
#audioPanel-voiceclone .vc-drop.drag,
#audioPanel-voiceclone .vc-drop:focus-visible { border-color: var(--tc-primary, #a855f7); background: rgba(168, 85, 247, 0.10); outline: none; }
#audioPanel-voiceclone .vc-drop-icon { width: 40px; height: 40px; opacity: .85; }
#audioPanel-voiceclone .vc-drop-title { font-size: 16px; font-weight: 600; color: var(--tc-text, #e2e8f0); }
#audioPanel-voiceclone .vc-drop-hint { font-size: 12px; color: var(--tc-text-muted, #94a3b8); }
#audioPanel-voiceclone .vc-drop-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
#audioPanel-voiceclone .vc-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px;
    border: 1px solid var(--tc-border-strong, #475569); background: var(--tc-bg, #0b1220);
    color: var(--tc-text, #e2e8f0); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s;
}
#audioPanel-voiceclone .vc-btn img { width: 14px; height: 14px; }
#audioPanel-voiceclone .vc-btn:hover:not(:disabled) { border-color: var(--tc-primary, #a855f7); }
#audioPanel-voiceclone .vc-btn:disabled { opacity: .45; cursor: not-allowed; }
#audioPanel-voiceclone .vc-btn-primary { background: var(--tc-primary, #a855f7); border-color: var(--tc-primary, #a855f7); color: #fff; font-weight: 600; }
#audioPanel-voiceclone .vc-btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
#audioPanel-voiceclone .vc-btn-ghost { background: transparent; }
#audioPanel-voiceclone .vc-btn-danger, #audioPanel-voiceclone .vc-danger { color: #f87171; border-color: rgba(248, 113, 113, .5); }
#audioPanel-voiceclone .vc-rec { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
#audioPanel-voiceclone .vc-rec[hidden] { display: none; }
#audioPanel-voiceclone .vc-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: vc-pulse 1s infinite; }
#audioPanel-voiceclone .vc-rec-time { font-variant-numeric: tabular-nums; font-size: 18px; color: var(--tc-text, #e2e8f0); min-width: 48px; }
@keyframes vc-pulse { 50% { opacity: .25; } }
#audioPanel-voiceclone .vc-samples { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#audioPanel-voiceclone .vc-sample {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px;
    background: var(--tc-bg, #0b1220); border: 1px solid var(--tc-border, #2b3342); font-size: 13px; color: var(--tc-text, #e2e8f0);
}
#audioPanel-voiceclone .vc-sample-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#audioPanel-voiceclone .vc-sample-dur, #audioPanel-voiceclone .vc-sample-size { color: var(--tc-text-muted, #94a3b8); font-variant-numeric: tabular-nums; }
#audioPanel-voiceclone .vc-icon-btn {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex: none;
    border-radius: 50%; border: 1px solid var(--tc-border, #2b3342); background: transparent; color: var(--tc-text-muted, #94a3b8); cursor: pointer;
}
#audioPanel-voiceclone .vc-icon-btn img { width: 12px; height: 12px; }
#audioPanel-voiceclone .vc-icon-btn:hover { border-color: var(--tc-primary, #a855f7); color: var(--tc-text, #e2e8f0); }
#audioPanel-voiceclone .vc-quality-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
#audioPanel-voiceclone .vc-ring-wrap { position: relative; width: 150px; height: 150px; }
#audioPanel-voiceclone .vc-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
#audioPanel-voiceclone .vc-ring circle { fill: none; stroke-width: 10; }
#audioPanel-voiceclone .vc-ring-bg { stroke: var(--tc-border, #2b3342); }
#audioPanel-voiceclone .vc-ring-fg { stroke: var(--tc-primary, #a855f7); stroke-linecap: round; transition: stroke-dashoffset .4s ease, stroke .3s; }
#audioPanel-voiceclone .vc-ring-fg.low { stroke: #f59e0b; }
#audioPanel-voiceclone .vc-ring-fg.best { stroke: #22c55e; }
#audioPanel-voiceclone .vc-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#audioPanel-voiceclone .vc-ring-label span { font-size: 26px; font-weight: 700; color: var(--tc-text, #e2e8f0); font-variant-numeric: tabular-nums; }
#audioPanel-voiceclone .vc-ring-label small { font-size: 12px; color: var(--tc-text-muted, #94a3b8); text-transform: uppercase; letter-spacing: .06em; }
#audioPanel-voiceclone .vc-marks { display: flex; justify-content: space-between; width: 100%; max-width: 220px; font-size: 12px; color: var(--tc-text-muted, #94a3b8); }
#audioPanel-voiceclone .vc-quality-tip { margin: 0; font-size: 13px; color: var(--tc-text-muted, #94a3b8); max-width: 260px; }
#audioPanel-voiceclone .vc-form { display: flex; flex-direction: column; gap: 8px; }
#audioPanel-voiceclone .vc-label { font-size: 13px; font-weight: 600; color: var(--tc-text, #e2e8f0); }
#audioPanel-voiceclone .vc-opt { font-weight: 400; color: var(--tc-text-muted, #94a3b8); }
#audioPanel-voiceclone .vc-input {
    width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px;
    background: var(--tc-bg, #0b1220); border: 1px solid var(--tc-border, #2b3342); color: var(--tc-text, #e2e8f0); resize: vertical;
}
#audioPanel-voiceclone .vc-input:focus { outline: none; border-color: var(--tc-primary, #a855f7); }
#audioPanel-voiceclone .vc-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--tc-text, #e2e8f0); margin-top: 4px; cursor: pointer; }
#audioPanel-voiceclone .vc-consent input { margin-top: 2px; accent-color: var(--tc-primary, #a855f7); }
#audioPanel-voiceclone .vc-form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
#audioPanel-voiceclone .vc-status { font-size: 13px; color: var(--tc-text-muted, #94a3b8); }
#audioPanel-voiceclone .vc-status.ok { color: #4ade80; }
#audioPanel-voiceclone .vc-status.err { color: #f87171; }
#audioPanel-voiceclone .vc-lib-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#audioPanel-voiceclone .vc-lib-head h3 { margin: 0; font-size: 16px; color: var(--tc-text, #e2e8f0); }
#audioPanel-voiceclone .vc-voices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#audioPanel-voiceclone .vc-empty { color: var(--tc-text-muted, #94a3b8); font-size: 13px; padding: 10px 0; }
#audioPanel-voiceclone .vc-voice { padding: 10px 12px; border-radius: 10px; background: var(--tc-bg, #0b1220); border: 1px solid var(--tc-border, #2b3342); }
#audioPanel-voiceclone .vc-voice-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#audioPanel-voiceclone .vc-voice-meta { flex: 1; min-width: 180px; }
#audioPanel-voiceclone .vc-voice-name { font-weight: 600; color: var(--tc-text, #e2e8f0); }
#audioPanel-voiceclone .vc-voice-sub { font-size: 12px; color: var(--tc-text-muted, #94a3b8); }
#audioPanel-voiceclone .vc-voice-actions { display: flex; gap: 6px; flex-wrap: wrap; }
#audioPanel-voiceclone .vc-voice-actions .vc-btn { padding: 6px 12px; }
#audioPanel-voiceclone .vc-test { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
#audioPanel-voiceclone .vc-test[hidden], #audioPanel-voiceclone audio[hidden] { display: none; }
#audioPanel-voiceclone .vc-test audio { width: 100%; }

/* Speak panel */
#audioPanel-voiceclone .vc-speak-body { display: flex; flex-direction: column; gap: 8px; }
#audioPanel-voiceclone .vc-speak-body[hidden], #audioPanel-voiceclone .vc-speak-empty[hidden],
#audioPanel-voiceclone .vc-speak-result[hidden] { display: none; }
#audioPanel-voiceclone .vc-speak-empty { color: #9b93b8; font-size: 0.92em; }
#audioPanel-voiceclone .vc-speak-result { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
#audioPanel-voiceclone .vc-speak-result audio { width: 100%; }
#audioPanel-voiceclone .vc-speak-dl { display: flex; gap: 8px; flex-wrap: wrap; }
#audioPanel-voiceclone .vc-speak-dl a, #audioPanel-voiceclone .vc-hist a { text-decoration: none; }
#audioPanel-voiceclone .vc-history { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#audioPanel-voiceclone .vc-hist { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid rgba(139, 92, 246, 0.2); border-radius: 8px; }
#audioPanel-voiceclone .vc-hist-text { flex: 1; min-width: 0; font-size: 0.85em; color: #cfc8e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#audioPanel-voiceclone .vc-hist .vc-btn { padding: 4px 10px; font-size: 0.8em; }
#audioPanel-voiceclone select.vc-input { appearance: auto; }

/* Speak panel — delivery controls (engine + expressiveness) */
#audioPanel-voiceclone .vc-delivery { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-top: 4px; }
#audioPanel-voiceclone .vc-delivery-engine { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 0; }
#audioPanel-voiceclone .vc-delivery-expr { display: flex; flex-direction: column; gap: 6px; flex: 2 1 240px; min-width: 0; }
#audioPanel-voiceclone .vc-delivery-expr input[type="range"] { width: 100%; accent-color: var(--tc-accent, #8b5cf6); }
#audioPanel-voiceclone .vc-range-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--tc-text-muted, #94a3b8); }
