/* =========================================================
   Sun Haven House — guest chat assistant
   Uses the page's design tokens (see :root in index.html).
   ========================================================= */
.shc-launch{
  position:fixed; z-index:60; right:24px; bottom:calc(24px + env(safe-area-inset-bottom));
  display:inline-flex; align-items:center; gap:10px;
  height:52px; padding:0 20px 0 16px; border-radius:999px;
  background:var(--brand, #12394a); color:#fff;
  font:500 .9375rem/1 var(--font, system-ui, sans-serif); letter-spacing:-.01em;
  box-shadow:0 18px 40px -14px rgba(7,19,27,.55), 0 2px 6px rgba(7,19,27,.18);
  border:1px solid rgba(255,255,255,.08); cursor:pointer;
  transition:transform .3s var(--ease, ease), box-shadow .3s, opacity .25s;
}
.shc-launch:hover{ transform:translateY(-2px); box-shadow:0 22px 46px -14px rgba(7,19,27,.6), 0 2px 6px rgba(7,19,27,.2); }
.shc-launch svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.shc-launch .shc-dot{ width:8px; height:8px; border-radius:50%; background:#5fd39b; box-shadow:0 0 0 3px rgba(95,211,155,.25); }
.shc-launch[aria-expanded="true"]{ opacity:0; pointer-events:none; transform:scale(.9); }

.shc-panel{
  position:fixed; z-index:61; right:24px; bottom:calc(24px + env(safe-area-inset-bottom));
  width:min(392px, calc(100vw - 32px)); height:min(620px, calc(100dvh - 48px));
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--surface, #fff); color:var(--ink, #0b1a24);
  border-radius:var(--r-lg, 20px); border:1px solid var(--line, rgba(11,26,36,.08));
  box-shadow:var(--sh-lg, 0 24px 60px -16px rgba(11,26,36,.24));
  font-family:var(--font, system-ui, sans-serif);
  transform-origin:bottom right; transform:translateY(12px) scale(.98); opacity:0; visibility:hidden;
  transition:transform .32s var(--ease, ease), opacity .22s, visibility 0s .32s;
}
.shc-panel.open{ transform:none; opacity:1; visibility:visible; transition:transform .32s var(--ease, ease), opacity .22s; }

.shc-head{
  display:flex; align-items:center; gap:12px; padding:16px 14px 16px 18px;
  background:linear-gradient(135deg, var(--night-2, #0c1f2b), var(--brand, #12394a)); color:#fff;
}
.shc-head .shc-logo{ width:36px; height:36px; flex:none; }
.shc-head h2{ font-size:1rem; font-weight:600; letter-spacing:-.01em; line-height:1.2; color:#fff; }
.shc-head p{ display:flex; align-items:center; gap:6px; font-size:.78rem; color:rgba(255,255,255,.7); line-height:1.3; margin-top:2px; }
.shc-head p::before{ content:''; width:6px; height:6px; border-radius:50%; background:#5fd39b; }
.shc-head .shc-x{ margin-left:auto; width:36px; height:36px; border-radius:10px; display:grid; place-items:center; color:rgba(255,255,255,.8); }
.shc-head .shc-x:hover{ background:rgba(255,255,255,.08); color:#fff; }
.shc-head .shc-x svg{ width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; }

.shc-log{ flex:1; overflow-y:auto; padding:18px 16px 8px; display:flex; flex-direction:column; gap:10px; background:var(--bg, #f5f7f9); overscroll-behavior:contain; }
.shc-msg{ max-width:86%; padding:10px 14px; border-radius:16px; font-size:.9rem; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.shc-msg.bot{ align-self:flex-start; background:var(--surface, #fff); border:1px solid var(--line, rgba(11,26,36,.08)); border-bottom-left-radius:6px; color:var(--ink-2, #33434f); box-shadow:var(--sh-xs, none); }
.shc-msg.user{ align-self:flex-end; background:var(--accent, #2e86ab); color:#fff; border-bottom-right-radius:6px; }
.shc-msg.err{ background:#fbeee9; border-color:rgba(180,73,47,.2); color:var(--err, #b4492f); }

.shc-actions{ display:flex; flex-wrap:wrap; gap:6px; align-self:flex-start; margin:-2px 0 4px; }
.shc-actions button, .shc-chips button{
  font-size:.8125rem; font-weight:500; padding:7px 12px; border-radius:999px; line-height:1.2;
  background:var(--accent-soft, #e7f2f7); color:var(--accent-ink, #1b6788); border:1px solid rgba(46,134,171,.18);
  transition:background .2s, border-color .2s;
}
.shc-actions button:hover, .shc-chips button:hover{ background:#d8ebf3; border-color:rgba(46,134,171,.35); }
.shc-actions button.primary{ background:var(--brand, #12394a); color:#fff; border-color:transparent; }
.shc-actions button.primary:hover{ background:var(--night-2, #0c1f2b); }

.shc-chips{ display:flex; flex-wrap:wrap; gap:6px; padding:4px 0 6px; }

.shc-typing{ align-self:flex-start; display:flex; gap:4px; padding:14px 16px; background:var(--surface, #fff); border:1px solid var(--line, rgba(11,26,36,.08)); border-radius:16px; border-bottom-left-radius:6px; }
.shc-typing i{ width:6px; height:6px; border-radius:50%; background:var(--faint, #9aa6ae); animation:shc-b 1.2s infinite ease-in-out; }
.shc-typing i:nth-child(2){ animation-delay:.15s; } .shc-typing i:nth-child(3){ animation-delay:.3s; }
@keyframes shc-b{ 0%,60%,100%{ transform:none; opacity:.5; } 30%{ transform:translateY(-4px); opacity:1; } }

.shc-form{ display:flex; align-items:flex-end; gap:8px; padding:10px 12px; border-top:1px solid var(--line, rgba(11,26,36,.08)); background:var(--surface, #fff); }
.shc-form textarea{
  flex:1; resize:none; max-height:120px; min-height:42px; padding:10px 14px; border-radius:14px;
  border:1px solid var(--line-2, rgba(11,26,36,.14)); background:var(--surface-2, #fbfcfd);
  font-size:.9rem; line-height:1.45; outline:none;
}
.shc-form textarea:focus{ border-color:var(--accent, #2e86ab); box-shadow:0 0 0 3px rgba(46,134,171,.15); }
.shc-form button{ width:42px; height:42px; flex:none; border-radius:12px; display:grid; place-items:center; background:var(--accent, #2e86ab); color:#fff; transition:background .2s, opacity .2s; }
.shc-form button:hover{ background:var(--accent-ink, #1b6788); }
.shc-form button:disabled{ opacity:.45; cursor:default; }
.shc-form button svg{ width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.shc-note{ padding:0 14px 10px; font-size:.7rem; color:var(--faint, #9aa6ae); background:var(--surface, #fff); text-align:center; }

@media (max-width: 880px){
  /* sit above the mobile booking bar */
  .shc-launch{ right:16px; bottom:calc(92px + env(safe-area-inset-bottom)); height:52px; width:52px; padding:0; justify-content:center; }
  .shc-launch .shc-label, .shc-launch .shc-dot{ display:none; }
  .shc-panel{ right:8px; left:8px; width:auto; bottom:calc(8px + env(safe-area-inset-bottom)); height:min(640px, calc(100dvh - 72px)); }
}
@media (prefers-reduced-motion: reduce){
  .shc-launch, .shc-panel{ transition:none; }
  .shc-typing i{ animation:none; }
}
