/* HISAB_VOICE_ASSISTANT_STYLES_V2 */
.voice-command-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .48fr);
  gap: 12px;
  margin-top: 18px;
}

.voice-command-button,
.wake-toggle-button {
  min-height: 78px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.voice-command-button {
  padding: 14px 18px;
  border: 1px solid rgba(21, 128, 61, .35);
  background:
    radial-gradient(circle at 88% 20%, rgba(255,255,255,.24), transparent 8rem),
    linear-gradient(135deg, var(--green-800), var(--green-950));
  color: white;
  box-shadow: 0 16px 30px rgba(20,83,45,.20);
}

.voice-command-button:hover,
.wake-toggle-button:hover {
  transform: translateY(-1px);
}

.voice-command-button:focus-visible,
.wake-toggle-button:focus-visible {
  outline: 3px solid rgba(34,197,94,.24);
  outline-offset: 2px;
}

.voice-command-button.listening {
  animation: voiceButtonPulse 1.2s ease-in-out infinite;
}

.voice-mic-shell {
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--green-950);
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 8px 18px rgba(0,0,0,.12);
}

.voice-command-copy,
.wake-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.voice-command-copy strong,
.wake-toggle-copy strong {
  font-size: 1.02rem;
  line-height: 1.15;
}

.voice-command-copy small {
  color: rgba(255,255,255,.82);
  font-weight: 500;
  line-height: 1.35;
}

.wake-toggle-button {
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(20,45,28,.07);
}

.wake-toggle-button.active {
  border-color: #86efac;
  background: linear-gradient(145deg, #f0fdf4, #dcfce7);
  color: var(--green-900);
}

.wake-toggle-copy small {
  color: var(--muted);
  font-weight: 500;
}

.wake-toggle-button.active .wake-toggle-copy small {
  color: var(--green-700);
}

.wake-led {
  width: 13px;
  min-width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 6px rgba(148,163,184,.13);
}

.wake-toggle-button.active .wake-led {
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22,163,74,.14), 0 0 18px rgba(22,163,74,.45);
  animation: wakeLedPulse 1.6s ease-in-out infinite;
}

.voice-status {
  margin: 11px 2px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .84rem;
}

.voice-status-dot {
  width: 8px;
  min-width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.voice-status.active .voice-status-dot {
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(22,163,74,.12);
}

.voice-status.warning .voice-status-dot {
  background: #d97706;
  box-shadow: 0 0 0 5px rgba(217,119,6,.10);
}

.voice-conversation {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}

.voice-message {
  padding: 10px 12px;
  border-radius: 13px;
}

.voice-message span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.voice-message p {
  margin: 0;
  line-height: 1.45;
}

.voice-message.user {
  background: #f8faf9;
  border: 1px solid #e8ece9;
}

.voice-message.assistant {
  background: var(--green-50);
  border: 1px solid #bbf7d0;
  color: var(--green-950);
}

.voice-agent-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.voice-agent-form input {
  min-height: 50px;
}

.voice-agent-form .primary {
  min-width: 104px;
}

.agent-result {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 22px rgba(20,45,28,.05);
}

.voice-settings-card {
  background:
    radial-gradient(circle at top right, rgba(220,252,231,.78), transparent 28rem),
    white;
}

.voice-enrollment-box {
  margin-top: 18px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.78);
}

.voice-enrollment-box p {
  margin: 5px 0 0;
  color: var(--muted);
}

.voice-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.voice-enrollment-box .voice-settings-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.voice-privacy-note {
  margin-top: 16px;
  font-size: .83rem;
}

.voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: white;
  background: rgba(5,46,22,.93);
  backdrop-filter: blur(15px);
}

.voice-overlay p {
  margin: 0;
  color: #dcfce7;
  max-width: 480px;
  line-height: 1.5;
}

.voice-overlay .ghost {
  margin-top: 8px;
  color: white;
  border-color: rgba(255,255,255,.35);
}

.voice-orb {
  width: 108px;
  height: 108px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 32px;
  background: linear-gradient(145deg, #22c55e, #14532d);
  box-shadow: 0 24px 50px rgba(0,0,0,.28), 0 0 0 12px rgba(255,255,255,.08);
}

.voice-orb span {
  width: 7px;
  height: 24px;
  border-radius: 99px;
  background: white;
  animation: voiceBars 1s ease-in-out infinite;
}

.voice-orb span:nth-child(2) {
  height: 44px;
  animation-delay: .14s;
}

.voice-orb span:nth-child(3) {
  height: 32px;
  animation-delay: .28s;
}

@keyframes voiceBars {
  0%, 100% { transform: scaleY(.55); opacity: .62; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes voiceButtonPulse {
  0%, 100% { box-shadow: 0 16px 30px rgba(20,83,45,.20); }
  50% { box-shadow: 0 18px 38px rgba(34,197,94,.42), 0 0 0 7px rgba(34,197,94,.10); }
}

@keyframes wakeLedPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(.82); }
}

@media (max-width: 760px) {
  .voice-command-console {
    grid-template-columns: 1fr;
  }

  .wake-toggle-button {
    min-height: 64px;
  }

  .voice-enrollment-box {
    align-items: stretch;
    flex-direction: column;
  }

  .voice-enrollment-box .voice-settings-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .voice-command-button {
    min-height: 82px;
  }

  .voice-agent-form {
    grid-template-columns: 1fr;
  }

  .voice-agent-form .primary {
    width: 100%;
  }
}
