/* ═══════════════════════════════════════════════════════════
   AI CHATBOT WIDGET (static/js/chatbot.js)
   Extracted from the previous main.css; colours re-pointed at the new
   design tokens below so the widget matches the redesigned site.
   ═══════════════════════════════════════════════════════════ */
:root {
  --navy-primary: #0f1530;
  --gold-accent: #a07c45;
  --bg-soft: #f3eee6;
  --bg-white: #FFFFFF;
  --text-dark: #14163A;
  --font-heading: 'Jost', system-ui, sans-serif;
  --font-body: 'Jost', system-ui, sans-serif;
  --radius: 16px;
  --shadow-soft: 0 20px 45px rgba(20, 22, 70, 0.14);
}

.zs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.zs-chat-launcher {
  position: fixed;
  bottom: 72px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(46,49,146,0.35);
  z-index: 490;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.zs-chat-launcher svg { width: 26px; height: 26px; fill: #ffffff; }

.zs-chat-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 28px rgba(46,49,146,0.45);
  background: #1e2278;
}

.zs-chat-launcher.is-open { background: #1e2278; }

@media (prefers-reduced-motion: reduce) {
  .zs-chat-launcher { transition: none; }
}

.zs-chat-panel {
  position: fixed;
  bottom: 140px;   /* 72px launcher bottom + 56px launcher height + 12px gap */
  left: 24px;
  width: 400px;
  height: 600px;
  max-height: calc(100vh - 180px);
  background: var(--bg-white);
  border-radius: 20px;
  box-shadow: 0 16px 56px rgba(46,49,146,0.22), 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 489;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
}

.zs-chat-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .zs-chat-panel { transition: none; transform: none; }
}

@media (max-width: 639px) {
  .zs-chat-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    transform: translateY(100%);
  }
  .zs-chat-panel.is-open { transform: translateY(0); }
  .zs-chat-launcher { bottom: 72px;  left: 16px; right: auto; }
}

.zs-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--navy-primary);
  flex-shrink: 0;
}

.zs-chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
}

.zs-chat-header-icon { width: 20px; height: 20px; fill: var(--gold-accent); flex-shrink: 0; }

.zs-chat-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.8);
  transition: color 0.15s, background 0.15s;
}

.zs-chat-close:hover { color: #ffffff; background: rgba(255,255,255,0.12); }

.zs-chat-close svg { width: 20px; height: 20px; fill: currentColor; }

.zs-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

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

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

.zs-chat-messages::-webkit-scrollbar-thumb { background: rgba(46,49,146,0.2); border-radius: 4px; }

.zs-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  word-break: break-word;
}

.zs-bubble--user {
  align-self: flex-end;
  background: var(--navy-primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.zs-bubble--bot {
  align-self: flex-start;
  background: var(--bg-soft);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(46,49,146,0.08);
}

.zs-bubble--animate { animation: zs-bubble-in 0.2s ease forwards; }

@keyframes zs-bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .zs-bubble--animate { animation: none; }
}

.zs-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  min-width: 56px;
}

.zs-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy-primary);
  opacity: 0.4;
  animation: zs-dot 1.1s infinite ease-in-out;
}

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

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

@keyframes zs-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.9); }
  40%           { opacity: 1;   transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .zs-typing span { animation: none; opacity: 0.6; }
}

.zs-chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 100%; }

.zs-chip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--navy-primary);
  background: transparent;
  color: var(--navy-primary);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.zs-chip:hover { background: var(--navy-primary); color: #ffffff; }

.zs-chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(46,49,146,0.1);
  background: var(--bg-white);
  flex-shrink: 0;
}

.zs-chat-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 9px 13px;
  border: 1.5px solid rgba(46,49,146,0.2);
  border-radius: 12px;
  resize: none;
  overflow: hidden;
  line-height: 1.5;
  max-height: 80px;
  transition: border-color 0.2s;
  color: var(--text-dark);
  background: var(--bg-soft);
}

.zs-chat-input:focus { outline: none; border-color: var(--navy-primary); background: var(--bg-white); }

.zs-chat-input:disabled { opacity: 0.55; cursor: not-allowed; }

.zs-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--gold-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.zs-chat-send svg { width: 18px; height: 18px; fill: var(--navy-primary); }

.zs-chat-send:hover { transform: scale(1.08); background: #c9922e; }

.zs-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.chat-whatsapp-handoff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  margin-top: 8px;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
}

.chat-whatsapp-handoff:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  color: #fff;
}

.chat-whatsapp-handoff svg {
  flex-shrink: 0;
}

/* ── Redesign overrides ─────────────────────────────────────────────
   The bottom news ticker is gone, so the launcher sits at the corner on
   desktop. On phones the sticky action bar (Call / WhatsApp / Book)
   occupies the bottom ~68px, so the launcher floats above it. */
.zs-chat-launcher {
  bottom: 24px;
  left: 24px;
  background: #0f1530;
  box-shadow: 0 10px 26px rgba(15, 21, 48, 0.25);
}
.zs-chat-launcher.is-open { background: #222a55; }
.zs-chat-panel { bottom: 92px; left: 24px; }
@media (max-width: 860px) {
  .zs-chat-launcher { bottom: 84px; left: 16px; width: 50px; height: 50px; }
}
