.messages-compose.has-voice-input,
.chat-input-area.has-voice-input {
  gap: 6px;
}

.btn-voice-input {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--lotus-border, rgba(255, 255, 255, 0.12));
  background: var(--lotus-bg, rgba(255, 255, 255, 0.04));
  color: var(--lotus-text, #f5f0e8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.btn-voice-input .voice-icon {
  position: relative;
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: inherit;
  line-height: 0;
}

.btn-voice-input .voice-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-voice-input:hover:not(:disabled) {
  border-color: var(--lotus-primary, #b8924a);
  transform: translateY(-1px);
}

.btn-voice-input.is-listening {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
  animation: voice-pulse 1.2s ease-in-out infinite;
}

.btn-voice-input.is-listening .voice-icon::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.messages-compose.voice-listening input,
.chat-input-area.voice-listening input {
  border-color: rgba(239, 68, 68, 0.45);
}

@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Fallback website chat widget */
#fallback-chat-widget .btn-voice-input {
  width: 42px;
  height: 42px;
  border-color: rgba(184, 146, 74, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #f5f0e8;
}

#fallback-chat-widget .btn-voice-input.is-listening {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}
