/* Starpoint One — "Ask Blue" assistant.
   Separate file so it can ship or roll back on its own.
   Navy #0D2542, gold #D09E0D / #E8C56B, ivory #F4F1EA. No star motifs. */

.sp-asst { font-family: var(--sans, Outfit, "Helvetica Neue", Arial, sans-serif); }
.sp-asst *, .sp-asst *::before, .sp-asst *::after { box-sizing: border-box; }
.sp-vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- Launcher ---------- */
.sp-asst-launcher {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 75;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.65rem 1.1rem 0.65rem 0.95rem;
  border: 2px solid #D09E0D;
  border-radius: 999px;
  background: #0D2542;
  color: #F4F1EA;
  font: 500 0.95rem/1 var(--sans, Outfit, Arial, sans-serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(13, 37, 66, 0.28);
}
.sp-asst-ico { color: #E8C56B; flex: 0 0 auto; }
.sp-asst-launcher:hover { background: #133054; border-color: #E8C56B; }
.sp-asst-launcher:focus-visible,
.sp-asst-close:focus-visible,
.sp-chip:focus-visible,
.sp-asst-send:focus-visible,
.sp-msg-link:focus-visible,
.sp-asst-log:focus-visible {
  outline: 3px solid #E8C56B;
  outline-offset: 2px;
}
.sp-asst-input:focus-visible { outline: 3px solid #D09E0D; outline-offset: 1px; }
.sp-asst.is-open .sp-asst-launcher { display: none; }

/* keep clear of the mobile sticky booking bar, the intro and the open menu */
@media (max-width: 768px) {
  body:has(.sticky-cta.is-visible) .sp-asst-launcher {
    bottom: calc(4.9rem + env(safe-area-inset-bottom, 0px));
  }
}
body.has-intro:not(.is-emerged) .sp-asst,
html.nav-locked .sp-asst-launcher { display: none; }

/* ---------- Panel ---------- */
.sp-asst-panel {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 130;
  display: flex;
  flex-direction: column;
  width: 24.5rem;
  max-width: calc(100vw - 2rem);
  height: min(37.5rem, calc(100vh - 3rem));
  height: min(37.5rem, calc(100dvh - 3rem));
  background: #FFFFFF;
  color: #0D2542;
  border: 1px solid rgba(13, 37, 66, 0.18);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(13, 37, 66, 0.32);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
}
.sp-asst-panel[hidden] { display: none; }
.sp-asst-panel.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .sp-asst-panel { transition: opacity 0.18s ease, transform 0.18s ease; }
  .sp-asst-launcher { transition: background-color 0.2s ease, border-color 0.2s ease; }
}

.sp-asst-head {
  flex: 0 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  padding: 0.9rem 0.9rem 0.8rem 1.1rem;
  background: #0D2542;
  color: #F4F1EA;
  border-bottom: 2px solid #D09E0D;
}
.sp-asst-titles { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.sp-asst-title {
  margin: 0; font: 500 1.7rem/1.05 var(--serif, "Cormorant Garamond", Georgia, serif);
  color: #F4F1EA; letter-spacing: 0.01em;
}
.sp-asst-kicker {
  margin: 0;
  color: #E8C56B;
  font: 500 0.72rem/1.35 var(--sans, Outfit, Arial, sans-serif);
  letter-spacing: 0.06em;
}
.sp-asst-close {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin: -0.25rem -0.2rem 0 0;
  border: 0; border-radius: 10px; background: transparent; color: #F4F1EA; cursor: pointer;
}
.sp-asst-close:hover { background: rgba(244, 241, 234, 0.12); }
.sp-asst-close:focus-visible { outline-color: #E8C56B; }

.sp-asst-note {
  flex: 0 0 auto;
  margin: 0; padding: 0.5rem 1.1rem;
  background: #F1F4F8; color: #3D5166;
  font-size: 0.75rem; line-height: 1.4;
  border-bottom: 1px solid rgba(13, 37, 66, 0.1);
}

.sp-asst-log {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1rem 1.1rem 0.5rem;
  display: flex; flex-direction: column; gap: 0.7rem;
  background: #FFFFFF;
}
.sp-msg { max-width: 92%; font-size: 0.95rem; line-height: 1.5; }
.sp-msg p { margin: 0 0 0.5rem; white-space: pre-line; overflow-wrap: anywhere; }
.sp-msg p:last-child { margin-bottom: 0; }
.sp-msg-bot {
  align-self: flex-start;
  padding: 0.75rem 0.9rem;
  background: #F1F4F8; color: #0D2542;
  border-radius: 4px 14px 14px 14px;
}
.sp-msg-user {
  align-self: flex-end;
  padding: 0.6rem 0.9rem;
  background: #0D2542; color: #F4F1EA;
  border-radius: 14px 4px 14px 14px;
}
.sp-msg-links { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.sp-msg-link {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0.45rem 0.85rem;
  border: 1px solid #0D2542; border-radius: 8px;
  background: #FFFFFF; color: #0D2542;
  font-size: 0.85rem; font-weight: 500; text-decoration: none;
}
.sp-msg-link:hover { background: #0D2542; color: #F4F1EA; }
.sp-msg-link.is-primary { background: #D09E0D; border-color: #D09E0D; color: #0D2542; }
.sp-msg-link.is-primary:hover { background: #B88808; border-color: #B88808; color: #0D2542; }

.sp-typing { display: inline-flex; gap: 0.3rem; padding: 0.85rem 0.95rem; }
.sp-dot { width: 7px; height: 7px; border-radius: 50%; background: #3D5166; opacity: 0.45; }
@media (prefers-reduced-motion: no-preference) {
  .sp-dot { animation: sp-asst-pulse 1s ease-in-out infinite; }
  .sp-dot:nth-child(2) { animation-delay: 0.15s; }
  .sp-dot:nth-child(3) { animation-delay: 0.3s; }
  @keyframes sp-asst-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }
}

.sp-asst-chips {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.55rem 1.1rem 0.6rem;
  max-height: 11rem; overflow-y: auto;
  background: #FFFFFF;
  border-top: 1px solid rgba(13, 37, 66, 0.08);
}
.sp-chip {
  min-height: 40px; padding: 0.4rem 0.8rem;
  border: 1px solid rgba(13, 37, 66, 0.35); border-radius: 999px;
  background: #FFFFFF; color: #0D2542;
  font: 500 0.85rem/1.2 var(--sans, Outfit, Arial, sans-serif);
  cursor: pointer;
}
.sp-chip:hover { border-color: #D09E0D; background: rgba(208, 158, 13, 0.12); }
.sp-chip-more { border-style: dashed; }

.sp-asst-form {
  flex: 0 0 auto;
  display: flex; gap: 0.5rem;
  padding: 0.7rem 1.1rem 1rem;
  background: #FFFFFF;
  border-top: 1px solid rgba(13, 37, 66, 0.1);
}
.sp-asst-input {
  flex: 1 1 auto; min-width: 0; min-height: 46px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(13, 37, 66, 0.4); border-radius: 10px;
  background: #FFFFFF; color: #0D2542;
  font: 400 1rem/1.3 var(--sans, Outfit, Arial, sans-serif);
}
.sp-asst-input::placeholder { color: #5B6B7D; opacity: 1; }
.sp-asst-send {
  flex: 0 0 auto; min-height: 46px; padding: 0.5rem 1.1rem;
  border: 0; border-radius: 10px;
  background: #D09E0D; color: #0D2542;
  font: 600 0.88rem/1 var(--sans, Outfit, Arial, sans-serif);
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.sp-asst-send:hover { background: #B88808; }

/* ---------- Phones: full-screen sheet ---------- */
@media (max-width: 600px) {
  .sp-asst-panel {
    inset: 0; right: 0; bottom: 0; width: 100%; max-width: 100%;
    height: 100vh; height: 100dvh;
    border-radius: 0; border: 0;
  }
  .sp-asst-chips { max-height: 10.5rem; }
  .sp-asst-form { padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
}

@media print { .sp-asst { display: none !important; } }
@media (forced-colors: active) {
  .sp-asst-launcher, .sp-asst-panel, .sp-chip, .sp-msg-link, .sp-asst-send { border: 2px solid CanvasText; }
}