/* ==========================================================================
   ASIA X NETWORK - AI CHATBOT ULTRA-MODERN STYLES (AXN ASSISTANT)
   Executive Obsidian & Champagne Gold Theme • Official Logo Integration
   Animated Bot Bubbles • Mobile Responsive • High UX Polish
   ========================================================================== */

:root {
  --axn-gold: #e2be53;
  --axn-gold-light: #fbe396;
  --axn-gold-dark: #b8922c;
  --axn-gold-glow: rgba(226, 190, 83, 0.28);
  --axn-bg-dark: #080d19;
  --axn-bg-card: rgba(14, 21, 37, 0.96);
  --axn-card-border: rgba(226, 190, 83, 0.26);
  --axn-text-primary: #f8fafc;
  --axn-text-muted: #94a3b8;
  --axn-bot-bg: linear-gradient(148deg, rgba(17, 26, 46, 0.98) 0%, rgba(10, 16, 30, 0.99) 100%);
  --axn-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(226, 190, 83, 0.12);
}

/* Floating Action Button (FAB) on Bottom-Left */
.axn-chat-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #131d33, #090e1a);
  border: 1.5px solid var(--axn-gold);
  border-radius: 50px;
  padding: 8px 18px 8px 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 24px rgba(226, 190, 83, 0.25);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.axn-chat-fab:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--axn-gold-light);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 32px rgba(226, 190, 83, 0.4);
}

.axn-chat-fab:active {
  transform: scale(0.96);
}

.axn-chat-fab-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(226, 190, 83, 0.18), #090e1b);
  border: 1.5px solid var(--axn-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(226, 190, 83, 0.35);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 5px;
}

.axn-fab-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.axn-chat-fab:hover .axn-fab-logo-img {
  transform: scale(1.1) rotate(6deg);
}

/* Single Online Status Dot Indicator */
.axn-chat-fab-pulse,
.axn-chat-avatar-status {
  display: none !important;
}

.axn-chat-fab-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
}

.axn-chat-fab-title {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffffff;
}

.axn-chat-fab-subtitle {
  font-size: 0.72rem;
  color: var(--axn-gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.axn-chat-online-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
  flex-shrink: 0;
  animation: axnPulse 2s infinite ease-in-out;
}

@keyframes axnPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.2); }
}

/* Chat Window Container (Obsidian Glass Floating Card) */
.axn-chat-window {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  width: 410px;
  max-width: calc(100vw - 32px);
  height: min(540px, calc(100vh - 105px));
  max-height: calc(100vh - 105px);
  background: var(--axn-bg-dark);
  border: 1px solid var(--axn-card-border);
  border-radius: 20px;
  box-shadow: var(--axn-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transform-origin: bottom left;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.axn-chat-window.axn-chat-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Window Header */
.axn-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, #131e36, #090e1b);
  border-bottom: 1px solid rgba(226, 190, 83, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.axn-chat-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

/* Official Logo in Header Avatar */
.axn-chat-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(226, 190, 83, 0.16), rgba(15, 23, 42, 0.95));
  border: 1.5px solid var(--axn-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 10px rgba(226, 190, 83, 0.22);
  flex-shrink: 0;
  padding: 5px;
  box-sizing: border-box;
}

.axn-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.axn-chat-header-titles {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding-left: 2px;
}

.axn-chat-header-titles h4 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: visible;
  display: block;
}

.axn-chat-header-titles p {
  margin: 3px 0 0 0;
  font-size: 0.74rem;
  color: var(--axn-gold-light);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  line-height: 1.3;
  overflow: visible;
}

.axn-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.axn-chat-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.86rem;
  outline: none;
}

.axn-chat-action-btn:hover {
  background: rgba(226, 190, 83, 0.18);
  border-color: var(--axn-gold);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(226, 190, 83, 0.2);
}

.axn-chat-action-btn#axn-chat-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.axn-chat-action-btn:active {
  transform: scale(0.92);
}

/* ==========================================================================
   CHAT MESSAGES SCROLL CONTAINER & CUSTOM PROFESSIONAL SCROLLBAR
   ========================================================================== */
.axn-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  background: radial-gradient(circle at 10% 20%, rgba(226, 190, 83, 0.04) 0%, transparent 60%);
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 190, 83, 0.38) rgba(10, 16, 30, 0.55);
}

/* Custom Professional WebKit Scrollbar */
.axn-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.axn-chat-messages::-webkit-scrollbar-track {
  background: rgba(10, 16, 30, 0.5);
  border-radius: 8px;
  margin: 6px 0;
}

.axn-chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(226, 190, 83, 0.48), rgba(184, 146, 42, 0.38));
  border-radius: 8px;
  border: 1px solid rgba(226, 190, 83, 0.22);
  transition: all 0.2s ease;
}

.axn-chat-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(226, 190, 83, 0.8), rgba(226, 190, 83, 0.6));
  box-shadow: 0 0 10px rgba(226, 190, 83, 0.4);
}

/* Welcome Hero Card */
.axn-chat-welcome {
  background: rgba(14, 21, 37, 0.95);
  border: 1px solid rgba(226, 190, 83, 0.24);
  border-radius: 16px;
  padding: 15px;
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.55;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.axn-chat-welcome.axn-chat-welcome-hidden {
  display: none !important;
}

.axn-chat-welcome::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--axn-gold), transparent);
}

.axn-welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.axn-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--axn-gold-light);
}

.axn-welcome-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.axn-welcome-status {
  font-size: 0.68rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.axn-welcome-text {
  margin: 0 0 10px 0;
  font-size: 0.83rem;
  color: #cbd5e1;
}

.axn-appointment-notice {
  background: rgba(226, 190, 83, 0.1);
  border: 1px solid rgba(226, 190, 83, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.77rem;
  color: #f1f5f9;
  line-height: 1.4;
}

.axn-appointment-notice i {
  color: var(--axn-gold);
  margin-top: 2px;
  flex-shrink: 0;
}

/* Suggestion Quick Chips */
.axn-chat-suggestions-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--axn-gold);
  margin-bottom: 8px;
  display: block;
}

.axn-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.axn-chat-chip {
  background: rgba(226, 190, 83, 0.08);
  border: 1px solid rgba(226, 190, 83, 0.25);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
  outline: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.axn-chat-chip i {
  color: var(--axn-gold-light);
  font-size: 0.78rem;
}

.axn-chat-chip:hover {
  background: rgba(226, 190, 83, 0.2);
  border-color: var(--axn-gold);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(226, 190, 83, 0.25);
}

.axn-chat-chip:active {
  transform: scale(0.95);
}

/* ==========================================================================
   INDIVIDUAL MESSAGE ROWS & SMOOTH FADE-IN ANIMATIONS
   ========================================================================== */
@keyframes axnFadeInIncoming {
  0% {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(1.5px);
  }
  60% {
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes axnFadeInUser {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.axn-msg {
  display: flex;
  gap: 10px;
  max-width: 90%;
  position: relative;
  align-items: flex-start;
  will-change: transform, opacity;
}

/* User Message: Positioned Right, Left-Aligned Content, Smooth Entrance */
.axn-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
  animation: axnFadeInUser 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Bot Message: Positioned Left, Left-Aligned Content, Luxurious Fade-In */
.axn-msg-bot {
  align-self: flex-start;
  flex-direction: row;
  animation: axnFadeInIncoming 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Message Avatars */
.axn-msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.axn-user-avatar {
  background: #253349;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

/* Official Logo in Bot Message Avatar */
.axn-msg-avatar.axn-bot-avatar {
  background: linear-gradient(135deg, rgba(226, 190, 83, 0.18), rgba(14, 21, 37, 0.95));
  border: 1.5px solid rgba(226, 190, 83, 0.4);
  box-shadow: 0 2px 10px rgba(226, 190, 83, 0.2);
  padding: 4px;
}

.axn-msg-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
  transition: transform 0.25s ease;
}

.axn-msg:hover .axn-msg-logo-img {
  transform: scale(1.1);
}

.axn-avatar-amber {
  background: rgba(244, 63, 94, 0.15) !important;
  border: 1.5px solid rgba(244, 63, 94, 0.4) !important;
  color: #fb7185 !important;
}

/* Message Bubble Wrap */
.axn-msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.axn-msg-user .axn-msg-bubble-wrap {
  align-items: flex-end;
}

.axn-msg-bot .axn-msg-bubble-wrap {
  align-items: flex-start;
  text-align: left;
}

/* Base Bubble */
.axn-msg-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.89rem;
  line-height: 1.62;
  word-break: break-word;
  position: relative;
  display: inline-block;
  max-width: 100%;
  text-align: left;
}

/* USER Bubble: Snug Executive Slate, Clean Multi-line Left-Aligned Typography */
.axn-msg-user .axn-msg-bubble {
  background: linear-gradient(135deg, #1b263b 0%, #111a2d 100%);
  border: 1px solid rgba(226, 190, 83, 0.38);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  text-align: left;
  letter-spacing: 0.15px;
}

.axn-msg-user .axn-msg-bubble p {
  color: #f8fafc;
  margin: 0;
  line-height: 1.52;
  text-align: left;
}

.axn-msg-user .axn-msg-bubble p + p {
  margin-top: 5px;
}

.axn-msg-spacer {
  height: 8px;
}

/* BOT Bubble: Luxurious Obsidian Card with Champagne Accent, Left-Aligned */
.axn-msg-bot .axn-msg-bubble {
  background: var(--axn-bot-bg);
  border: 1px solid rgba(226, 190, 83, 0.22);
  border-left: 3px solid var(--axn-gold);
  color: #e6eff8;
  border-bottom-left-radius: 4px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 15px rgba(226, 190, 83, 0.05);
  text-align: left;
  letter-spacing: 0.15px;
}

.axn-msg-bubble p {
  margin: 0 0 8px 0;
  text-align: left;
}

.axn-msg-bubble p:last-child {
  margin-bottom: 0;
}

/* Unordered & Ordered Lists in Bot Messages */
.axn-msg-bubble ul {
  list-style: none;
  padding-left: 0;
  margin: 8px 0;
}

.axn-msg-bubble ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 7px;
  line-height: 1.55;
}

.axn-msg-bubble ul li::before {
  content: '◆';
  position: absolute;
  left: 2px;
  top: 1px;
  color: var(--axn-gold);
  font-size: 0.62rem;
}

.axn-msg-bubble ol {
  counter-reset: axn-ol;
  list-style: none;
  padding-left: 0;
  margin: 8px 0;
}

.axn-msg-bubble ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 7px;
  line-height: 1.55;
  counter-increment: axn-ol;
}

.axn-msg-bubble ol li::before {
  content: counter(axn-ol);
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(226, 190, 83, 0.15);
  border: 1px solid rgba(226, 190, 83, 0.35);
  color: var(--axn-gold-light);
  font-size: 0.64rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.axn-msg-bubble strong {
  color: #fce79f;
  font-weight: 700;
  letter-spacing: 0.15px;
}

.axn-msg-bubble code.axn-chat-code {
  background: rgba(226, 190, 83, 0.14);
  border: 1px solid rgba(226, 190, 83, 0.25);
  padding: 2px 5px;
  border-radius: 4px;
  color: #fbe396;
  font-size: 0.85em;
  font-family: monospace;
}

/* Deluxe Interactive Pill Links inside Bot Messages */
.axn-msg-bubble a.axn-chat-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fbe396 !important;
  background: rgba(226, 190, 83, 0.1);
  border: 1px solid rgba(226, 190, 83, 0.28);
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 1px 2px;
  line-height: 1.35;
  vertical-align: middle;
}

.axn-msg-bubble a.axn-chat-link:hover {
  background: rgba(226, 190, 83, 0.24);
  border-color: var(--axn-gold);
  color: #ffffff !important;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(226, 190, 83, 0.28);
}

.axn-msg-bubble a.axn-chat-link:active {
  transform: scale(0.96);
}

.axn-link-icon {
  font-size: 0.72em;
}

.axn-wa-icon { color: #25d366 !important; }
.axn-map-icon { color: #f87171 !important; }
.axn-mail-icon { color: #38bdf8 !important; }
.axn-discord-icon { color: #818cf8 !important; }

/* Footer / Meta under Bubble */
.axn-msg-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  width: 100%;
}

.axn-msg-bot .axn-msg-meta {
  justify-content: flex-start;
  padding-left: 2px;
}

.axn-msg-user .axn-msg-meta {
  justify-content: flex-end;
  padding-right: 2px;
}

.axn-msg-time {
  font-size: 0.68rem;
  color: #64748b;
  display: inline-block;
}

.axn-msg-user .axn-msg-time {
  text-align: right;
  color: rgba(226, 190, 83, 0.75);
}

.axn-msg-copy-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  outline: none;
}

.axn-msg-copy-btn:hover {
  color: var(--axn-gold-light);
  background: rgba(226, 190, 83, 0.15);
  border-color: rgba(226, 190, 83, 0.3);
  transform: translateY(-1px);
}

.axn-msg-copy-btn.axn-copied {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
}

/* Typing Indicator Animation */
.axn-typing-avatar-pulse {
  animation: axnLogoPulse 1.6s infinite ease-in-out;
}

@keyframes axnLogoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); filter: drop-shadow(0 0 6px rgba(226, 190, 83, 0.6)); }
}

.axn-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px !important;
}

.axn-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.axn-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--axn-gold);
  animation: axnBounce 1.2s infinite ease-in-out both;
}

.axn-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.axn-typing-dot:nth-child(2) { animation-delay: -0.16s; }
.axn-typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes axnBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1.1); opacity: 1; }
}

.axn-typing-label {
  font-size: 0.73rem;
  color: #94a3b8;
  font-style: italic;
}

/* ==========================================================================
   EXECUTIVE ERROR CARD STYLES
   ========================================================================== */
.axn-msg-error-row {
  max-width: 95%;
}

.axn-error-card {
  background: linear-gradient(135deg, rgba(26, 19, 28, 0.96) 0%, rgba(15, 20, 36, 0.98) 100%);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-left: 3px solid #f43f5e;
  border-radius: 16px;
  padding: 13px 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 18px rgba(244, 63, 94, 0.1);
  color: #f1f5f9;
  width: 100%;
}

.axn-error-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.axn-error-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fb7185;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.axn-error-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
  animation: axnPulse 1.5s infinite ease-in-out;
}

.axn-error-tag {
  font-size: 0.67rem;
  color: var(--axn-gold-light);
  background: rgba(226, 190, 83, 0.12);
  border: 1px solid rgba(226, 190, 83, 0.25);
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 600;
}

.axn-error-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0 !important;
}

.axn-error-desc {
  font-size: 0.79rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 11px 0 !important;
}

.axn-error-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.axn-err-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: none;
  outline: none;
}

.axn-err-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.axn-err-wa:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
  color: #ffffff !important;
}

.axn-err-retry {
  background: rgba(226, 190, 83, 0.14);
  border: 1px solid rgba(226, 190, 83, 0.35);
  color: var(--axn-gold-light) !important;
}

.axn-err-retry:hover {
  background: rgba(226, 190, 83, 0.25);
  border-color: var(--axn-gold);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.axn-err-email {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8 !important;
}

.axn-err-email:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}

/* ==========================================================================
   INPUT FORM & CONTROLS
   ========================================================================== */
.axn-chat-input-bar {
  padding: 8px 12px 6px;
  background: #090e19;
  border-top: 1px solid rgba(226, 190, 83, 0.18);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
}

.axn-chat-input {
  flex: 1;
  background: rgba(18, 27, 47, 0.95);
  border: 1px solid rgba(226, 190, 83, 0.24);
  border-radius: 12px;
  padding: 10px 13px;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 190, 83, 0.35) rgba(10, 16, 30, 0.5);
}

.axn-chat-input::-webkit-scrollbar {
  width: 5px;
}

.axn-chat-input::-webkit-scrollbar-track {
  background: rgba(10, 16, 30, 0.4);
  border-radius: 6px;
}

.axn-chat-input::-webkit-scrollbar-thumb {
  background: rgba(226, 190, 83, 0.35);
  border-radius: 6px;
}

.axn-chat-input::-webkit-scrollbar-thumb:hover {
  background: rgba(226, 190, 83, 0.6);
}

.axn-chat-input::placeholder {
  color: #64748b;
}

.axn-chat-input:focus {
  border-color: var(--axn-gold);
  box-shadow: 0 0 12px rgba(226, 190, 83, 0.25);
}

.axn-chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--axn-gold), var(--axn-gold-dark));
  border: none;
  color: #060911;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(226, 190, 83, 0.35);
  transition: all 0.2s ease;
  flex-shrink: 0;
  outline: none;
  margin-bottom: 1px;
}

.axn-chat-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(226, 190, 83, 0.5);
}

.axn-chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Footer Micro-Bar */
.axn-chat-footer-bar {
  background: #090e18;
  padding: 4px 14px 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.67rem;
  color: #64748b;
  flex-shrink: 0;
}

.axn-chat-kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.axn-chat-kbd-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1px 4px;
  font-family: monospace;
  font-size: 0.63rem;
  color: #cbd5e1;
}

/* Chat Cleared Notice */
.axn-chat-notice {
  text-align: center;
  font-size: 0.78rem;
  color: var(--axn-gold-light);
  background: rgba(226, 190, 83, 0.1);
  border: 1px dashed rgba(226, 190, 83, 0.3);
  border-radius: 8px;
  padding: 6px 14px;
  margin: 6px auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: axnNoticeFade 0.3s ease-out;
}

@keyframes axnNoticeFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH HANDLING (<= 640px)
   ========================================================================== */
@media (max-width: 640px) {
  .axn-chat-fab {
    bottom: 18px;
    left: 16px;
    right: auto;
    padding: 7px 14px 7px 8px;
    gap: 8px;
  }

  .axn-chat-fab-icon {
    width: 36px;
    height: 36px;
    padding: 4px;
  }

  .axn-fab-logo-img {
    width: 22px;
    height: 22px;
  }

  .axn-chat-fab-title {
    font-size: 0.84rem;
  }

  .axn-chat-fab-subtitle {
    font-size: 0.68rem;
  }

  /* Full Screen App-Like Sheet on Mobile */
  .axn-chat-window {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    z-index: 10001;
    transform: translateY(100%);
    transform-origin: center bottom;
    box-shadow: none;
  }

  .axn-chat-window.axn-chat-open {
    transform: translateY(0);
  }

  .axn-chat-header {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: 12px;
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 0;
  }

  .axn-chat-messages {
    padding: 12px;
    gap: 11px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .axn-msg {
    max-width: 92%;
  }

  /* Suggestion chips horizontal scroll on mobile */
  .axn-chat-suggestions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .axn-chat-suggestions::-webkit-scrollbar {
    display: none;
  }

  .axn-chat-chip {
    flex-shrink: 0;
    font-size: 0.77rem;
    padding: 6px 12px;
  }

  /* CRITICAL: Font-size must be >= 16px on mobile inputs to avoid auto-zoom in iOS Safari & Android Chrome! */
  .axn-chat-input {
    font-size: 16px !important;
    padding: 9px 12px;
    min-height: 38px;
  }

  .axn-chat-input-bar {
    padding-bottom: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .axn-chat-footer-bar {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: 14px;
    padding-right: 14px;
  }

  .axn-chat-kbd-hint {
    display: none; /* Hide keyboard shortcut hints on touch devices */
  }

  .axn-chat-footer-bar {
    display: none;
  }
}

/* Prevent body scrolling while modal is open on small screens */
body.axn-chat-modal-open {
  overflow: hidden !important;
  touch-action: none;
}
