.voice-input-field {
  position: relative;
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.voice-input-field > textarea,
.voice-input-field > input {
  padding-right: 48px !important;
}

.voice-input-button {
  position: absolute;
  top: 10px;
  right: 9px;
  z-index: 1;
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #d7e3dc;
  border-radius: 50%;
  background: #fff;
  color: #159447;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(11, 39, 75, 0.12);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.voice-input-button.is-supported { display: grid; }
.voice-input-field.is-single-line .voice-input-button { top: 50%; transform: translateY(-50%); }
.voice-input-field.is-single-line .voice-input-button:hover { transform: translateY(calc(-50% - 1px)); }

.voice-input-button:hover { transform: translateY(-1px); }
.voice-input-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }

.voice-input-button.is-listening {
  border-color: #ef4444;
  background: #fee2e2;
  color: #dc2626;
  animation: voice-input-pulse 1.15s ease-in-out infinite;
}

@keyframes voice-input-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .32); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .voice-input-button { transition: none; }
  .voice-input-button.is-listening { animation: none; }
}

.voice-input-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 8px;
  background: #1e293b;
  color: #fff;
  font: 600 13px/1.4 Inter, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .2s ease, transform .2s ease;
}

.voice-input-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
