/* The assistant: a launcher and a panel that float (the one place a shadow is allowed). */
.chat-launch {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border: 0; border-radius: var(--r); background: var(--ink); color: var(--paper);
  font-weight: 500; font-size: 16px;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover);
}
.chat-launch:hover { background: #23262b; }
.chat-launch:active { transform: scale(0.96); }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.chat-panel {
  position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 41;
  width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100svh - 110px));
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  border-radius: 8px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34); overflow: hidden;
  opacity: 0; transform: scale(0.96) translateY(8px); transform-origin: bottom right;
  transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out);
}
.chat-panel.open { opacity: 1; transform: none; }
.cp-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; background: var(--deep); color: var(--frost); }
.cp-title { font-weight: 500; font-size: 17px; }
.cp-sub { font-size: 13px; color: var(--frost-soft); }
.cp-close { width: 36px; height: 36px; border: 0; border-radius: var(--r); background: var(--deep-2); color: var(--frost); font-size: 22px; line-height: 1; flex: none; }
.cp-close:hover { background: #1b4253; }
.cp-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 8px; font-size: 15px; line-height: 1.45; opacity: 0; transform: translateY(8px); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.msg.in { opacity: 1; transform: none; }
.msg p + p { margin-top: 8px; }
.msg a { color: inherit; }
.msg-bot { background: var(--white); align-self: flex-start; }
.msg-me { background: var(--ink); color: var(--paper); align-self: flex-end; }
.msg-note { font-size: 13px; color: var(--soft); }
.typing { display: flex; gap: 5px; opacity: 1; transform: none; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--soft); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.booked { margin-top: 10px; display: grid; gap: 2px; padding: 10px 12px; border-radius: 6px; background: var(--lime); color: var(--ink); }
.booked b { font-weight: 500; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.chip { border: 0; border-radius: var(--r); padding: 8px 11px; background: var(--paper-2); font-size: 14px; text-align: left; transition: background-color var(--t-hover); }
.chip:hover { background: var(--paper-3); }
.cp-form { display: flex; gap: 8px; padding: 10px 12px; background: var(--white); align-items: flex-end; }
.cp-form textarea { flex: 1; border: 0; resize: none; padding: 10px 4px; font-size: 16px; line-height: 1.4; outline: none; background: transparent; max-height: 140px; }
.cp-send { width: 44px; height: 44px; border: 0; border-radius: var(--r); background: var(--ink); color: var(--lime); font-size: 20px; flex: none; }
.cp-send:active { transform: scale(0.95); }
.cp-foot { font-size: 12px; color: var(--soft); padding: 0 14px 10px; background: var(--white); }
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r); font-size: 15px; opacity: 0; transform: translateY(12px); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25); }
.toast.in { opacity: 1; transform: none; }
.toast-bad { background: var(--bad); color: #fff; }
@media (max-width: 700px) {
  .chat-panel { right: 8px; left: 8px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); height: calc(100svh - 90px); }
  .chat-launch { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* on the dark home page the launcher takes the light ink so it separates without a shadow */
.home .chat-launch { background: var(--frost); color: var(--ink); }
.home .chat-launch:hover { background: #ffffff; }
