/* === Голосовой помощник «Поболтай со мной» === */

.voice-cta {
  display: inline-flex; align-items: center; gap: .8rem;
  padding: 18px 28px;
  background: linear-gradient(135deg, #D9772B 0%, #C36A24 100%);
  color: #1E1C1A;
  border: 0; border-radius: 9999px;
  font-weight: 700; font-size: 16px;
  cursor: pointer; user-select: none;
  box-shadow:
    0 0 0 4px rgba(217, 119, 43, 0.18),
    0 12px 32px -8px rgba(217, 119, 43, 0.55);
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.voice-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 6px rgba(217, 119, 43, 0.25),
    0 18px 40px -8px rgba(217, 119, 43, 0.65);
}
.voice-cta .mic-pulse {
  position: relative; width: 26px; height: 26px;
  display: grid; place-items: center;
}
.voice-cta .mic-pulse::before,
.voice-cta .mic-pulse::after {
  content: ''; position: absolute; inset: -2px;
  border: 2px solid #1E1C1A; border-radius: 50%;
  opacity: .65; animation: micPulse 2.4s ease-out infinite;
}
.voice-cta .mic-pulse::after { animation-delay: 1.2s; }
@keyframes micPulse {
  0%   { transform: scale(.85); opacity: .65; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { opacity: 0; }
}
.voice-cta .mic-pulse svg { width: 14px; height: 14px; color: #1E1C1A; z-index:1; }
.voice-cta .voice-sub {
  font-size: 11px; font-weight: 500;
  opacity: .75; letter-spacing: .04em;
  display: block; line-height: 1.2; margin-top: 2px;
}

/* Модалка голосового диалога */
.voice-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(20, 16, 12, .82);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.voice-modal.show { display: flex; }

.voice-box {
  width: 100%; max-width: 540px;
  background: #27241F;
  border: 1px solid rgba(217, 119, 43, .30);
  border-radius: 26px;
  padding: 26px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  max-height: 90vh; overflow-y: auto;
  color: #F5F2EB;
}

.voice-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: 1px solid rgba(245, 242, 235, .15);
  background: transparent;
  color: rgba(245, 242, 235, .65);
  border-radius: 50%; cursor: pointer;
  font-size: 18px; line-height: 1;
  display: grid; place-items: center;
  transition: all .15s ease;
}
.voice-close:hover { color: #D9772B; border-color: #D9772B; }

.voice-head {
  display: flex; align-items: center; gap: 14px;
}
.voice-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #D9772B 0%, #0B4A3A 100%);
  display: grid; place-items: center;
  font-size: 26px;
  box-shadow: 0 8px 20px -6px rgba(217,119,43,.45);
}
.voice-head-text { flex: 1; min-width: 0; }
.voice-head-text .ttl { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; line-height: 1.1; }
.voice-head-text .sub { font-size: 12px; color: rgba(245,242,235,.6); margin-top: 2px; }

/* Переключатель режимов */
.voice-mode-row {
  display: flex; gap: 6px;
  background: rgba(20,16,12,.45);
  border: 1px solid rgba(245,242,235,.08);
  border-radius: 12px;
  padding: 4px;
}
.voice-mode-row button {
  flex: 1;
  background: transparent; border: 0; color: rgba(245,242,235,.7);
  padding: 8px 10px; border-radius: 9px;
  font-size: 12.5px; cursor: pointer;
  transition: all .15s ease;
}
.voice-mode-row button:hover { color: #F5F2EB; }
.voice-mode-row button.active {
  background: rgba(217,119,43,.18);
  color: #F5F2EB;
  border: 1px solid rgba(217,119,43,.45);
}

/* Большой кружок-микрофон */
.voice-mic-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 0;
}
.voice-mic {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(217,119,43,.10);
  border: 2px solid rgba(217,119,43,.40);
  display: grid; place-items: center;
  font-size: 48px; color: #D9772B;
  cursor: pointer; user-select: none;
  transition: all .15s ease;
  position: relative;
}
.voice-mic:hover { background: rgba(217,119,43,.18); }
.voice-mic.listening {
  background: rgba(217,119,43,.25);
  border-color: #D9772B;
  animation: micListen 1.4s ease-in-out infinite;
}
@keyframes micListen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,119,43,.45); }
  50%      { box-shadow: 0 0 0 18px rgba(217,119,43,0); }
}
.voice-mic.speaking {
  background: rgba(11,74,58,.30);
  border-color: #138562;
  color: #138562;
}
.voice-mic.ready {
  background: rgba(217,119,43,.18);
  border-color: #D9772B;
  animation: micReady 1.8s ease-in-out infinite;
}
@keyframes micReady {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217,119,43,.35); }
  50%      { transform: scale(1.03); box-shadow: 0 0 0 12px rgba(217,119,43,0); }
}
.voice-status {
  font-size: 13px; color: rgba(245,242,235,.7);
  text-align: center; min-height: 18px;
}

/* Лента диалога */
.voice-log {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 220px; overflow-y: auto;
  padding: 4px 2px;
}
.voice-msg {
  padding: 8px 12px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.4;
  max-width: 88%;
}
.voice-msg.bot {
  background: rgba(11,74,58,.30);
  border: 1px solid rgba(11,74,58,.50);
  color: #F5F2EB;
  align-self: flex-start;
}
.voice-msg.user {
  background: rgba(217,119,43,.18);
  border: 1px solid rgba(217,119,43,.35);
  color: #F5F2EB;
  align-self: flex-end;
  text-align: right;
}

/* Прогресс шагов */
.voice-progress {
  display: flex; justify-content: center; gap: 6px;
  margin-bottom: 2px;
}
.voice-progress span {
  width: 32px; height: 4px; border-radius: 999px;
  background: rgba(245,242,235,.12);
  transition: background .2s ease;
}
.voice-progress span.done   { background: rgba(217,119,43,.55); }
.voice-progress span.active { background: #D9772B; }

/* Кнопки-варианты + finish */
.voice-quick {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.voice-quick button {
  background: transparent;
  border: 1px solid rgba(245,242,235,.18);
  color: rgba(245,242,235,.85);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; cursor: pointer; user-select: none;
  transition: all .15s ease;
}
.voice-quick button:hover { border-color: #D9772B; color: #D9772B; }

.voice-finish {
  display: block; width: 100%; text-align: center;
  background: #D9772B; color: #1E1C1A;
  border: 0; border-radius: 16px;
  padding: 14px 18px; font-weight: 700;
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease;
}
.voice-finish:hover { background: #C36A24; }

.voice-skip-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; color: rgba(245,242,235,.55);
}
.voice-skip-row button {
  background: transparent; border: 0; color: rgba(245,242,235,.55);
  cursor: pointer; font-size: 12px;
  text-decoration: underline; text-decoration-color: rgba(245,242,235,.25);
}
.voice-skip-row button:hover { color: #D9772B; text-decoration-color: #D9772B; }

.voice-no-mic-warn {
  background: rgba(217, 100, 30, .12);
  border: 1px solid rgba(217, 100, 30, .35);
  color: rgba(245,242,235,.85);
  padding: 10px 12px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.4;
}
