/* Clinicon Bot — Frontend Widget CSS */
:root { --ab-brand: #0a5cff; }

#ab-launch, #ab-chatbox {
  position: fixed;
  z-index: 2147483647;
}

#ab-launch {
  bottom: 20px; right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ab-brand);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(10,92,255,.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#ab-launch:hover { transform: scale(1.08); box-shadow: 0 14px 36px rgba(0,0,0,.3); }
#ab-launch img { width: 30px; height: 30px; object-fit: contain; }

#ab-chatbox {
  bottom: -720px; right: 20px;
  width: 380px; height: 600px;
  background: #fff;
  border-radius: 18px;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  transition: bottom .28s cubic-bezier(0.34, 1.56, 0.64, 1), width .22s ease, height .22s ease, border-radius .22s ease, right .22s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
}
#ab-chatbox.ab-open { bottom: 20px; }

/* ── Header — fixed layout so close button never shifts ── */
.ab-header {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f3f9;
  background: #fff;
  flex-shrink: 0;
  gap: 6px;
  min-width: 0;
}
.ab-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}
.ab-brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; flex-shrink: 0; }
.ab-brand strong { display: block; font-size: 14px; font-weight: 700; color: #1a2035; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-brand small { font-size: 11px; color: #8a9bbf; display: block; }

/* Toggle lives in column 2 — always occupies its grid cell */
.ab-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; cursor: pointer;
  flex-shrink: 0;
  justify-self: end;
}
.ab-mode-label { color: #bbc5d8; font-weight: 600; font-size: 11px; }
.ab-mode-label.ab-active { color: var(--ab-brand); }

.ab-toggle-track {
  width: 36px; height: 19px;
  background: #dbe4ff;
  border-radius: 20px;
  position: relative;
  transition: background 0.2s;
}
.ab-toggle-thumb {
  width: 15px; height: 15px;
  background: var(--ab-brand);
  border-radius: 50%;
  position: absolute; top: 2px; left: 2px;
  transition: left .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ab-ai-mode .ab-toggle-thumb { left: 19px; }

/* Close button — column 3, always present */
#ab-fullscreen {
  width: 24px !important; height: 24px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  border-radius: 4px !important; border: none !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 8V5a2 2 0 0 1 2-2h3M16 3h3a2 2 0 0 1 2 2v3M21 16v3a2 2 0 0 1-2 2h-3M8 21H5a2 2 0 0 1-2-2v-3' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 13px 13px !important;
  cursor: pointer !important;
  transition: background-image 0.15s !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  color: transparent !important;
}
#ab-fullscreen:hover {
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 8V5a2 2 0 0 1 2-2h3M16 3h3a2 2 0 0 1 2 2v3M21 16v3a2 2 0 0 1-2 2h-3M8 21H5a2 2 0 0 1-2-2v-3' stroke='%230a5cff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
/* When fullscreen active — show compress icon */
#ab-chatbox.ab-fullscreen #ab-fullscreen {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 0 2-2h3M3 16h3a2 2 0 0 0 2 2v3' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
#ab-chatbox.ab-fullscreen #ab-fullscreen:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 0 2-2h3M3 16h3a2 2 0 0 0 2 2v3' stroke='%230a5cff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}

#ab-close {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; border: none; background: transparent;
  color: #9ca3af; cursor: pointer; font-size: 14px; font-weight: 600;
  line-height: 1; transition: color 0.15s; flex-shrink: 0;
  padding: 0;
}
#ab-close:hover { color: #e53e3e; background: transparent; }

#ab-messages {
  flex: 1;
  padding: 16px;
  background: #f7f9fc;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Messages stack from top, user scrolls DOWN naturally */
  gap: 0;
  position: relative;
}
#ab-messages::-webkit-scrollbar { width: 4px; }
#ab-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }

#ab-typing {
  display: none;
  padding: 8px 16px;
  background: #f7f9fc;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
}
#ab-typing.ab-visible { display: flex !important; }
.ab-typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #aab4c8;
  animation: ab-typedot 1.2s ease-in-out infinite;
}
.ab-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.ab-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes ab-typedot { 0%,60%,100%{transform:scale(1);opacity:.4} 30%{transform:scale(1.35);opacity:1} }

/* ── Bot & User messages — logo anchored to TOP of message ── */
.ab-bot-msg, .ab-user-msg { display: flex; margin-bottom: 12px; }

.ab-bot-msg {
  gap: 10px;
  align-items: flex-start; /* logo aligns to TOP of message row */
}
.ab-bot-msg > img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  /* Pin to top — stays there even on very long messages */
  align-self: flex-start;
  margin-top: 0;
  position: sticky;
  top: 0;
}

.ab-user-msg { justify-content: flex-end; }
.ab-user-msg .ab-bubble { background: var(--ab-brand); color: #fff; border: none; border-radius: 14px 14px 4px 14px; }

.ab-bubble {
  background: #fff;
  border: 1px solid #edf2fb;
  border-radius: 4px 14px 14px 14px;
  padding: 12px 14px;
  max-width: 78%;
  font-size: 13.5px;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(10,92,255,.06);
  /* Allow bubble to grow with content */
  min-width: 0;
  word-break: break-word;
}
.ab-bubble strong { font-size: 13.5px; font-weight: 700; display: block; margin-bottom: 4px; color: #1a2035; }
.ab-divider { height: 1px; background: #e2e8f0; margin: 8px 0; }
.ab-time { font-size: 10.5px; color: #bbc5d8; margin-top: 6px; display: block; }

#ab-suggestions {
  padding: 10px 12px;
  display: flex; flex-wrap: wrap; gap: 7px;
  background: #fff;
  border-top: 1px solid #f0f3f9;
  flex-shrink: 0;
}
.ab-sug {
  padding: 6px 14px;
  border-radius: 20px;
  background: #f0f4ff;
  color: var(--ab-brand);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #dde6ff;
  transition: all 0.15s ease;
}
.ab-sug:hover { background: var(--ab-brand); color: #fff; border-color: var(--ab-brand); transform: translateY(-1px); }
.ab-sug.primary { background: var(--ab-brand); color: #fff; border-color: var(--ab-brand); }
.ab-sug.primary:hover { opacity: 0.88; transform: none; }

/* .ab-book-image moved to fullscreen section below */
.ab-carousel {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  margin: 10px 0 0 38px;
  height: 200px; padding-bottom: 4px;
  flex-shrink: 0;        /* never crush height in flex column */
  align-self: stretch;   /* full width */
  min-width: 0;
}
.ab-carousel::-webkit-scrollbar { height: 3px; }
.ab-carousel::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }
.ab-carousel img { height: 100%; width: auto; min-width: 140px; max-width: 220px; border-radius: 10px; object-fit: contain; object-position: center; background: #f0f2f7; box-shadow: 0 2px 8px rgba(0,0,0,0.1); flex-shrink: 0; }
/* Carousel taller + wider in fullscreen */
#ab-chatbox.ab-fullscreen .ab-carousel { height: 280px; margin-left: 54px; }
#ab-chatbox.ab-fullscreen .ab-carousel img { min-width: 200px; max-width: 340px; }

/* ── Conversation turn anchor (scroll target) ────────── */
.ab-turn-anchor {
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

/* ── Conversation turn separator ─────────────────────── */
.ab-turn-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  opacity: 0.35;
}
.ab-turn-sep::before,
.ab-turn-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #c8d4e8;
}

/* ── Suggestion chips — back nav variant ─────────────── */
.ab-sug.ab-back-nav {
  background: #f8fafc !important;
  color: #6b7280 !important;
  border-color: #e2e8f0 !important;
  font-size: 12px !important;
  padding: 5px 12px !important;
}
.ab-sug.ab-back-nav:hover {
  background: #f1f5f9 !important;
  color: #374151 !important;
  border-color: #cbd5e1 !important;
  transform: none !important;
}
.ab-cta-wrap {
  padding: 6px 0 4px 38px;
  max-width: calc(100% - 38px);
}
.ab-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ab-brand);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.18s ease;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(10,92,255,0.28);
  white-space: nowrap;
}
.ab-cta-btn::after {
  content: '→';
  font-size: 13px;
  transition: transform 0.18s;
}
.ab-cta-btn:hover {
  background: #0040cc;
  box-shadow: 0 6px 20px rgba(10,92,255,0.38);
  transform: translateY(-1px);
  color: #fff;
}
.ab-cta-btn:hover::after { transform: translateX(3px); }
.ab-cta-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(10,92,255,0.22); }

/* ── Bubble content — RTE HTML rendered inline ──────────── */
.ab-bubble-content { font-size: 13.5px; line-height: 1.65; }
.ab-bubble-content strong { font-weight: 700; }
.ab-bubble-content a { color: var(--ab-brand); text-decoration: underline; }
.ab-bubble-content ul, .ab-bubble-content ol { padding-left: 18px; margin: 6px 0; }
.ab-bubble-content li { margin: 2px 0; }
.ab-bubble-content p { margin: 4px 0; }
.ab-bubble-heading { display: block; font-size: 14px; font-weight: 700; color: #1a2035; margin-bottom: 5px; letter-spacing: -0.1px; }
.ab-bubble-line { font-size: 13.5px; line-height: 1.7; color: #374151; font-weight: 500; margin: 2px 0; }

/* ── Contact card ── */
.ab-contact-card {
  margin: 8px 0 4px 38px;
  background: #0B5CFF; border: none;
  border-radius: 10px; padding: 12px 14px; font-size: 13px;
  color: #fff;
}
.ab-contact-card a { color: #fff; text-decoration: none; display: block; margin-top: 4px; opacity: 0.92; }
.ab-contact-card a:hover { opacity: 1; text-decoration: underline; }

#ab-input-wrap {
  display: none;
  padding: 10px 12px;
  border-top: 1px solid #f0f3f9;
  gap: 8px; align-items: center;
  background: #fff; flex-shrink: 0;
}
#ab-input {
  flex: 1; padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: #f4f6fb;
  font-size: 13px; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
#ab-input:focus { border-color: var(--ab-brand); background: #fff; box-shadow: 0 0 0 3px rgba(10,92,255,.1); }
#ab-send {
  background: var(--ab-brand); color: #fff;
  border: none; border-radius: 10px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.15s;
}
#ab-send:hover { background: #0040cc; }
#ab-send svg { width: 15px; height: 15px; }

.ab-ai-mode #ab-input-wrap { display: flex; }
.ab-ai-mode #ab-suggestions { display: none; }

@media (max-width: 420px) {
  #ab-chatbox { width: calc(100vw - 16px); right: 8px; }
  #ab-fullscreen { display: none !important; }
}

/* ── Inline lead capture form ──────────────────────────── */
.ab-lead-form-wrap { width: 100%; margin: 8px 0; }
.ab-lead-form {
  background: #fff; border: 1.5px solid #e0e7ff;
  border-radius: 14px; padding: 18px 16px;
  box-shadow: 0 2px 12px rgba(10,92,255,.08); font-family: inherit;
}
.ab-lf-header { margin-bottom: 14px; }
.ab-lf-header strong { display: block; font-size: 15px; color: #1a1a2e; margin-bottom: 3px; }
.ab-lf-header span { font-size: 12px; color: #6b7280; }
.ab-lf-body { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.ab-lf-input {
  width: 100%; box-sizing: border-box; padding: 10px 13px;
  border: 1.5px solid #e5e7eb; border-radius: 9px;
  font-size: 13px; font-family: inherit; background: #f9fafb; color: #1a1a2e;
  outline: none; transition: border .15s, box-shadow .15s;
}
.ab-lf-input:focus { border-color: var(--ab-brand); background: #fff; box-shadow: 0 0 0 3px rgba(10,92,255,.1); }
.ab-lf-select { cursor: pointer; }
.ab-lf-error { background: #fef2f2; color: #dc2626; border-radius: 7px; padding: 7px 12px; font-size: 12px; margin-bottom: 8px; }
.ab-lf-submit {
  width: 100%; padding: 11px;
  background: var(--ab-brand); color: #fff;
  border: none; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.ab-lf-submit:hover { opacity: .92; transform: translateY(-1px); }
.ab-lf-submit:active { transform: translateY(0); }
.ab-lf-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Thank-you card ─────────────────────────────────────── */
.ab-lead-thankyou {
  background: #f0fdf4; border: 1.5px solid #86efac;
  border-radius: 14px; padding: 24px 18px; text-align: center; font-family: inherit;
}
.ab-lty-icon { font-size: 36px; margin-bottom: 10px; }
.ab-lead-thankyou strong { display: block; font-size: 14px; color: #15803d; margin-bottom: 6px; }
.ab-lead-thankyou p { font-size: 13px; color: #166534; margin: 0 0 16px; }
.ab-lty-back {
  display: inline-block; padding: 9px 20px;
  background: var(--ab-brand); color: #fff; border: none; border-radius: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s;
}
.ab-lty-back:hover { opacity: .88; }

/* ── Typing cursor (AI mode streaming) ─────────────────── */
.ab-bubble .typing-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--ab-brand); margin-left: 2px;
  vertical-align: text-bottom; animation: ab-blink 0.7s step-end infinite;
}
@keyframes ab-blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── AI reply formatting ─────────────────────────────── */
.ab-ai-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a2035;
  margin: 10px 0 4px;
  letter-spacing: -0.1px;
}
.ab-ai-section-title:first-child { margin-top: 0; }
.ab-ai-para {
  font-size: 13.5px;
  line-height: 1.7;
  color: #374151;
  font-weight: 400;
  margin: 3px 0;
}
.ab-ai-bullet {
  font-size: 13.5px;
  line-height: 1.65;
  color: #374151;
  padding-left: 4px;
  margin: 2px 0;
}
.ab-ai-spacer { height: 6px; }

/* ── Event Node Card ─────────────────────────────────── */
.ab-event-card {
  border-radius: 14px; overflow: hidden;
  margin: 8px 0; box-shadow: 0 4px 24px rgba(0,0,0,.28);
  cursor: pointer;
  /* bg_color and color set inline by JS from admin settings */
}
.ab-event-img {
  width: 100%; height: 200px;
  object-fit: cover; object-position: center top;
  display: block; transition: transform .3s ease;
  cursor: zoom-in;
}
.ab-event-card:hover .ab-event-img { transform: scale(1.02); }
.ab-event-body {
  padding: 14px 16px 16px;
  /* inherits bg and text color from inline style on .ab-event-card */
}
.ab-event-title {
  font-size: 14px; font-weight: 700;
  margin-bottom: 5px; line-height: 1.35;
  /* color inherited from card */
}
.ab-event-ends { font-size: 11px; opacity: .75; margin-bottom: 12px; }
.ab-event-ctas { display: flex; flex-direction: column; gap: 8px; }
.ab-event-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 50px;
  font-weight: 700; font-size: 13px;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: opacity .15s, transform .15s;
  /* Primary: background=text_color, color=bg_color (inverted) — set inline by JS */
}
.ab-event-btn:hover { opacity: .85; transform: translateY(-1px); }
.ab-event-btn-ghost {
  background: transparent !important;
  border: 2px solid currentColor;
  /* color=text_color set inline by JS */
}
/* Fullscreen: event card wider */
#ab-chatbox.ab-fullscreen .ab-event-card { max-width: 480px; }

/* ── Video Embed — 16:9 ratio, full thumbnail visible ─── */
.ab-video-wrap {
  margin: 8px 0 8px 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}
.ab-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ── Fullscreen mode ─────────────────────────────────── */
#ab-chatbox.ab-fullscreen {
  bottom: 16px !important;
  right: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(calc(100vw - 32px), 980px) !important;
  height: calc(100dvh - 32px) !important;
  height: calc(100vh - 32px) !important;
  border-radius: 20px !important;
  max-width: min(calc(100vw - 32px), 980px) !important;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.55) !important;
}
/* Messages area in fullscreen */
#ab-chatbox.ab-fullscreen #ab-messages { max-width: 100%; }
#ab-chatbox.ab-fullscreen .ab-bubble { max-width: 56%; }

/* ── Single image — full width ───────────────────────── */
.ab-book-image {
  display: block;
  width: calc(100% - 38px);
  height: auto;
  max-height: 300px;
  object-fit: contain;
  object-position: center top;
  border-radius: 10px;
  margin: 8px 0 4px 38px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  cursor: zoom-in;
  background: #f0f2f7;
}
/* In fullscreen the chat is much wider — cap image width for readability */
#ab-chatbox.ab-fullscreen .ab-book-image {
  max-width: 480px;
  max-height: 360px;
}

/* ── Lightbox ────────────────────────────────────────── */
.ab-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s;
  cursor: zoom-out;
}
.ab-lightbox-overlay.ab-lb-visible { background: rgba(0,0,0,0.88); }
.ab-lightbox-img {
  max-width: 92vw; max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  object-fit: contain;
  opacity: 0; transform: scale(0.92);
  transition: opacity 0.25s, transform 0.25s;
  cursor: default;
}
.ab-lb-visible .ab-lightbox-img { opacity: 1; transform: scale(1); }
.ab-lightbox-close {
  position: absolute; top: 16px; right: 20px;
  background: rgba(255,255,255,0.15);
  border: none; color: #fff; font-size: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.ab-lightbox-close:hover { background: rgba(255,255,255,0.28); }

/* ── Carousel scroll hint ────────────────────────────── */
.ab-carousel img { cursor: zoom-in; }

/* ── Popup bubble ────────────────────────────────────── */
.ab-popup-bubble {
  position: fixed;
  bottom: 90px; right: 16px;
  max-width: 220px;
  background: var(--ab-brand);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  padding: 12px 36px 12px 16px;
  font-size: 13.5px; font-weight: 500; line-height: 1.45;
  box-shadow: 0 8px 28px rgba(10,92,255,.32);
  z-index: 2147483640;
  animation: ab-popup-in .4s cubic-bezier(0.34,1.56,0.64,1) both;
  cursor: pointer;
}
.ab-popup-bubble p { margin: 0; }
.ab-popup-close {
  position: absolute; top: 5px; right: 7px;
  background: transparent; border: none; color: rgba(255,255,255,0.7);
  width: 16px; height: 16px; border-radius: 3px;
  font-size: 11px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s;
  padding: 0;
}
.ab-popup-close:hover { color: #fff; background: transparent; }
@keyframes ab-popup-in {
  from { opacity: 0; transform: translateY(12px) scale(.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* Popup also hides co-launch label when chat is open */

/* ── Chat background image ───────────────────────────────
   Centred watermark between header and suggestions bar.
   Fixed inside chatbox — NEVER scrolls with messages.
   Normal:     260×260px centred (no border-radius — square/natural shape)
   Fullscreen: 520×520px centred
   ─────────────────────────────────────────────────────── */

/* Wrapper: fills the content area below header, above input */
.ab-bg-image {
  position: absolute;
  top: 56px;           /* below ab-header */
  bottom: 58px;        /* above suggestions + input area */
  left: 0;
  right: 0;
  z-index: 0;          /* below flex content which has no z-index */
  pointer-events: none;
  /* Image is set inline via style="background-image:url(...)" */
  /* Centre at fixed 260×260 — no stretch, no crop, natural shape */
  background-size: 260px 260px;
  background-repeat: no-repeat;
  background-position: center center;
  /* Opacity via CSS custom property so it only affects this element */
  /* opacity set via inline style from PHP */
}

/* Fullscreen: 2× size */
#ab-chatbox.ab-fullscreen .ab-bg-image {
  bottom: 64px;
  background-size: 520px 520px;
}

/* Content layers naturally sit above the absolute-positioned bg watermark */
/* No explicit z-index needed — position:relative is enough */
#ab-messages, #ab-typing, #ab-suggestions, #ab-input-wrap, .ab-header {
  position: relative;
}
