/**
 * LuxOn Chat Premium - voice mic button. Sits in the composer (.lxc-input) next
 * to Send, inheriting the widget's sizing. States: idle, loading (pulse),
 * live (recording), error (shake).
 */

#luxon-chat-root .lxc-input .lxc-mic {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  /* Inherit the widget's brand accent (cyan on Stark-dark, blue on Trust Blue,
     or a client's custom focus color) instead of a hardcoded color. */
  background: var(--lxc-focus, #22C7D3);
  transition: filter .15s ease, transform .1s ease;
}
#luxon-chat-root .lxc-input .lxc-mic:hover { filter: brightness(.92); }
#luxon-chat-root .lxc-input .lxc-mic:active { transform: scale(.94); }

#luxon-chat-root .lxc-input .lxc-mic.lxc-mic-loading {
  background: #6b7280;
  animation: lxc-mic-pulse 1s ease-in-out infinite;
}

#luxon-chat-root .lxc-input .lxc-mic.lxc-mic-live {
  background: #dc2626;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, .55);
  animation: lxc-mic-ring 1.4s ease-out infinite;
}

#luxon-chat-root .lxc-input .lxc-mic.lxc-mic-error {
  background: #b45309;
  animation: lxc-mic-shake .35s ease-in-out 0s 2;
}

@keyframes lxc-mic-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes lxc-mic-ring {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .55); }
  70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@keyframes lxc-mic-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  #luxon-chat-root .lxc-input .lxc-mic.lxc-mic-loading,
  #luxon-chat-root .lxc-input .lxc-mic.lxc-mic-live,
  #luxon-chat-root .lxc-input .lxc-mic.lxc-mic-error { animation: none; }
}
