/* ═══════════════════════════════════════════════════════════════════════
   MULTI-SAMPLE VOICE CLONE — UI extensions (v.20260522)
   Progress ring + duration picker + quality bars + external + connect tile
   ═══════════════════════════════════════════════════════════════════════ */

/* ── PROGRESS RING (SVG) — replaces old plexus-like badge ─────── */
.voiceA-progress-ring {
  position: relative;
  width: 240px;
  height: 240px;
  margin-bottom: 18px;
}
.voiceA-progress-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.voiceA-progress-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}
.voiceA-progress-fill {
  fill: none;
  stroke: #66d9ff;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(102, 217, 255, 0.5));
}
.voiceA-progress-ring.is-poor   .voiceA-progress-fill { stroke: #ff6b6b; filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.5)); }
.voiceA-progress-ring.is-fair   .voiceA-progress-fill { stroke: #ffd96a; filter: drop-shadow(0 0 8px rgba(255, 217, 106, 0.5)); }
.voiceA-progress-ring.is-good   .voiceA-progress-fill { stroke: #66ff9b; filter: drop-shadow(0 0 8px rgba(102, 255, 155, 0.5)); }
.voiceA-progress-ring.is-great  .voiceA-progress-fill { stroke: #ffd700; filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7)); }

.voiceA-progress-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}
.voiceA-progress-pct {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.voiceA-progress-ring.is-great .voiceA-progress-pct { color: #ffd700; text-shadow: 0 0 16px rgba(255, 215, 0, 0.4); }
.voiceA-progress-duration {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1.5px;
}

/* Status colors — extend existing .voiceA-status-value */
.voiceA-status-value.is-poor   { color: #ff6b6b; text-shadow: 0 0 12px rgba(255, 107, 107, 0.5); }
.voiceA-status-value.is-fair   { color: #ffd96a; text-shadow: 0 0 12px rgba(255, 217, 106, 0.5); }
.voiceA-status-value.is-good   { color: #66ff9b; text-shadow: 0 0 12px rgba(102, 255, 155, 0.5); }
.voiceA-status-value.is-great  { color: #ffd700; text-shadow: 0 0 14px rgba(255, 215, 0, 0.6); }

/* Target hit notification */
.voiceA-record-target-hit {
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(0, 0, 0, 0.3) 100%);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #ffd700;
  text-align: center;
  line-height: 1.5;
}

/* ── DURATION PICKER CHIPS (modal pick-duration state) ────────── */
.voice-modal-pick-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.05) 0%, rgba(0, 0, 0, 0.3) 100%);
  border: 1px solid rgba(102, 217, 255, 0.25);
  border-radius: 10px;
  text-align: center;
}
.voice-modal-pick-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}
.voice-modal-pick-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  max-width: 480px;
}
.voice-modal-pick-sub strong { color: #66d9ff; font-weight: 700; }
.voice-modal-pick-chips {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 480px;
}
.voice-modal-pick-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.18s ease;
}
.voice-modal-pick-chip:hover {
  background: rgba(102, 217, 255, 0.08);
  border-color: rgba(102, 217, 255, 0.5);
  transform: translateY(-2px);
}
.voice-modal-pick-chip.is-recommended {
  border-color: rgba(0, 212, 170, 0.5);
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
  box-shadow: 0 0 12px rgba(0, 212, 170, 0.2);
}
.voice-modal-pick-chip.is-recommended:hover {
  border-color: #00d4aa;
  box-shadow: 0 0 18px rgba(0, 212, 170, 0.35);
}
.voice-modal-pick-chip-dur {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #66d9ff;
}
.voice-modal-pick-chip.is-recommended .voice-modal-pick-chip-dur { color: #00d4aa; }
.voice-modal-pick-chip-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
}

/* ── PER-CARD QUALITY BAR (archive items) ────────────────────── */
.voiceA-archive-item-quality {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.voiceA-archive-item-quality-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.voiceA-archive-item-quality-fill {
  height: 100%;
  background: #66d9ff;
  border-radius: 2px;
  transition: width 0.5s ease, background 0.3s ease;
}
.voiceA-archive-item-quality-fill.is-poor   { background: #ff6b6b; }
.voiceA-archive-item-quality-fill.is-fair   { background: #ffd96a; }
.voiceA-archive-item-quality-fill.is-good   { background: #66ff9b; }
.voiceA-archive-item-quality-fill.is-great  { background: linear-gradient(90deg, #ffd700 0%, #ffb86a 100%); }
.voiceA-archive-item-quality-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.voiceA-archive-item-quality-status {
  font-weight: 700;
  letter-spacing: 1px;
}
.voiceA-archive-item-quality-status.is-poor  { color: #ff8a8a; }
.voiceA-archive-item-quality-status.is-fair  { color: #ffd96a; }
.voiceA-archive-item-quality-status.is-good  { color: #66ff9b; }
.voiceA-archive-item-quality-status.is-great { color: #ffd700; }
.voiceA-archive-item-quality-dur {
  color: rgba(255, 255, 255, 0.5);
}

/* ── ADD SAMPLE BUTTON (mint + chip v archive actions) ───────── */
.voiceA-add-sample-btn {
  color: #00d4aa !important;
  border-color: rgba(0, 212, 170, 0.4) !important;
  font-weight: 800;
}
.voiceA-add-sample-btn:hover {
  background: rgba(0, 212, 170, 0.15) !important;
  border-color: rgba(0, 212, 170, 0.7) !important;
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.35);
}

/* ── EXTERNAL VOICE (imported from ElevenLabs) ───────────────── */
.voiceA-archive-item.is-external {
  border-color: rgba(200, 154, 255, 0.35);
}
.voiceA-archive-item-external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(200, 154, 255, 0.15);
  border: 1px solid rgba(200, 154, 255, 0.5);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: #c89aff;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.voiceA-archive-item-external-row {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(200, 154, 255, 0.7);
  background: rgba(200, 154, 255, 0.04);
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* ── LEFT PANEL — EXTERNAL VOICE MODE (purple) ───────────────── */
/* Keď je default voice external, LEFT panel skrýva quality meter (nie je
   relevantný — external je trénovaný mimo) a zobrazuje EXTERNÝ HLAS badge
   + info o pripojenom hlase + CTA na pridanie lokálneho. */
.voiceA-left.is-external-mode {
  background: linear-gradient(180deg, rgba(200, 154, 255, 0.05) 0%, rgba(0, 0, 0, 0.35) 100%);
  border-color: rgba(200, 154, 255, 0.25);
}
.voiceA-ext-badge {
  position: relative;
  width: 240px;
  height: 240px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.voiceA-ext-badge-glow {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 154, 255, 0.4) 0%, transparent 70%);
  filter: blur(20px);
  animation: voiceA-ext-pulse 3s ease-in-out infinite;
}
@keyframes voiceA-ext-pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.6; }
  50%      { transform: scale(1.05); opacity: 1; }
}
.voiceA-ext-badge-icon {
  position: relative;
  z-index: 2;
  font-size: 90px;
  filter: drop-shadow(0 0 20px rgba(200, 154, 255, 0.7));
}
.voiceA-status-value-ext {
  color: #c89aff !important;
  text-shadow: 0 0 14px rgba(200, 154, 255, 0.6) !important;
}
.voiceA-status-sync-ext {
  color: #c89aff !important;
  text-shadow: 0 0 8px rgba(200, 154, 255, 0.4) !important;
}
.voiceA-ext-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(200, 154, 255, 0.04);
  border: 1px solid rgba(200, 154, 255, 0.18);
  border-radius: 8px;
}
.voiceA-ext-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.voiceA-ext-info-key {
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.voiceA-ext-info-val {
  color: #ffffff;
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voiceA-ext-info-mono {
  color: #c89aff;
  font-size: 10.5px;
}
.voiceA-ext-info-note {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(200, 154, 255, 0.2);
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  letter-spacing: normal;
}

/* Secondary CTA — keď je default external, "nahrať lokálny" je optional */
.voiceA-cta-record-secondary {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.12) 0%, rgba(0, 0, 0, 0.3) 100%) !important;
  border: 1px solid rgba(0, 212, 170, 0.4) !important;
  color: #00d4aa !important;
  font-size: 13px !important;
  box-shadow: none !important;
}
.voiceA-cta-record-secondary:hover:not(:disabled) {
  background: rgba(0, 212, 170, 0.2) !important;
  border-color: rgba(0, 212, 170, 0.7) !important;
  box-shadow: 0 0 12px rgba(0, 212, 170, 0.3) !important;
}

/* ── CONNECT TILE (pripoj svoj ElevenLabs hlas) ──────────────── */
.voiceA-connect-tile {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(200, 154, 255, 0.05) 0%, rgba(0, 0, 0, 0.35) 100%);
  border: 1px solid rgba(200, 154, 255, 0.25);
  border-radius: 12px;
  overflow: hidden;
}
.voiceA-connect-tile .voiceA-tile-body {
  padding: 14px 16px;     /* decentné okraje aby text + input nelezli k hranám */
}
.voiceA-connect-help {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  margin-bottom: 12px;
}
.voiceA-connect-help strong { color: #c89aff; font-weight: 700; }
.voiceA-connect-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}
.voiceA-connect-input::placeholder { color: rgba(255, 255, 255, 0.3); }
.voiceA-connect-input:focus {
  border-color: rgba(200, 154, 255, 0.5);
  background: rgba(200, 154, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(200, 154, 255, 0.08);
}
.voiceA-connect-advanced {
  margin-bottom: 10px;
}
.voiceA-connect-advanced summary {
  cursor: pointer;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  padding: 4px 0;
  outline: none;
  user-select: none;
}
.voiceA-connect-advanced summary:hover { color: #c89aff; }
.voiceA-connect-advanced[open] summary { color: #c89aff; margin-bottom: 6px; }
.voiceA-connect-input-key { margin-top: 4px; }
.voiceA-connect-hint-small {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
  margin-top: -4px;
}
.voiceA-connect-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(200, 154, 255, 0.22) 0%, rgba(200, 154, 255, 0.08) 100%);
  border: 1px solid rgba(200, 154, 255, 0.5);
  border-radius: 8px;
  color: #c89aff;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.voiceA-connect-btn:hover:not(:disabled) {
  background: rgba(200, 154, 255, 0.28);
  border-color: rgba(200, 154, 255, 0.75);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(200, 154, 255, 0.25);
}
.voiceA-connect-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* TEXT KNIZNICA - title + counter + cycle button v modal-i */
.voice-modal-text-header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.voice-modal-text-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.voice-modal-text-title {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.voice-modal-text-counter {
  padding: 2px 8px;
  background: rgba(102, 217, 255, 0.1);
  border: 1px solid rgba(102, 217, 255, 0.3);
  border-radius: 10px;
  color: #66d9ff;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
}
.voice-modal-text-cycle {
  padding: 4px 10px;
  background: rgba(102, 217, 255, 0.08);
  border: 1px solid rgba(102, 217, 255, 0.3);
  border-radius: 6px;
  color: #66d9ff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.voice-modal-text-cycle:hover {
  background: rgba(102, 217, 255, 0.18);
  border-color: rgba(102, 217, 255, 0.6);
  transform: translateY(-1px);
}
