/* Shared microphone control for roleplay and collaboration lab. */
.voice-mic-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid #aec6b5;
  border-radius: 13px;
  background: #eef5ef;
  color: #416d57;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.voice-mic-button svg {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}
.voice-mic-button:focus-visible { outline: 2px solid #537e64; outline-offset: 2px; }
.voice-mic-button.is-recording {
  background: #fff0ee;
  border-color: #d89b91;
  color: #ad4437;
  animation: voice-record-pulse 1.8s ease-in-out infinite;
}
.voice-mic-button.is-processing {
  opacity: 1;
  cursor: progress;
  background: #eaf3ed;
  border-color: #a2bfad;
}
.voice-progress-ring {
  display: block;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  border: 2.5px solid #b8d2c2;
  border-top-color: #40735a;
  border-radius: 50%;
  animation: voice-transcribe-spin .85s linear infinite;
}
.voice-input-status.is-processing { color: #416d57; }
.voice-input-status.is-processing::before {
  content: "";
  display: inline-block;
  vertical-align: -3px;
  margin-right: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid #b8d2c2;
  border-top-color: #40735a;
  border-radius: 50%;
  animation: voice-transcribe-spin 1s linear infinite;
}
@keyframes voice-transcribe-spin { to { transform: rotate(360deg); } }
.voice-input-status {
  margin: 6px 2px 0;
  color: #526e5c;
  font-size: 12px;
  line-height: 1.5;
}
.voice-input-status:empty { display: none; }
.voice-input-status.is-error { color: #a3473b; }
@keyframes voice-record-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(173,68,55,.12); }
  50% { box-shadow: 0 0 0 5px rgba(173,68,55,.04); }
}
@media (prefers-reduced-motion: reduce) {
  .voice-mic-button.is-recording { animation: none; }
  .voice-progress-ring, .voice-input-status.is-processing::before { animation: none; }
}
