/* ── FLOATING CALLOUT PILL ("Ask Axi AI ✨") ── */
#chat-callout-pill {
  position: fixed !important;
  bottom: 32px !important;
  right: 108px !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: linear-gradient(135deg, rgba(20, 22, 34, 0.96) 0%, rgba(12, 14, 22, 0.98) 100%) !important;
  border: 1.5px solid rgba(197, 168, 128, 0.7) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-radius: 40px !important;
  padding: 10px 18px !important;
  color: #ffffff !important;
  font-family: var(--font, 'Inter Tight', sans-serif) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(197, 168, 128, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  cursor: pointer !important;
  animation: pillFloat 3.5s ease-in-out infinite !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  user-select: none !important;
  white-space: nowrap !important;
}

#chat-callout-pill:hover {
  transform: translateY(-3px) scale(1.04) !important;
  border-color: rgba(225, 198, 158, 0.95) !important;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.65),
    0 0 32px rgba(197, 168, 128, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

#chat-callout-pill.hidden {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pill-sparkle {
  font-size: 1.05rem;
  animation: sparkleGlow 2s ease-in-out infinite alternate;
}

@keyframes sparkleGlow {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px #C5A880);
  }
  100% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px #ffd79e);
  }
}

.pill-text strong {
  color: #C5A880;
  font-weight: 700;
}

#pill-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0 0 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

#pill-close:hover {
  color: #ffffff;
}

@keyframes pillFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ── CHAT TOGGLE BUTTON ── */
#chat-toggle {
  position: fixed !important;
  bottom: 28px !important;
  right: 28px !important;
  width: 68px !important;
  height: 68px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #1c1e2d 0%, #0e1018 100%) !important;
  border: 2px solid rgba(197, 168, 128, 0.7) !important;
  cursor: pointer !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow:
    0 0 0 0 rgba(197, 168, 128, 0.4),
    0 10px 32px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(197, 168, 128, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    background 0.3s ease !important;
  animation: chatPulseRing 3.5s ease-in-out infinite !important;
}

#chat-toggle::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(197, 168, 128, 0.4), rgba(255, 225, 180, 0.2), rgba(255, 255, 255, 0.4), rgba(197, 168, 128, 0.4));
  z-index: -1;
  opacity: 0.6;
  transition: opacity 0.4s ease;
  animation: toggleRingSpin 8s linear infinite;
}

@keyframes toggleRingSpin {
  to {
    transform: rotate(360deg);
  }
}

#chat-toggle:hover {
  transform: scale(1.1) !important;
  box-shadow:
    0 0 0 8px rgba(197, 168, 128, 0.15),
    0 14px 40px rgba(0, 0, 0, 0.6),
    0 0 35px rgba(197, 168, 128, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  animation: none !important;
}

#chat-toggle:hover::before {
  opacity: 1;
}

#chat-toggle.open {
  background: linear-gradient(135deg, #151724 0%, #090a10 100%) !important;
  animation: none !important;
  transform: rotate(0deg) !important;
}

@keyframes chatPulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.4), 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(197, 168, 128, 0.35);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(197, 168, 128, 0), 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 30px rgba(197, 168, 128, 0.45);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(197, 168, 128, 0.4), 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(197, 168, 128, 0.35);
  }
}

/* ── AXI AVATAR CLOSE-UP & GOLDEN EYE BLINK SYSTEM ── */
.axi-avatar-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 52%, rgba(220, 185, 135, 0.4) 0%, rgba(16, 18, 28, 0.98) 75%);
}

.axi-avatar-wrap .axi-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
  display: block;
  transform: scale(1.36);
  transform-origin: center 52%;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 12px rgba(220, 185, 135, 0.5)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-axi {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 52%, rgba(220, 185, 135, 0.4) 0%, rgba(10, 11, 18, 0.98) 80%);
  border: 2px solid #C5A880;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.2), 0 0 22px rgba(197, 168, 128, 0.6);
}

#chat-toggle:hover .toggle-axi .axi-img {
  transform: scale(1.48);
}

.header-axi {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 52%, rgba(220, 185, 135, 0.35) 0%, rgba(10, 11, 18, 0.98) 80%);
  border: 1.5px solid #C5A880;
}

.msg-axi {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 52%, rgba(220, 185, 135, 0.35) 0%, rgba(10, 11, 18, 0.98) 80%);
  border: 1.5px solid #C5A880;
}

/* Dynamic Golden Eye Glow & Blink Overlays */
.axi-eye-left,
.axi-eye-right {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 160, 0.95) 0%, rgba(255, 175, 0, 0.85) 60%, transparent 100%);
  box-shadow: 0 0 10px #FFD700, 0 0 18px #FF8C00;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: screen;
  animation: axiEyeSmartBlink 4.5s ease-in-out infinite;
}

.axi-eye-left {
  top: 57%;
  left: 36.5%;
  width: 14.5%;
  height: 16.5%;
  transform: translate(-50%, -50%);
}

.axi-eye-right {
  top: 57%;
  left: 63.5%;
  width: 14.5%;
  height: 16.5%;
  transform: translate(-50%, -50%);
}

@keyframes axiEyeSmartBlink {
  0%, 86%, 94%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.95;
    filter: drop-shadow(0 0 4px #FFD700);
  }
  90% {
    transform: translate(-50%, -50%) scaleY(0.08) scaleX(1.15);
    opacity: 0.15;
    filter: drop-shadow(0 0 1px #FFD700);
  }
}

.axi-eyelid {
  display: none !important;
}

.chat-toggle-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle-icon.hidden {
  opacity: 0;
  transform: rotate(90deg) scale(0.3);
  position: absolute;
}

/* Notification badge */
#chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border: 2.5px solid #0A0A0C;
  font-size: 0.6rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  animation: badgeBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(197, 168, 128, 0.4);
}

#chat-badge.hidden {
  display: none;
}

@keyframes badgeBounce {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

/* ── CHAT WINDOW ── */
#chat-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 400px;
  height: 620px;
  max-height: calc(100vh - 120px);
  border-radius: 24px;
  background: linear-gradient(170deg,
      rgba(15, 16, 24, 0.98) 0%,
      rgba(10, 11, 18, 0.98) 50%,
      rgba(12, 13, 20, 0.99) 100%);
  border: 1px solid rgba(197, 168, 128, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 12px 36px rgba(197, 168, 128, 0.06),
    0 0 120px rgba(197, 168, 128, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  z-index: 9989;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Enter animation */
  transform: scale(0.88) translateY(24px);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

#chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── CHAT HEADER ── */
.chat-header {
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg,
      rgba(197, 168, 128, 0.08) 0%,
      rgba(197, 168, 128, 0.01) 100%);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
}

/* Accent line at top — animated gradient */
.chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover), #FFFFFF, var(--violet), var(--accent));
  background-size: 300% 100%;
  animation: headerGradient 5s ease infinite;
  border-radius: 24px 24px 0 0;
}

@keyframes headerGradient {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 233, 213, 0.95));
  border: 1px solid rgba(197, 168, 128, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: all 0.35s ease;
  position: relative;
}

/* Subtle glow ring */
.chat-avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: conic-gradient(from 0deg, rgba(197, 168, 128, 0.2), transparent 40%, rgba(191, 162, 118, 0.15), transparent 80%, rgba(197, 168, 128, 0.2));
  z-index: -1;
  animation: avatarRing 6s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes avatarRing {
  to {
    transform: rotate(360deg);
  }
}

.chat-avatar:hover::after {
  opacity: 1;
}

.chat-avatar:hover {
  border-color: rgba(197, 168, 128, 0.4);
  box-shadow: 0 0 20px rgba(197, 168, 128, 0.15);
}

.chat-avatar img,
.msg-avatar img,
.toggle-axi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  transform-origin: center center;
}

/* ── AXI AVATAR & VISIBLE EYE BLINK SYSTEM ── */
.axi-avatar-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(197, 168, 128, 0.35) 0%, rgba(16, 18, 28, 0.98) 80%);
}

.axi-avatar-wrap .axi-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 48%;
  display: block;
  padding: 1px;
  box-sizing: border-box;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 10px rgba(197, 168, 128, 0.45)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-axi {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(197, 168, 128, 0.35) 0%, rgba(10, 11, 18, 0.98) 80%);
  border: 2px solid #C5A880;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.15), 0 0 20px rgba(197, 168, 128, 0.5);
}

#chat-toggle:hover .toggle-axi .axi-img {
  transform: scale(1.15);
}

.header-axi {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(197, 168, 128, 0.3) 0%, rgba(10, 11, 18, 0.98) 80%);
  border: 1.5px solid #C5A880;
}

.msg-axi {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(197, 168, 128, 0.3) 0%, rgba(10, 11, 18, 0.98) 80%);
  border: 1.5px solid #C5A880;
}

/* Hide artificial eyelid overlays to keep Axi's natural golden eyes crisp & glowing */
.axi-eyelid {
  display: none !important;
}

/* Eye Positions matching Axi.png visor coordinates */
.axi-eyelid-left {
  top: 61.5%;
  left: 29.2%;
  width: 20.5%;
  height: 22.5%;
  transform: translate(-50%, -50%) scaleY(0);
  animation: axiSmartBlink 4.2s ease-in-out infinite;
}

.axi-eyelid-right {
  top: 61%;
  left: 68.8%;
  width: 20.5%;
  height: 22.5%;
  transform: translate(-50%, -50%) scaleY(0);
  animation: axiSmartBlink 4.2s ease-in-out infinite;
}

/* Eye Blink Animation */
@keyframes axiSmartBlink {

  0%,
  88%,
  94.5%,
  100% {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
  }

  91% {
    transform: translate(-50%, -50%) scaleY(1.08);
    opacity: 1;
  }

  92.5% {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
  }

  96% {
    transform: translate(-50%, -50%) scaleY(1.08);
    opacity: 1;
  }

  97.5% {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
  }
}

.chat-header-info {
  flex: 1;
  min-width: 0;
}

.chat-header-name {
  font-family: var(--font, 'Inter Tight', sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.chat-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 3px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.02em;
}

.chat-header-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #C5A880;
  box-shadow: 0 0 10px rgba(197, 168, 128, 0.6);
  animation: statusPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.6);
  }

  50% {
    opacity: 0.45;
    box-shadow: 0 0 5px rgba(197, 168, 128, 0.25);
  }
}

.chat-header-actions {
  display: flex;
  gap: 4px;
}

.chat-header-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── WELCOME SCREEN ── */
.chat-welcome {
  padding: 24px 24px 18px;
  text-align: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(197, 168, 128, 0.04), transparent);
  position: relative;
}

/* Pattern background */
.chat-welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(197, 168, 128, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent);
}

.chat-welcome-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.15), rgba(191, 162, 118, 0.1));
  border: 1px solid rgba(197, 168, 128, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.chat-welcome h4 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.chat-welcome p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── CHAT MESSAGES ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 3px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(197, 168, 128, 0.25);
  border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 168, 128, 0.45);
}

/* Message row */
.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  animation: msgSlideIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  max-width: 100%;
}

@keyframes msgSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-msg.bot {
  flex-direction: row;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 233, 213, 0.95));
  border: 1px solid rgba(197, 168, 128, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  overflow: hidden;
}

.chat-msg.user .msg-avatar {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.18), rgba(191, 162, 118, 0.12));
  border-color: rgba(197, 168, 128, 0.18);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.65rem;
}

/* Message bubble */
.msg-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.84rem;
  line-height: 1.65;
  word-break: break-word;
  position: relative;
}

/* Bot bubble — frosted glass effect */
.chat-msg.bot .msg-bubble {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom-left-radius: 6px;
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* User bubble — premium gold/bronze gradient */
.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 60%, var(--accent-deep) 100%);
  border: none;
  border-bottom-right-radius: 6px;
  color: #fff;
  box-shadow:
    0 4px 16px rgba(197, 168, 128, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Bubble content styles */
.msg-bubble strong {
  color: #fff;
  font-weight: 600;
}

.msg-bubble .highlight {
  color: var(--accent-hover);
  font-weight: 600;
}

.msg-bubble a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.msg-bubble a:hover {
  color: #fff;
}

.msg-bubble ul {
  margin: 8px 0 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  padding: 0;
}

.msg-bubble ul li {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  padding-left: 14px;
  position: relative;
}

.msg-bubble ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  opacity: 0.7;
}

.msg-bubble .price-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(197, 168, 128, 0.08);
  border: 1px solid rgba(197, 168, 128, 0.2);
  color: var(--accent-hover);
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 8px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

/* Timestamp */
.msg-time {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.18);
  margin-top: 5px;
  padding: 0 4px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.02em;
}

.chat-msg.user .msg-time {
  text-align: right;
}

/* ── TYPING INDICATOR ── */
.chat-msg.typing .msg-bubble {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.18);
  }

  40% {
    transform: translateY(-8px);
    background: var(--accent);
  }
}

/* ── QUICK REPLIES ── */
.chat-quick-replies {
  padding: 10px 16px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
}

.quick-reply-btn {
  padding: 7px 15px;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.06), rgba(191, 162, 118, 0.03));
  border: 1px solid rgba(197, 168, 128, 0.15);
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  font-family: var(--font, 'Inter Tight', sans-serif);
  letter-spacing: -0.01em;
}

.quick-reply-btn:hover {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.15), rgba(191, 162, 118, 0.08));
  border-color: rgba(197, 168, 128, 0.35);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(197, 168, 128, 0.15);
}

.quick-reply-btn:active {
  transform: translateY(0) scale(0.97);
}

/* ── CHAT INPUT ── */
.chat-input-wrap {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
}

#chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 11px 16px;
  color: #fff;
  font-family: var(--font, 'Inter Tight', sans-serif);
  font-size: 0.84rem;
  outline: none;
  resize: none;
  min-height: 44px;
  max-height: 100px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.5;
}

#chat-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

#chat-input:focus {
  border-color: rgba(197, 168, 128, 0.35);
  background: rgba(197, 168, 128, 0.02);
  box-shadow:
    0 0 0 3px rgba(197, 168, 128, 0.08),
    0 0 24px rgba(197, 168, 128, 0.04);
}

#chat-send {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 60%, var(--accent-deep) 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow:
    0 4px 14px rgba(197, 168, 128, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#chat-send:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 22px rgba(197, 168, 128, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#chat-send:active {
  transform: scale(0.94) translateY(0);
  box-shadow: 0 2px 8px rgba(197, 168, 128, 0.2);
}

#chat-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#chat-send svg {
  transition: transform 0.25s ease;
}

#chat-send:hover svg {
  transform: translateX(1px) translateY(-1px);
}

/* ── CHAT FOOTER ── */
.chat-footer {
  text-align: center;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.56rem;
  color: rgba(255, 255, 255, 0.15);
  padding: 0 14px 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-footer strong {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 500;
}

.chat-footer a {
  color: rgba(197, 168, 128, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
}

.chat-footer a:hover {
  color: rgba(197, 168, 128, 0.7);
}

/* ── SERVICE CARD IN CHAT ── */
.chat-service-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(197, 168, 128, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 6px 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chat-service-card:hover {
  border-color: rgba(197, 168, 128, 0.3);
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.06), rgba(191, 162, 118, 0.03));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 168, 128, 0.1);
}

.chat-service-card .svc-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.chat-service-card .svc-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
}

.chat-service-card .svc-price {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.66rem;
  color: var(--accent-hover);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ── EMPTY STATE ── */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  flex: 1;
}

.chat-empty-state svg {
  width: 48px;
  height: 48px;
  stroke: rgba(197, 168, 128, 0.25);
  margin-bottom: 16px;
}

.chat-empty-state p {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ── AXI SVG MASCOT STYLING ── */
.axi-mascot {
  width: 100%;
  height: 100%;
  display: block;
}

/* Alive subtle eye blink animation */
.axi-eye {
  transform-origin: 32px 45px;
  animation: axiBlink 6s ease-in-out infinite;
}

.axi-eye.right-eye {
  transform-origin: 68px 45px;
}

@keyframes axiBlink {

  0%,
  90%,
  94%,
  98%,
  100% {
    transform: scaleY(1);
  }

  92%,
  96% {
    transform: scaleY(0.15);
  }
}

/* Floating micro-movement for robot head in welcome screen */
.chat-welcome-avatar .axi-mascot {
  animation: axiFloat 4.5s ease-in-out infinite;
}

@keyframes axiFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(1deg);
  }
}

/* ── CHAT FEEDBACK SURVEY ── */
.chat-feedback-survey {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(197, 168, 128, 0.16);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: msgSlideIn 0.4s ease;
}

.chat-feedback-stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.chat-feedback-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
  line-height: 1;
}

.chat-feedback-star:hover {
  color: var(--accent-hover);
  transform: scale(1.2) rotate(8deg);
}

.chat-feedback-star.active {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(197, 168, 128, 0.6);
}

.chat-feedback-star.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.chat-feedback-status {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  #chat-window {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    transform-origin: bottom center;
  }

  #chat-window.open {
    border-radius: 0;
  }

  .chat-header::before {
    border-radius: 0;
  }

  #chat-toggle {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }

  .chat-header {
    padding: 16px 16px 14px;
    /* Safe area for notch */
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }

  .chat-messages {
    padding: 16px 12px;
  }

  .chat-input-wrap {
    padding: 12px 12px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .msg-bubble {
    max-width: 88%;
    font-size: 0.82rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  #chat-window {
    width: 360px;
    height: 560px;
    right: 16px;
    bottom: 90px;
  }
}

/* ── PRINT ── */
@media print {

  #chat-toggle,
  #chat-window {
    display: none !important;
  }
}