/* Голосовой разговор симптом-чекера — стили взяты из голосового режима
   AI-тьютора кабинета (voice_archive.css), адаптированы под теал-тему чекера.
   Самодостаточны: страница чекера не подключает переменные кабинета, поэтому
   палитра захардкожена локально. */

.voice-mode-overlay[hidden],
.voice-mode-voice-picker[hidden] { display: none !important; }

.voice-mode-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.voice-mode-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.voice-mode-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px 24px 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.voice-mode-orb {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.voice-mode-orb-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #0d9488;
  opacity: 0.18;
  animation: vm-orb-pulse 2.4s ease-in-out infinite;
}
.voice-mode-orb-core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.4);
}
@keyframes vm-orb-pulse {
  0%, 100% { transform: scale(1); opacity: 0.18; }
  50%      { transform: scale(1.18); opacity: 0.3; }
}
.voice-mode-orb.is-speaking .voice-mode-orb-pulse { animation-duration: 0.9s; opacity: 0.32; }
.voice-mode-orb.is-speaking .voice-mode-orb-core { animation: vm-orb-speak 0.9s ease-in-out infinite; }
@keyframes vm-orb-speak {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.voice-mode-status {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  text-align: center;
  min-height: 1.4em;
}
.voice-mode-transcript {
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f8fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.voice-mode-transcript:empty { display: none; }
.voice-mode-line { padding: 8px 12px; border-radius: 12px; word-wrap: break-word; }
.voice-mode-line-user {
  align-self: flex-end;
  background: #0d9488;
  color: #fff;
  max-width: 88%;
}
.voice-mode-line-assistant {
  align-self: flex-start;
  background: #ffffff;
  color: #0f172a;
  max-width: 92%;
  border: 1px solid #e2e8f0;
}
.voice-mode-controls { display: flex; gap: 10px; width: 100%; margin-top: 4px; }
.voice-mode-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.voice-mode-btn:hover { background: #f6f8fb; }
.voice-mode-btn:active { transform: scale(0.98); }
.voice-mode-btn-secondary.is-muted { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.voice-mode-btn-end { background: #ef4444; border-color: #ef4444; color: #fff; }
.voice-mode-btn-end:hover { background: #dc2626; border-color: #dc2626; }

/* Voice picker */
.voice-mode-voice-row { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.voice-mode-voice-toggle {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f6f8fb;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.voice-mode-voice-toggle:hover { background: #ccfbf1; color: #0f766e; }
.voice-mode-voice-toggle-label { font-weight: 500; }
.voice-mode-voice-toggle-name { font-weight: 700; color: #0f172a; }
.voice-mode-voice-toggle-chev { transition: transform 0.18s ease; }
.voice-mode-voice-toggle[aria-expanded="true"] .voice-mode-voice-toggle-chev { transform: rotate(180deg); }
.voice-mode-voice-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 4px 4px;
  animation: vm-picker-pop 0.18s ease-out;
}
@keyframes vm-picker-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.voice-mode-voice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.voice-mode-voice-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.voice-mode-voice-chip:hover { background: #ccfbf1; border-color: #ccfbf1; }
.voice-mode-voice-chip.is-active { background: #0d9488; border-color: #0d9488; color: #fff; }
.voice-mode-voice-chip.is-active .voice-mode-voice-chip-hint { color: rgba(255, 255, 255, 0.85); }
.voice-mode-voice-chip-name { font-size: 0.92rem; font-weight: 700; }
.voice-mode-voice-chip-hint { font-size: 0.78rem; color: #475569; }
.voice-mode-voice-hint {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: #475569;
  opacity: 0.8;
  line-height: 1.4;
}

[dir="rtl"] .voice-mode-line-user { align-self: flex-start; }
[dir="rtl"] .voice-mode-line-assistant { align-self: flex-end; }

@media (max-width: 480px) {
  .voice-mode-panel { padding: 28px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .voice-mode-orb-pulse, .voice-mode-orb-core { animation: none !important; }
}
