/* ═══════════════════════════════════════════════════════
   Axe Arena – Chatbot Widget Styles
   Dark theme matching plugin aesthetic
═══════════════════════════════════════════════════════ */

#axe-chatbot-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── Launch Button ── */
#axe-chat-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--axe-chat-primary, #FF6B35);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.45), 0 2px 8px rgba(0,0,0,.3);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  position: relative;
  outline: none;
}
#axe-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(255, 107, 53, 0.55), 0 3px 12px rgba(0,0,0,.35);
}
#axe-chat-btn:active { transform: scale(0.97); }

.axe-chat-btn-icon { display: flex; align-items: center; justify-content: center; }

.axe-chat-unread-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  background: #ef4444;
  border: 2px solid #fff;
  border-radius: 50%;
  animation: axe-pulse 2s ease-in-out infinite;
}
@keyframes axe-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.2); opacity: .8; }
}

/* ── Chat Window ── */
.axe-chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  max-height: 560px;
  background: #12141f;
  border: 1px solid rgba(255,107,53,.25);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 4px 20px rgba(255,107,53,.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: axe-chat-open .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes axe-chat-open {
  from { opacity: 0; transform: scale(.85) translateY(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* ── Header ── */
.axe-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a1d2e 0%, #111320 100%);
  border-bottom: 1px solid rgba(255,107,53,.2);
  flex-shrink: 0;
}
.axe-chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B35, #FFB347);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.axe-chat-header-info { flex: 1; min-width: 0; }
.axe-chat-header-name {
  font-weight: 700;
  font-size: 14.72px;
  color: #E8EAF0;
  letter-spacing: .02em;
}
.axe-chat-header-status {
  font-size: 11.84px;
  color: #7B8099;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.axe-chat-status-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  flex-shrink: 0;
}
.axe-chat-header-close {
  background: none;
  border: none;
  color: #7B8099;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color .15s, background .15s;
}
.axe-chat-header-close:hover { color: #E8EAF0; background: rgba(255,255,255,.07); }

/* ── Messages ── */
.axe-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.axe-chat-messages::-webkit-scrollbar { width: 4px; }
.axe-chat-messages::-webkit-scrollbar-track { background: transparent; }
.axe-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* Bubbles */
.axe-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: axe-msg-in .2s ease-out;
}
@keyframes axe-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.axe-msg.bot  { align-self: flex-start; align-items: flex-start; }
.axe-msg.user { align-self: flex-end;   align-items: flex-end; }

.axe-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.axe-msg.bot  .axe-msg-bubble {
  background: #1e2133;
  color: #D0D3E8;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255,255,255,.06);
}
.axe-msg.user .axe-msg-bubble {
  background: linear-gradient(135deg, #FF6B35, #FF8C5A);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Markdown-lite rendering */
.axe-msg-bubble strong { font-weight: 700; color: inherit; }
.axe-msg.bot .axe-msg-bubble strong { color: #FFB347; }
.axe-msg-bubble em    { font-style: italic; }
.axe-msg-bubble a     { color: #FFB347; text-decoration: underline; }

.axe-msg-time {
  font-size: 10.88px;
  color: #4a4f6b;
  margin-top: 3px;
  padding: 0 2px;
}

/* Typing indicator */
.axe-typing-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: #1e2133;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  border: 1px solid rgba(255,255,255,.06);
}
.axe-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7B8099;
  animation: axe-typing 1.2s ease-in-out infinite;
}
.axe-typing-dot:nth-child(2) { animation-delay: .15s; }
.axe-typing-dot:nth-child(3) { animation-delay: .30s; }
@keyframes axe-typing {
  0%, 60%, 100% { transform: translateY(0);   opacity: .4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ── Quick Replies ── */
.axe-chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255,255,255,.05);
  background: #0f1117;
}
.axe-quick-btn {
  background: rgba(255,107,53,.1);
  border: 1px solid rgba(255,107,53,.3);
  color: #FFB347;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.axe-quick-btn:hover {
  background: rgba(255,107,53,.2);
  border-color: rgba(255,107,53,.6);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Input Area ── */
.axe-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  background: #0f1117;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.axe-chat-input {
  flex: 1;
  background: #1e2133;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  /* Hardcoded white — guaranteed visible on dark background */
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 14px;
  padding: 9px 13px;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
  max-height: 100px;
  transition: border-color .15s, background .15s;
  caret-color: #FF6B35;
}
.axe-chat-input::placeholder {
  color: rgba(255,255,255,0.38) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.38) !important;
}
.axe-chat-input:focus {
  border-color: rgba(255,107,53,.6);
  background: #252840;
  outline: none;
}
.axe-chat-input:focus::placeholder {
  color: rgba(255,255,255,0.22) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.22) !important;
}
/* Override any browser autofill colour that can turn text dark */
.axe-chat-input:-webkit-autofill,
.axe-chat-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #252840 inset !important;
  caret-color: #FF6B35;
}

.axe-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B35, #FFB347);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(255,107,53,.4);
}
.axe-chat-send:hover  { transform: scale(1.08); box-shadow: 0 3px 12px rgba(255,107,53,.55); }
.axe-chat-send:active { transform: scale(0.95); }
.axe-chat-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Footer ── */
.axe-chat-footer {
  text-align: center;
  font-size: 10.88px;
  color: #3a3f56;
  padding: 5px 0 7px;
  background: #0f1117;
  flex-shrink: 0;
}
.axe-chat-footer a { color: #FF6B35; text-decoration: none; }
.axe-chat-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 420px) {
  #axe-chatbot-root { bottom: 14px; right: 14px; }
  .axe-chat-window { width: calc(100vw - 28px); right: 0; }
}

/* ═══════════════════════════════════════════════════════
   Axe Arena – Voice Chat Styles  v2.8
═══════════════════════════════════════════════════════ */

/* ── Header Controls (TTS + Close) ── */
.axe-chat-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.axe-chat-header-ctrl {
  background: none;
  border: none;
  color: #7B8099;
  cursor: pointer;
  padding: 5px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.axe-chat-header-ctrl:hover { color: #E8EAF0; background: rgba(255,255,255,.07); }

/* TTS active = orange tint */
.axe-tts-on  { color: var(--axe-chat-primary, #FF6B35) !important; }
.axe-tts-off { color: #4a4f6b !important; }

/* ── Voice Listening Bar ── */
#axe-voice-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: linear-gradient(90deg, rgba(255,107,53,.08), rgba(255,107,53,.04));
  border-bottom: 1px solid rgba(255,107,53,.2);
  flex-shrink: 0;
  animation: axe-bar-in .2s ease-out;
}
@keyframes axe-bar-in {
  from { opacity: 0; height: 0; padding: 0; }
  to   { opacity: 1; }
}
.axe-voice-label {
  font-size: 12.16px;
  font-weight: 600;
  color: var(--axe-chat-primary, #FF6B35);
  flex: 1;
  letter-spacing: .02em;
}
.axe-voice-stop-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.axe-voice-stop-btn:hover { background: rgba(239,68,68,.25); }

/* ── Voice wave animation ── */
.axe-voice-waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  flex-shrink: 0;
}
.axe-voice-wave {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--axe-chat-primary, #FF6B35);
  animation: axe-wave 1.0s ease-in-out infinite;
}
.axe-voice-wave:nth-child(1) { height: 8px;  animation-delay: 0s; }
.axe-voice-wave:nth-child(2) { height: 14px; animation-delay: .1s; }
.axe-voice-wave:nth-child(3) { height: 20px; animation-delay: .2s; }
.axe-voice-wave:nth-child(4) { height: 14px; animation-delay: .1s; }
.axe-voice-wave:nth-child(5) { height: 8px;  animation-delay: 0s; }
@keyframes axe-wave {
  0%, 100% { transform: scaleY(.4); opacity: .5; }
  50%       { transform: scaleY(1);  opacity: 1; }
}

/* ── Mic Button ── */
.axe-chat-mic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  color: #7B8099;
  cursor: pointer;
  display: none;         /* shown by JS when supported */
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  flex-direction: column;
}
.axe-chat-mic:hover {
  color: var(--axe-chat-primary, #FF6B35);
  border-color: rgba(255,107,53,.4);
  background: rgba(255,107,53,.08);
}
/* Active (listening) state */
.axe-chat-mic.axe-mic-active {
  background: rgba(239,68,68,.15);
  border-color: #ef4444;
  color: #ef4444;
  animation: axe-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes axe-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50%       { box-shadow: 0 0 0 8px rgba(239,68,68,.0); }
}

/* ── Availability message bubble (info style) ── */
.axe-msg.avail .axe-msg-bubble {
  background: linear-gradient(135deg, rgba(16,185,129,.08), rgba(16,185,129,.04));
  border: 1px solid rgba(16,185,129,.2);
  color: #D0D3E8;
}
.axe-msg.avail .axe-msg-bubble strong {
  color: #10B981;
}

/* ── System message (errors, info) ── */
.axe-msg.system {
  align-self: center;
}
.axe-msg.system .axe-msg-bubble {
  background: rgba(255,179,71,.07);
  border: 1px solid rgba(255,179,71,.18);
  color: #FFB347;
  font-size: 12.48px;
  border-radius: 10px;
  padding: 7px 12px;
  text-align: center;
}

/* ── Voice support hint in quick-replies when voice enabled ── */
.axe-voice-hint {
  width: 100%;
  text-align: center;
  font-size: 11.2px;
  color: #4a4f6b;
  padding: 4px 0 0;
}
.axe-voice-hint i { margin-right: 4px; color: var(--axe-chat-primary, #FF6B35); }

/* ═══════════════════════════════════════════════════════
   Axe Arena – Realistic Voice Chat Styles  v2.9
═══════════════════════════════════════════════════════ */

/* ── Persona Avatar (header) ── */
.axe-persona-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
/* Female: warm coral gradient */
.axe-persona-f {
  background: linear-gradient(135deg, #FF6B35 0%, #FFB347 50%, #FF8C69 100%);
  box-shadow: 0 2px 10px rgba(255,107,53,.35);
}
/* Male: cool blue-teal gradient */
.axe-persona-m {
  background: linear-gradient(135deg, #2D7DD2 0%, #3EC6C6 50%, #0FA4AF 100%);
  box-shadow: 0 2px 10px rgba(45,125,210,.35);
}
.axe-persona-initial {
  font-size: 15.2px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1;
  z-index: 1;
}
/* Subtle online ring */
.axe-avatar-ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgba(16,185,129,.5);
  animation: axe-ring-pulse 2.5s ease-in-out infinite;
}
@keyframes axe-ring-pulse {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%       { opacity: 1;  transform: scale(1.04); }
}

/* ── Speaking animation on header avatar ── */
.axe-chat-header-avatar.axe-avatar-speaking .axe-persona-avatar {
  animation: axe-avatar-speak .7s ease-in-out infinite alternate;
}
.axe-chat-header-avatar.axe-avatar-speaking .axe-avatar-ring {
  border-color: var(--axe-chat-primary, #FF6B35);
  animation: axe-ring-speak .5s ease-in-out infinite alternate;
}
@keyframes axe-avatar-speak {
  from { box-shadow: 0 2px 10px rgba(255,107,53,.3); }
  to   { box-shadow: 0 0 0 6px rgba(255,107,53,.12), 0 2px 15px rgba(255,107,53,.5); }
}
@keyframes axe-ring-speak {
  from { transform: scale(1);    opacity: .6; }
  to   { transform: scale(1.12); opacity: 1; }
}

/* ── Header speaking waveform ── */
.axe-speaking-waves {
  display: none;
  align-items: center;
  gap: 2px;
  height: 13px;
  margin-left: 6px;
}
.axe-speaking-waves.active { display: flex; }
.axe-speaking-wave-mini {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: var(--axe-chat-primary, #FF6B35);
  animation: axe-wmini .65s ease-in-out infinite;
}
.axe-speaking-wave-mini:nth-child(1) { height: 4px;  animation-delay: .00s; }
.axe-speaking-wave-mini:nth-child(2) { height: 8px;  animation-delay: .10s; }
.axe-speaking-wave-mini:nth-child(3) { height: 12px; animation-delay: .20s; }
.axe-speaking-wave-mini:nth-child(4) { height: 8px;  animation-delay: .10s; }
.axe-speaking-wave-mini:nth-child(5) { height: 4px;  animation-delay: .00s; }
@keyframes axe-wmini {
  0%, 100% { transform: scaleY(.35); opacity: .5; }
  50%       { transform: scaleY(1);  opacity: 1; }
}

/* ── Typing bubble persona initial ── */
.axe-typing-persona {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B35, #FFB347);
  color: #fff;
  font-size: 10.4px;
  font-weight: 800;
  flex-shrink: 0;
  margin-right: 4px;
}

/* ── Availability bubble ── */
.axe-msg.avail .axe-msg-bubble {
  background: linear-gradient(135deg, rgba(16,185,129,.08), rgba(16,185,129,.03));
  border: 1px solid rgba(16,185,129,.2);
  color: #D0D3E8;
}
.axe-msg.avail .axe-msg-bubble strong { color: #10B981; }

/* ── System message ── */
.axe-msg.system { align-self: center; }
.axe-msg.system .axe-msg-bubble {
  background: rgba(255,179,71,.07);
  border: 1px solid rgba(255,179,71,.18);
  color: #FFB347;
  font-size: 12.48px;
  border-radius: 10px;
  padding: 7px 14px;
  text-align: center;
}

/* ── User message time label ── */
.axe-msg.user .axe-msg-time { color: rgba(255,107,53,.4); }

/* ── Voice listening bar ── */
#axe-voice-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: linear-gradient(90deg, rgba(255,107,53,.08), rgba(255,107,53,.03));
  border-bottom: 1px solid rgba(255,107,53,.2);
  flex-shrink: 0;
}
.axe-voice-label { font-size: 12.16px; font-weight: 600; color: var(--axe-chat-primary,#FF6B35); flex: 1; }
.axe-voice-stop-btn {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3);
  color: #ef4444; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.axe-voice-stop-btn:hover { background: rgba(239,68,68,.25); }

/* ── Voice waves (listening bar) ── */
.axe-voice-waves { display: flex; align-items: center; gap: 3px; height: 22px; flex-shrink: 0; }
.axe-voice-wave  { display: block; width: 3px; border-radius: 2px; background: var(--axe-chat-primary,#FF6B35); animation: axe-wave 1.0s ease-in-out infinite; }
.axe-voice-wave:nth-child(1) { height: 8px;  animation-delay: .00s; }
.axe-voice-wave:nth-child(2) { height: 14px; animation-delay: .10s; }
.axe-voice-wave:nth-child(3) { height: 20px; animation-delay: .20s; }
.axe-voice-wave:nth-child(4) { height: 14px; animation-delay: .10s; }
.axe-voice-wave:nth-child(5) { height: 8px;  animation-delay: .00s; }
@keyframes axe-wave { 0%,100%{transform:scaleY(.4);opacity:.5}50%{transform:scaleY(1);opacity:1} }

/* ── Mic button ── */
.axe-chat-mic {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12);
  color: #7B8099; cursor: pointer; display: none; /* shown by JS */
  align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.axe-chat-mic:hover { color: var(--axe-chat-primary,#FF6B35); border-color: rgba(255,107,53,.4); background: rgba(255,107,53,.08); }
.axe-chat-mic.axe-mic-active {
  background: rgba(239,68,68,.15); border-color: #ef4444; color: #ef4444;
  animation: axe-mic-pulse 1.1s ease-in-out infinite;
}
@keyframes axe-mic-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.4)}50%{box-shadow:0 0 0 8px rgba(239,68,68,0)} }

/* ── TTS toggle ── */
.axe-chat-header-ctrl {
  background: none; border: none; color: #7B8099; cursor: pointer; padding: 5px;
  border-radius: 7px; display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.axe-chat-header-ctrl:hover { color: #E8EAF0; background: rgba(255,255,255,.07); }
.axe-tts-on  { color: var(--axe-chat-primary,#FF6B35) !important; }
.axe-tts-off { color: #4a4f6b !important; }
.axe-chat-header-controls { display: flex; align-items: center; gap: 5px; }

/* ── Motion ──────────────────────────────────────────────────────────── */
:root {
  --axe-spring: cubic-bezier(.34, 1.45, .64, 1);
  --axe-spring-soft: cubic-bezier(.3, 1.3, .6, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --axe-spring: linear(0, 0.048, 0.156, 0.288, 0.43, 0.564, 0.682, 0.781, 0.86, 0.918, 0.962, 0.992, 1.011, 1.022, 1.027, 1.028, 1.026, 1.023, 1.019, 1.015, 1.011, 1.008, 1.006, 1.003, 1.002, 1.001, 1, 1, 1);
    --axe-spring-soft: linear(0, 0.053, 0.168, 0.313, 0.455, 0.586, 0.698, 0.789, 0.861, 0.916, 0.954, 0.98, 0.997, 1.007, 1.012, 1.014, 1.014, 1.013, 1.011, 1.009, 1.007, 1.005, 1.003, 1.002, 1.001, 1.001, 1, 1, 1);
  }
}

.axe-chat-window { animation: axe-chat-open .5s var(--axe-spring) both; }
@keyframes axe-chat-open {
  from { opacity: 0; transform: translateY(16px) scale(.9); }
  30%  { opacity: 1; }
  to   { opacity: 1; transform: none; }
}
.axe-chat-window.is-closing { animation: axe-chat-close .16s ease-in both; pointer-events: none; }
@keyframes axe-chat-close { to { opacity: 0; transform: translateY(10px) scale(.94); } }

.axe-msg { animation: axe-msg-in .38s var(--axe-spring-soft) both; }
.axe-msg.bot  { transform-origin: bottom left; }
.axe-msg.user { transform-origin: bottom right; --axe-msg-x: 10px; }
@keyframes axe-msg-in {
  from { opacity: 0; transform: translate(var(--axe-msg-x, -10px), 8px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.axe-chat-choice {
  animation: axe-choice-in .38s var(--axe-spring-soft) both;
  animation-delay: calc(var(--i, 0) * 35ms + 80ms);
  transition: transform .18s var(--axe-spring-soft), box-shadow .18s ease, opacity .15s ease;
}
@keyframes axe-choice-in {
  from { opacity: 0; transform: translateY(8px) scale(.92); }
  to   { opacity: 1; transform: none; }
}
@media (hover: hover) {
  .axe-chat-choice:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
}
.axe-chat-choice:active { transform: scale(.95); transition-duration: .08s; }
.axe-chat-choices.is-picked .axe-chat-choice:not(.is-picked) { opacity: .35; }
.axe-chat-choice.is-picked { transform: scale(.97); }

#axe-chat-btn.is-nudge { animation: axe-nudge .9s ease-in-out 2; }
@keyframes axe-nudge {
  0%, 100% { transform: none; }
  20% { transform: rotate(-10deg) scale(1.06); }
  40% { transform: rotate(8deg) scale(1.06); }
  60% { transform: rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .axe-chat-window, .axe-chat-window.is-closing, .axe-msg, .axe-chat-choice, #axe-chat-btn.is-nudge, .axe-chat-unread-dot, .axe-typing-bubble span {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
  }
  .axe-chat-choice, #axe-chat-btn { transition: none !important; }
  .axe-chat-choice:hover, .axe-chat-choice:active, #axe-chat-btn:hover { transform: none; }
}

.axe-chat-choices.is-leaving { animation: axe-choices-out .16s ease-in both; pointer-events: none; }
@keyframes axe-choices-out { to { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .axe-chat-choices.is-leaving { animation-duration: .01ms !important; } }
