/* ============================================================
   AXI AI CHATBOT — Premium Gold/Silver Edition v4.0
   Refined Glassmorphism · Luxury Gold Styling · AXI Mascot
   ============================================================ */

/* ── CHAT TOGGLE BUTTON ── */
#chat-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 60%, var(--accent-deep) 100%);
  border: none;
  cursor: pointer;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 0 rgba(197,168,128,0.35),
    0 8px 28px rgba(197,168,128,0.25),
    0 2px 8px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.35s ease,
              background 0.3s ease;
  animation: chatPulseRing 3.5s ease-in-out infinite;
}
#chat-toggle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(197,168,128,0.25), rgba(191,162,118,0.15), rgba(255,255,255,0.2), rgba(197,168,128,0.25));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: toggleRingSpin 8s linear infinite;
}
@keyframes toggleRingSpin {
  to { transform: rotate(360deg); }
}
#chat-toggle:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 0 8px rgba(197,168,128,0.08),
    0 12px 36px rgba(197,168,128,0.35),
    0 4px 12px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.25);
  animation: none;
}
#chat-toggle:hover::before { opacity: 1; }
#chat-toggle.open {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--violet) 60%, var(--accent) 100%);
  animation: none;
  transform: rotate(0deg);
}
@keyframes chatPulseRing {
  0%   { box-shadow: 0 0 0 0    rgba(197,168,128,0.3),  0 8px 28px rgba(197,168,128,0.25), 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15); }
  50%  { box-shadow: 0 0 0 14px rgba(197,168,128,0),   0 8px 28px rgba(197,168,128,0.25), 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15); }
  100% { box-shadow: 0 0 0 0    rgba(197,168,128,0.3),  0 8px 28px rgba(197,168,128,0.25), 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15); }
}

.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(197,168,128,0.18), rgba(191,162,118,0.12));
  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 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.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(197,168,128,0.12), rgba(191,162,118,0.08));
  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; }
}