/* Hervoice lives inside the existing voice-call footer. It is a state line,
   not a second call surface or a claim that a real call has succeeded. */

.hervoice-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0;
}

.hervoice-state[hidden] {
  display: none;
}

.hervoice-state-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8a8a8a;
}

.hervoice-state-copy {
  min-width: 0;
  max-width: min(72vw, 420px);
  overflow-wrap: anywhere;
}

.hervoice-state[data-state="listening"] .hervoice-state-dot,
.hervoice-state[data-state="analyzing"] .hervoice-state-dot {
  background: #16836f;
}

.hervoice-state[data-state="analyzing"] .hervoice-state-dot {
  animation: hervoicePulse 900ms ease-in-out infinite;
}

.hervoice-state[data-state="analyzed"] {
  color: #146c5b;
}

.hervoice-state[data-state="analyzed"] .hervoice-state-dot {
  background: #16836f;
}

.hervoice-state[data-state="reconnecting"],
.hervoice-state[data-state="degraded"] {
  color: #8a5b10;
}

.hervoice-state[data-state="reconnecting"] .hervoice-state-dot,
.hervoice-state[data-state="degraded"] .hervoice-state-dot {
  background: #b5791a;
}

@keyframes hervoicePulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (prefers-color-scheme: dark) {
  .hervoice-state[data-state="analyzed"] {
    color: #66cbb6;
  }

  .hervoice-state[data-state="reconnecting"],
  .hervoice-state[data-state="degraded"] {
    color: #e4b55d;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hervoice-state[data-state="analyzing"] .hervoice-state-dot {
    animation: none;
  }
}

