.voice-panel {
  position: static;
  z-index: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: fit-content;
  min-width: 0;
  margin: 7px 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.voice-panel button {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 50%;
  color: #64748b;
  background: rgba(2, 6, 23, .42);
  font-size: 1rem;
  filter: grayscale(1);
  opacity: .78;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease,
    opacity 220ms ease,
    transform 220ms ease;
}

.voice-panel.idle button,
.voice-panel.loading button,
.voice-panel.fallback button,
.voice-panel.listening button,
.voice-panel.speaking button {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, .42);
  filter: none;
  opacity: 1;
}

.voice-panel.loading button,
.voice-panel.fallback button,
.voice-panel.listening button,
.voice-panel.speaking button {
  background: rgba(14, 165, 233, .12);
  box-shadow: 0 0 18px rgba(56, 189, 248, .2);
  animation: voice-indicator-pulse 1.6s ease-in-out infinite;
}

.voice-panel.speaking button {
  animation-duration: .9s;
}

.voice-panel.error button {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, .38);
  background: rgba(127, 29, 29, .12);
  filter: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes voice-indicator-pulse {
  0%, 100% { transform: scale(.96); opacity: .72; }
  50% { transform: scale(1.05); opacity: 1; }
}

@media (max-width: 720px) {
  .voice-panel {
    margin-top: 6px;
  }

  .voice-panel button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
  }
}
