/* Lisa, DreamSpace Front Desk AI: web chat widget.
   Built from the approved stills (frontdesk-chat/design/stills.html, approved 2026-12-02).
   Everything is scoped under #lisa so it can't clash with the site's own classes. */

#lisa {
  --l-cobalt: #173BFF; --l-blue: #3478F6; --l-ice: #A9E7FF;
  --l-ink: #10172A; --l-slate: #536078; --l-mist: #EAF2FF; --l-line: #D8E2F0;
  --l-hot: #FF6B4A; --l-warm: #FFB938; --l-ok: #19B36B; --l-muted: #8A95AB;
  --l-shadow: 0 16px 48px rgba(16, 23, 42, 0.10);
  --l-shadow-lg: 0 30px 80px rgba(23, 59, 255, 0.18);
  --l-mono: "IBM Plex Mono", ui-monospace, monospace;
  --l-ease: cubic-bezier(.22, 1, .36, 1);
  --l-soft: cubic-bezier(.2, .7, .3, 1);   /* gentler curve for messages arriving */
  position: fixed; right: 32px; bottom: 32px; z-index: 2147483000;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--l-ink);
  -webkit-font-smoothing: antialiased; line-height: 1.4; font-size: 16px;
}
#lisa *, #lisa *::before, #lisa *::after { box-sizing: border-box; }
#lisa button { font: inherit; cursor: pointer; }
#lisa [hidden] { display: none !important; }
#lisa .lisa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Avatar + status badge ---------- */
#lisa .lisa-avatar { position: relative; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
#lisa .lisa-avatar img { width: 24px; height: auto; }
#lisa .lisa-live { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #7CFFB2; box-shadow: 0 0 0 2.5px #2048FF; transition: background .3s; }
#lisa.is-offline .lisa-live { background: #C3CCDB; }

/* ---------- Launcher (closed) ---------- */
#lisa .lisa-launch { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
#lisa .lisa-teaser { width: 290px; background: #fff; border: 1px solid var(--l-line); border-radius: 20px; border-bottom-right-radius: 6px; padding: 14px 16px; box-shadow: var(--l-shadow); position: relative;
  animation: lisa-rise .45s var(--l-ease) both; }
#lisa .lisa-teaser p { margin: 0; font-size: .88rem; line-height: 1.45; }
#lisa .lisa-teaser p b { font-weight: 800; }
#lisa .lisa-teaser__x { position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--l-line); display: grid; place-items: center; box-shadow: 0 4px 10px rgba(16,23,42,.08); padding: 0; }
#lisa .lisa-teaser__x svg { width: 10px; height: 10px; stroke: var(--l-slate); stroke-width: 3; stroke-linecap: round; }
#lisa .lisa-teaser .lisa-chips { padding: 10px 0 0; gap: 6px; }
#lisa .lisa-teaser .lisa-chip { font-size: .76rem; padding: 6px 10px; }
#lisa .lisa-pill { display: flex; align-items: center; gap: 10px; padding: 8px 20px 8px 8px; border-radius: 999px; color: #fff; font-weight: 800; font-size: .95rem; border: 0; text-align: left;
  background: linear-gradient(135deg, var(--l-cobalt), var(--l-blue)); box-shadow: 0 14px 34px rgba(23,59,255,.4), 0 0 0 6px rgba(234,242,255,.9);
  transition: transform .2s var(--l-ease), box-shadow .2s; }
#lisa .lisa-pill:hover { transform: translateY(-2px); }
#lisa .lisa-launch.is-in .lisa-pill { animation: lisa-rise .45s var(--l-ease) both; }
#lisa .lisa-pill:focus-visible { outline: 3px solid var(--l-ice); outline-offset: 4px; }
#lisa .lisa-pill .lisa-avatar { width: 40px; height: 40px; }
#lisa .lisa-pill small { display: block; font-weight: 600; font-size: .72rem; opacity: .9; }

/* ---------- Panel ---------- */
#lisa .lisa-panel { position: absolute; right: 0; bottom: 0; width: 400px; height: min(680px, calc(100vh - 64px)); background: #fff; border-radius: 28px; border: 1px solid var(--l-line);
  box-shadow: var(--l-shadow-lg), 0 0 0 8px rgba(234,242,255,.85); overflow: hidden; display: flex; flex-direction: column;
  transform-origin: bottom right; animation: lisa-open .35s var(--l-ease) both; }
#lisa .lisa-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; color: #fff; position: relative; flex: none;
  background: linear-gradient(135deg, var(--l-cobalt), var(--l-blue)); }
#lisa .lisa-head::after { content: ""; position: absolute; inset: 0; background-image: var(--lisa-mark); background-size: 46px; background-repeat: repeat; opacity: .06; pointer-events: none; }
#lisa .lisa-head .lisa-avatar { z-index: 1; }
#lisa .lisa-title { position: relative; z-index: 1; min-width: 0; }
#lisa .lisa-title strong { display: block; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
#lisa .lisa-title small { display: block; font-size: .78rem; opacity: .88; white-space: nowrap; }
#lisa .lisa-ibtn { margin-left: auto; position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 0; padding: 0; transition: background .2s; }
#lisa .lisa-ibtn:hover { background: rgba(255,255,255,.22); }
#lisa .lisa-ibtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#lisa .lisa-ibtn svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#lisa .lisa-ibtn .lisa-x { display: none; }

#lisa .lisa-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 12px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(#F7FAFF, #fff 60%); overscroll-behavior: contain; scroll-behavior: smooth; }
#lisa .lisa-body > :first-child { margin-top: auto; }
#lisa .lisa-day { align-self: center; font-family: var(--l-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--l-slate); background: #fff; border: 1px solid var(--l-line); padding: 3px 10px; border-radius: 999px; margin-bottom: 4px; }
#lisa .lisa-demo { align-self: center; font-family: var(--l-mono); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; color: #8A5A00; background: #FFF4DC; border-radius: 999px; padding: 3px 10px; }

/* First-open greeting: the row and chip group stay put; each piece rises in on its own delay */
#lisa .lisa-row.is-greeting, #lisa .lisa-chips.is-greeting { animation: none; }
#lisa .lisa-greet { animation: lisa-in .28s var(--l-soft) both; transform-origin: 0 100%; }
#lisa .lisa-settled, #lisa .lisa-settled * { animation: none !important; }

/* Messages */
#lisa .lisa-row { display: flex; gap: 8px; align-items: flex-end; animation: lisa-in .28s var(--l-soft) both; transform-origin: 0 100%; }
#lisa .lisa-row--me { justify-content: flex-end; animation-duration: .18s; transform-origin: 100% 100%; }
/* cards (booked, handoff, call offer, error, offline): a gentle fade and settle, no scale */
#lisa .lisa-row:not(.is-greeting):has(> .lisa-card) { animation-name: lisa-settle; animation-duration: .32s; }
#lisa .lisa-mini { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--l-cobalt), var(--l-blue)); }
#lisa .lisa-mini img { width: 15px; height: auto; }
#lisa .lisa-mini--ghost { visibility: hidden; }
#lisa .lisa-stack { display: flex; flex-direction: column; gap: 6px; max-width: 86%; min-width: 0; }
#lisa .lisa-msg { max-width: 82%; padding: 11px 15px; border-radius: 20px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
#lisa .lisa-stack .lisa-msg { max-width: 100%; }
#lisa .lisa-msg--bot { background: var(--l-mist); border-bottom-left-radius: 6px; }
#lisa .lisa-msg--me { background: var(--l-cobalt); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 20px rgba(23,59,255,.22); }

/* Typing dots (no status event yet) */
#lisa .lisa-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
#lisa .lisa-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--l-slate); opacity: .35; animation: lisa-dot 1.1s infinite; }
#lisa .lisa-typing i:nth-child(2) { animation-delay: .15s; }
#lisa .lisa-typing i:nth-child(3) { animation-delay: .3s; }

/* Proof line: checked + sources */
#lisa .lisa-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-left: 2px; }
#lisa .lisa-proof__label { font-family: var(--l-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--l-slate); }
#lisa .lisa-src { display: inline-flex; align-items: center; gap: 5px; font-family: var(--l-mono); font-size: .7rem; color: var(--l-cobalt); background: #fff; border: 1px solid var(--l-line); border-radius: 999px; padding: 3px 9px 3px 7px; }
#lisa .lisa-src svg { width: 12px; height: 12px; stroke: var(--l-cobalt); fill: none; stroke-width: 2; }
#lisa .lisa-checked { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; color: var(--l-ok); }
#lisa .lisa-checked svg { width: 14px; height: 14px; }

/* Chips */
#lisa .lisa-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 34px; animation: lisa-in .28s var(--l-soft) both; transform-origin: 0 100%; }
#lisa .lisa-chip { font-size: .82rem; font-weight: 700; color: var(--l-cobalt); background: #fff; border: 1.5px solid var(--l-line); border-radius: 999px; padding: 8px 13px; box-shadow: 0 4px 12px rgba(16,23,42,.04); transition: border-color .2s, background .2s; text-align: left; }
#lisa .lisa-chip:hover { border-color: var(--l-cobalt); background: var(--l-mist); }
#lisa .lisa-chip--book { background: var(--l-cobalt); color: #fff; border-color: var(--l-cobalt); box-shadow: 0 8px 18px rgba(23,59,255,.28); }
#lisa .lisa-chip--book:hover { background: #0F2FD9; border-color: #0F2FD9; }
#lisa .lisa-chip:focus-visible, #lisa .lisa-btn:focus-visible, #lisa .lisa-slot:focus-visible { outline: 3px solid var(--l-ice); outline-offset: 2px; }

/* ---------- Progress card (approved rail, 2026-12-02) ---------- */
#lisa .lisa-work { background: #fff; border: 1px solid var(--l-line); border-radius: 18px; border-bottom-left-radius: 6px; padding: 12px 14px; width: 250px; box-shadow: var(--l-shadow); }
#lisa .lisa-steps { display: flex; flex-direction: column; }
#lisa .lisa-step { position: relative; display: flex; align-items: center; gap: 10px; font-size: .84rem; font-weight: 600; color: var(--l-muted); padding: 4px 0 18px; transition: color .3s; animation: lisa-rise .3s var(--l-ease) both; }
#lisa .lisa-step:last-child { padding-bottom: 4px; }
#lisa .lisa-step i { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--l-line); background: #fff; transition: background .3s, border-color .3s; }
#lisa .lisa-step i svg { width: 11px; height: 11px; stroke: #fff; fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12; stroke-dashoffset: 12; transition: stroke-dashoffset .35s .15s var(--l-ease); }
#lisa .lisa-step.is-now { color: var(--l-cobalt); }
#lisa .lisa-step.is-now i { border: 2.5px solid var(--l-mist); border-top-color: var(--l-cobalt); animation: lisa-spin .8s linear infinite; }
#lisa .lisa-step.is-done { color: var(--l-ink); }
#lisa .lisa-step.is-done i { background: var(--l-ok); border-color: var(--l-ok); animation: lisa-pop .35s cubic-bezier(.34,1.56,.64,1); }
#lisa .lisa-step.is-done i svg { stroke-dashoffset: 0; }
#lisa .lisa-rail { position: absolute; left: 8px; top: 25px; bottom: -3px; width: 2px; border-radius: 2px; overflow: hidden;
  background: repeating-linear-gradient(to bottom, var(--l-line) 0 4px, transparent 4px 8px); }
#lisa .lisa-step:last-child .lisa-rail { display: none; }
#lisa .lisa-rail.is-flow { background: repeating-linear-gradient(to bottom, var(--l-cobalt) 0 4px, transparent 4px 8px); animation: lisa-flow .6s linear infinite; }
#lisa .lisa-rail b { position: absolute; inset: 0; background: var(--l-ok); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--l-ease); }
#lisa .lisa-rail.is-filled b { transform: scaleY(1); }
#lisa .lisa-work__note { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--l-line); font-size: .74rem; color: var(--l-slate); line-height: 1.4; }

/* ---------- Cards ---------- */
#lisa .lisa-card { width: 86%; background: #fff; border: 1px solid var(--l-line); border-radius: 18px; padding: 14px; box-shadow: var(--l-shadow); }
#lisa .lisa-card h4 { margin: 0 0 4px; font-size: .92rem; font-weight: 800; letter-spacing: -.01em; }
#lisa .lisa-card p { margin: 0 0 12px; font-size: .82rem; color: var(--l-slate); line-height: 1.45; }
#lisa .lisa-btn { display: flex; align-items: center; justify-content: center; gap: .5em; font-weight: 700; font-size: .88rem; border-radius: 999px; padding: 11px 16px; border: 1.5px solid transparent; text-decoration: none; transition: background .2s, border-color .2s; }
#lisa .lisa-btn--primary { background: var(--l-cobalt); color: #fff; box-shadow: 0 10px 24px rgba(23,59,255,.3); }
#lisa .lisa-btn--primary:hover { background: #0F2FD9; }
#lisa .lisa-btn--ghost { background: #fff; color: var(--l-cobalt); border-color: var(--l-line); }
#lisa .lisa-btn--ghost:hover { border-color: var(--l-cobalt); }
#lisa .lisa-btn:disabled { opacity: .6; cursor: default; }
#lisa .lisa-btnrow { display: flex; gap: 8px; }
#lisa .lisa-btnrow .lisa-btn--ghost { flex: 1; }
#lisa .lisa-btnrow .lisa-btn--primary { flex: 1.4; }

#lisa .lisa-slots { display: flex; flex-direction: column; gap: 8px; padding-left: 34px; animation: lisa-in .28s var(--l-soft) both; transform-origin: 0 100%; }
#lisa .lisa-slot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: .86rem; color: var(--l-ink); background: #fff; border: 1.5px solid var(--l-line); border-radius: 14px; padding: 11px 14px; text-align: left; transition: border-color .2s, background .2s, box-shadow .2s; }
#lisa .lisa-slot span { font-family: var(--l-mono); font-size: .76rem; color: var(--l-cobalt); white-space: nowrap; }
#lisa .lisa-slot:hover:not(:disabled), #lisa .lisa-slot.is-picked { border-color: var(--l-cobalt); background: var(--l-mist); box-shadow: 0 0 0 3px rgba(169,231,255,.6); }
#lisa .lisa-slot:disabled:not(.is-picked) { opacity: .5; cursor: default; }

#lisa .lisa-booked { border-color: rgba(25,179,107,.35); }
#lisa .lisa-booked__top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#lisa .lisa-booked__top h4 { margin: 0; }
#lisa .lisa-booked__icon { width: 30px; height: 30px; border-radius: 50%; background: var(--l-ok); display: grid; place-items: center; flex: none; }
#lisa .lisa-booked__icon svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
#lisa .lisa-kv { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; padding: 6px 0; border-top: 1px solid var(--l-mist); }
#lisa .lisa-kv b { font-weight: 700; text-align: right; } #lisa .lisa-kv span { color: var(--l-slate); }

#lisa .lisa-handoff { border-color: rgba(255,185,56,.55); }
#lisa .lisa-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--l-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: #8A5A00; background: #FFF4DC; border-radius: 999px; padding: 3px 9px; margin-bottom: 8px; }
#lisa .lisa-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--l-warm); }
#lisa .lisa-field { display: flex; gap: 6px; }
#lisa .lisa-field input { flex: 1; min-width: 0; font: inherit; font-size: .84rem; color: var(--l-ink); border: 1.5px solid var(--l-line); border-radius: 999px; padding: 10px 14px; background: #fff; outline: none; }
#lisa .lisa-field input:focus { border-color: var(--l-cobalt); box-shadow: 0 0 0 4px rgba(169,231,255,.55); }
#lisa .lisa-field .lisa-btn { padding: 10px 14px; }
#lisa .lisa-field__msg { margin: 8px 0 0 !important; font-size: .78rem !important; }
#lisa .lisa-field__msg.is-bad { color: #C2410C !important; }
#lisa .lisa-field__msg.is-good { color: var(--l-ok) !important; font-weight: 700; }

#lisa .lisa-oops { border-color: rgba(255,107,74,.35); }

/* ---------- Composer ---------- */
#lisa .lisa-foot { padding: 10px 14px 12px; border-top: 1px solid var(--l-mist); background: #fff; flex: none; }
#lisa .lisa-composer { display: flex; align-items: flex-end; gap: 8px; border: 1.5px solid var(--l-line); border-radius: 24px; padding: 6px 6px 6px 16px; background: #fff; transition: border-color .2s, box-shadow .2s; }
#lisa .lisa-composer:focus-within { border-color: var(--l-cobalt); box-shadow: 0 0 0 4px rgba(169,231,255,.55); }
#lisa .lisa-composer textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; font: inherit; font-size: .88rem; line-height: 1.45; color: var(--l-ink); background: transparent; padding: 9px 0; max-height: 110px; }
#lisa .lisa-composer textarea::placeholder { color: var(--l-muted); }
#lisa.is-offline .lisa-composer { background: #F7FAFF; }
#lisa .lisa-send { width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; flex: none; background: var(--l-cobalt); display: grid; place-items: center; box-shadow: 0 6px 14px rgba(23,59,255,.3); transition: background .2s, box-shadow .2s; }
#lisa .lisa-send:disabled { background: var(--l-line); box-shadow: none; cursor: default; }
#lisa .lisa-send svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#lisa .lisa-send:focus-visible { outline: 3px solid var(--l-ice); outline-offset: 2px; }
#lisa .lisa-legal { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font-size: .7rem; color: var(--l-slate); }
#lisa .lisa-legal img { width: 12px; height: auto; }
#lisa .lisa-legal b { color: var(--l-ink); font-weight: 700; }

/* ---------- Motion ---------- */
@keyframes lisa-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lisa-in { from { opacity: 0; transform: translateY(5px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes lisa-settle { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes lisa-open { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes lisa-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes lisa-spin { to { transform: rotate(360deg); } }
@keyframes lisa-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes lisa-flow { from { background-position: 0 0; } to { background-position: 0 8px; } }

@media (prefers-reduced-motion: reduce) {
  #lisa *, #lisa *::before, #lisa *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #lisa .lisa-step.is-now i { border-top-color: var(--l-cobalt); }
}

/* ---------- Phone: opens full screen ---------- */
@media (max-width: 560px) {
  #lisa { right: 16px; bottom: 16px; }
  #lisa .lisa-teaser { width: min(290px, calc(100vw - 32px)); }
  #lisa.is-open { inset: 0; right: 0; bottom: 0; }
  #lisa .lisa-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; box-shadow: none; animation-name: lisa-rise; }
  #lisa .lisa-head { padding-top: max(16px, env(safe-area-inset-top)); }
  #lisa .lisa-foot { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  #lisa .lisa-ibtn .lisa-chev { display: none; }
  #lisa .lisa-ibtn .lisa-x { display: block; }
  #lisa .lisa-composer textarea { font-size: 16px; } /* stops iOS zooming on focus */
}
