/* voice.css v0.1.0 — 30.08.2026 — первый выпуск: кнопка микрофона, строка голосового режима, индикаторы фаз */

.icon-btn.mic { color: var(--accent); border-color: #bae6fd; background: var(--accent-soft); }
.icon-btn.mic:hover { color: var(--accent); border-color: var(--accent-2); }
.icon-btn.mic.on {
  color: #fff; background: #dc2626; border-color: #dc2626;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, .45);
  animation: mic-pulse 1.6s ease-out infinite;
}
@keyframes mic-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); }
  70% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.voice-bar {
  max-width: var(--content); margin: 0 auto 8px;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow); font-size: 13px; color: var(--text-2);
}
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: 0 0 10px; }
.voice-bar.listening .voice-dot { background: #dc2626; animation: dot-pulse 1s ease-in-out infinite; }
.voice-bar.recognizing .voice-dot { background: var(--warn); animation: dot-pulse .6s ease-in-out infinite; }
.voice-bar.answering .voice-dot { background: var(--accent-2); animation: dot-pulse .8s ease-in-out infinite; }
.voice-bar.speaking .voice-dot { background: var(--good); animation: dot-pulse .5s ease-in-out infinite; }
.voice-bar.note .voice-dot { background: var(--warn); }
@keyframes dot-pulse { 50% { opacity: .35; transform: scale(.85); } }
.voice-status { flex: 1; font-weight: 600; color: var(--text); }
.voice-level { width: 70px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.voice-level > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--good)); transition: width .08s linear; }
.voice-bar:not(.listening) .voice-level { opacity: .35; }

@media (max-width: 900px) {
  .voice-bar { margin-bottom: 6px; }
  .composer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
