/* ═══════════════════════════════════════════════════════════════════════════
   GoTravelista · Live Chat widget
   Replaces the header Call / WhatsApp CTAs (desktop + mobile).
   Palette + type tokens come from theme-2026.css — this file defines no
   colours of its own beyond the chat-specific tints, so a brand change in
   the design system carries through here without an edit.

   z-index ladder on this site (do not reshuffle casually):
     50   sticky header
     997  .fixed-quote-bar
     998  .mobile-bottom-nav
     1200 this panel  ← must clear both bars or the composer sits under them
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Header trigger buttons ──────────────────────────────────────────────── */
/* Desktop pill: occupies the slot the old .gt-hdr-wa / .gt-hdr-call had. */
.gt-hdr-chat {
  display: none; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--gt-navy-brand), var(--gt-navy-2));
  color: #fff; font-weight: 700; font-size: .82rem;
  padding: 9px 18px; border-radius: 50px; text-decoration: none;
  border: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--gt-font-sans);
  box-shadow: 0 3px 14px rgba(26,58,92,.28);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.gt-hdr-chat:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,58,92,.34); }
@media (min-width: 768px) { .gt-hdr-chat { display: inline-flex; } }

/* Mobile pill: replaces .gt-hdr-call-m, keeps its amber treatment so the
   header's visual weight is unchanged on phones. */
.gt-hdr-chat-m {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--gt-amber), var(--gt-amber-d));
  color: #fff; font-weight: 700; font-size: .8rem; padding: 8px 16px;
  border-radius: 50px; text-decoration: none; border: 0; cursor: pointer;
  font-family: var(--gt-font-sans);
  box-shadow: 0 3px 12px rgba(184,134,11,.35); white-space: nowrap;
}
@media (min-width: 768px) { .gt-hdr-chat-m { display: none; } }

/* Live dot — the one signal that says "someone is actually there". */
.gt-lc-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #35d07f;
  box-shadow: 0 0 0 0 rgba(53,208,127,.7); animation: gtLcPulse 2s infinite;
  flex: 0 0 auto;
}
@keyframes gtLcPulse {
  0%   { box-shadow: 0 0 0 0 rgba(53,208,127,.65); }
  70%  { box-shadow: 0 0 0 7px rgba(53,208,127,0); }
  100% { box-shadow: 0 0 0 0 rgba(53,208,127,0); }
}
@media (prefers-reduced-motion: reduce) { .gt-lc-dot { animation: none; } }

/* ── Panel shell ─────────────────────────────────────────────────────────── */
.gt-lc-panel {
  position: fixed; z-index: 1200;
  display: flex; flex-direction: column;
  background: #fff; font-family: var(--gt-font-sans);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.gt-lc-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

/* Phones: full-height sheet sliding up from the bottom. */
@media (max-width: 767px) {
  .gt-lc-panel {
    inset: 0; transform: translateY(18px);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .gt-lc-panel.is-open { transform: translateY(0); }
}

/* Tablet and up: anchored card in the bottom-right corner. */
@media (min-width: 768px) {
  .gt-lc-panel {
    right: 22px; bottom: 22px; width: 380px; height: min(600px, calc(100vh - 120px));
    border-radius: 20px; overflow: hidden;
    box-shadow: var(--gt-shadow-l); border: 1px solid var(--gt-cream-2);
    transform: translateY(14px) scale(.98); transform-origin: bottom right;
  }
  .gt-lc-panel.is-open { transform: translateY(0) scale(1); }
}
/* Large screens carry the floating .fixed-quote-bar pill centred at the
   bottom; the panel sits to its right and clears it either way. */
@media (min-width: 1024px) { .gt-lc-panel { bottom: 26px; } }

/* ── Panel header ────────────────────────────────────────────────────────── */
.gt-lc-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: linear-gradient(135deg, var(--gt-navy), var(--gt-navy-brand));
  color: #fff; flex: 0 0 auto;
}
.gt-lc-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--gt-gold), var(--gt-amber));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--gt-font-serif); font-weight: 700; font-size: 1.05rem; color: var(--gt-navy);
}
.gt-lc-head-txt { min-width: 0; flex: 1; }
.gt-lc-title {
  font-weight: 700; font-size: .95rem; line-height: 1.25;
  display: flex; align-items: center; gap: 7px;
}
.gt-lc-sub { font-size: .72rem; color: rgba(255,255,255,.68); margin-top: 2px; }
.gt-lc-close {
  background: rgba(255,255,255,.12); border: 0; color: #fff; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.gt-lc-close:hover { background: rgba(255,255,255,.24); }

/* ── Transcript ──────────────────────────────────────────────────────────── */
.gt-lc-body {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 14px 8px; background: var(--gt-cream);
  display: flex; flex-direction: column;
  -webkit-overflow-scrolling: touch;
}
/* Messages hug the composer instead of floating at the top of an empty panel.
   Done with margin-top:auto on a wrapper rather than justify-content:flex-end,
   which clips the top of the transcript once it overflows. */
.gt-lc-stream {
  margin-top: auto; display: flex; flex-direction: column; gap: 10px;
}
.gt-lc-msg {
  max-width: 82%; padding: 10px 13px; font-size: .875rem; line-height: 1.5;
  border-radius: 16px; word-wrap: break-word; white-space: pre-wrap;
  animation: gtLcIn .22s ease both;
}
@keyframes gtLcIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gt-lc-msg { animation: none; } }
.gt-lc-msg.bot {
  align-self: flex-start; background: #fff; color: var(--gt-ink);
  border-bottom-left-radius: 5px; box-shadow: var(--gt-shadow-s);
}
.gt-lc-msg.me {
  align-self: flex-end; color: #fff; border-bottom-right-radius: 5px;
  background: linear-gradient(135deg, var(--gt-navy-brand), var(--gt-navy-2));
}
.gt-lc-msg a { color: var(--gt-amber); font-weight: 700; text-decoration: underline; }
.gt-lc-msg.me a { color: var(--gt-gold-2); }

/* Typing indicator — three dots in a bot bubble. */
.gt-lc-typing { display: flex; gap: 4px; align-items: center; padding: 13px 15px; }
.gt-lc-typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gt-gray);
  display: block; animation: gtLcBounce 1.2s infinite ease-in-out;
}
.gt-lc-typing i:nth-child(2) { animation-delay: .15s; }
.gt-lc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gtLcBounce { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ── Quick replies ───────────────────────────────────────────────────────── */
.gt-lc-chips {
  display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 14px 10px;
  flex: 0 0 auto; background: var(--gt-cream);
}
.gt-lc-chips:empty { display: none; padding: 0; }
.gt-lc-chip {
  background: #fff; border: 1.5px solid var(--gt-cream-2); color: var(--gt-navy-brand);
  font-family: var(--gt-font-sans); font-size: .8rem; font-weight: 700;
  padding: 8px 14px; border-radius: 50px; cursor: pointer;
  transition: all .18s; white-space: nowrap;
}
.gt-lc-chip:hover { border-color: var(--gt-amber); background: var(--gt-amber); color: #fff; }

/* ── Composer ────────────────────────────────────────────────────────────── */
.gt-lc-foot {
  flex: 0 0 auto; border-top: 1px solid var(--gt-cream-2); background: #fff;
  padding: 10px 12px; display: flex; align-items: flex-end; gap: 8px;
}
.gt-lc-input {
  flex: 1; border: 1.5px solid var(--gt-cream-2); border-radius: 22px;
  padding: 10px 14px; font-size: 16px; /* 16px stops iOS zooming on focus */
  font-family: var(--gt-font-sans); color: var(--gt-ink);
  resize: none; max-height: 96px; line-height: 1.4; outline: none;
  transition: border-color .2s;
}
.gt-lc-input:focus { border-color: var(--gt-amber); }
.gt-lc-input:disabled { background: var(--gt-cream); color: var(--gt-gray); }
.gt-lc-send {
  width: 42px; height: 42px; flex: 0 0 auto; border: 0; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, var(--gt-amber), var(--gt-amber-d)); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: filter .2s, opacity .2s;
}
.gt-lc-send:hover { filter: brightness(1.1); }
.gt-lc-send:disabled { opacity: .45; cursor: not-allowed; }
.gt-lc-legal {
  font-size: .66rem; color: var(--gt-gray); text-align: center;
  padding: 0 12px 9px; background: #fff; flex: 0 0 auto;
}

/* Phones only: the panel is a full-screen sheet, so the page behind it must
   not scroll under it (a rubber-band scroll there looks like the chat is
   falling apart). Desktop keeps page scrolling — the panel is a corner card. */
@media (max-width: 767px) {
  html.gt-lc-open, html.gt-lc-open body { overflow: hidden; }
}
