/* Ask Travella chat. A floating card on tablets and desktops; a full-screen sheet on phones
   and short landscape screens. Only the message list scrolls, so the composer never moves. */
.travel-assistant{position:fixed;right:22px;bottom:144px;z-index:65;display:flex;flex-direction:column;width:min(384px,calc(100vw - 32px));height:min(600px,calc(100dvh - var(--nav-height,88px) - 168px));overflow:hidden;background:var(--cream);color:var(--forest);border:1px solid #1b2a1e1f;border-radius:20px;box-shadow:0 28px 64px -20px #1b2a1e66,0 2px 10px #1b2a1e14;animation:chat-in .24s var(--tv-ease-reveal,ease-out)}

/* Header */
.chat-head{flex:none;display:flex;align-items:center;gap:12px;padding:14px 12px 14px 16px;background:var(--forest);color:var(--cream)}
.chat-avatar{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--orange);color:var(--forest);font:600 19px/1 Georgia,serif}
.chat-head>div{min-width:0}
.travel-assistant .chat-head h2{margin:0;font:600 17px/1.2 var(--display);letter-spacing:-.01em;color:inherit}
.chat-head p{display:flex;align-items:center;gap:6px;margin:3px 0 0;font-size:12px;line-height:1.3;opacity:.78}
.chat-head p:before{content:'';flex:none;width:7px;height:7px;border-radius:50%;background:#8fd19e}
.chat-close{flex:none;display:grid;place-items:center;width:38px;height:38px;margin-left:auto;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;font-size:24px;line-height:1;transition:background .15s}
.chat-close:hover{background:#fcf9f21f}

/* Messages */
.chat-log{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;padding:18px 14px 14px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#1b2a1e2e transparent;background:#f7f3ea}
.chat-msg{margin:0;max-width:85%;padding:10px 14px;font-size:14px;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere;border-radius:18px;animation:chat-pop .2s ease-out}
.chat-assistant{align-self:flex-start;background:#fff;border:1px solid #1b2a1e14;border-bottom-left-radius:6px;box-shadow:0 1px 2px #1b2a1e0d}
.chat-user{align-self:flex-end;background:var(--green);color:var(--cream);border-bottom-right-radius:6px}
.chat-wa{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:8px 14px;border-radius:999px;background:#25d366;color:#08361b;font-size:13px;font-weight:600;white-space:nowrap;transition:filter .15s}
.chat-wa:hover{filter:brightness(.95)}
.chat-refresh{border:0;background:var(--forest);color:var(--cream);font-family:inherit;cursor:pointer}
.chat-typing{display:flex;gap:4px;padding:14px 16px}
.chat-typing i{width:7px;height:7px;border-radius:50%;background:var(--sage);animation:chat-dot 1.1s infinite ease-in-out}
.chat-typing i:nth-child(2){animation-delay:.15s}.chat-typing i:nth-child(3){animation-delay:.3s}

/* Composer: one swipeable row of common questions, the input, and a short note. */
.chat-foot{flex:none;padding:10px 12px 10px;background:var(--cream);border-top:1px solid #1b2a1e14}
.chat-quick{display:flex;gap:6px;margin:0 -12px 10px;padding:2px 12px 6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#1b2a1e40 transparent;cursor:grab;-webkit-mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,transparent,#000 12px,#000 calc(100% - 28px),transparent)}
.chat-quick::-webkit-scrollbar{height:4px}.chat-quick::-webkit-scrollbar-thumb{background:#1b2a1e40;border-radius:4px}.chat-quick.is-dragging{cursor:grabbing;user-select:none}.chat-quick.is-dragging .chat-chip{pointer-events:none}
.chat-quick:empty{display:none}
.chat-chip{flex:none;padding:7px 13px;border:1px solid #1b2a1e2e;border-radius:999px;background:#fff;color:var(--forest);font-size:12.5px;line-height:1.25;white-space:nowrap;transition:background .15s,border-color .15s}
.chat-chip:hover{background:#a3b18a2e;border-color:var(--green)}
.chat-form{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;gap:6px;padding:4px 4px 4px 16px;background:#fff;border:1px solid #1b2a1e2e;border-radius:24px;transition:border-color .15s,box-shadow .15s}
.chat-form:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #a3b18a4d}
.travel-assistant .chat-form input{grid-column:1;min-width:0;width:100%;margin:0;padding:9px 0;border:0;background:transparent;font-size:15px;line-height:1.4}
.travel-assistant .chat-form input:focus-visible{outline:none}
.chat-send{grid-column:2;grid-row:1;display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:var(--forest);color:var(--cream);transition:opacity .15s,transform .15s}
.chat-send:hover:not(:disabled){transform:scale(1.05)}
.chat-send svg{width:18px;height:18px}
.chat-turnstile{grid-column:1/-1;display:flex;justify-content:center;min-width:0;max-width:100%;margin:2px 0 0;padding:6px 0 2px;overflow:hidden;border-top:1px solid #1b2a1e12}
.chat-turnstile[data-token]:not([data-token=""]){display:none}
.chat-note{margin:8px 0 0;font-size:11px;line-height:1.4;color:var(--muted);text-align:center}
.chat-note a{text-decoration:underline;text-underline-offset:2px}

/* Tablets with the bottom dock: float the card above the dock and the round help buttons. */
@media (min-width:600.02px) and (max-width:1279.98px) and (min-height:561px){
  .has-mobile-dock .travel-assistant{bottom:calc(var(--dock-height,78px) + 130px);height:min(600px,calc(100dvh - var(--nav-height,88px) - var(--dock-height,78px) - 154px))}
}

/* Phones and short landscape screens: take the whole screen above the dock and keyboard. */
@media (max-width:600px),(max-height:560px){
  .travel-assistant{inset:0;width:100%;top:var(--chat-top,0);height:var(--chat-vh,100dvh);border:0;border-radius:0;box-shadow:none;z-index:1000;animation-name:chat-sheet}
  .chat-head{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:12px}
  .chat-log{padding-inline:12px}
  .chat-msg{max-width:min(88%,560px)}
  .chat-foot{padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .travel-assistant .chat-form input{font-size:16px}
  html.chat-open,html.chat-open body{overflow:hidden}
}
@media (max-height:420px){.chat-note{display:none}.chat-quick{margin-bottom:8px}}

@keyframes chat-in{from{opacity:0;transform:translateY(14px) scale(.98)}}
@keyframes chat-sheet{from{opacity:0;transform:translateY(32px)}}
@keyframes chat-pop{from{opacity:0;transform:translateY(6px)}}
@keyframes chat-dot{0%,80%,100%{opacity:.35;transform:none}40%{opacity:1;transform:translateY(-4px)}}
@media (prefers-reduced-motion:reduce){.travel-assistant,.chat-msg,.chat-typing i{animation:none!important}}
/* Reset conversation, next to Close in the chat header. */
.chat-reset{flex:none;display:grid;place-items:center;width:38px;height:38px;margin-left:auto;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;transition:background .15s}
.chat-reset svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.chat-reset:hover{background:#fcf9f21f}
.chat-reset:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.chat-reset+.chat-close{margin-left:2px}
