/* Fonts: Archivo (titles), Saira (messages), Source Code Pro (typing box) */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@125,900&family=Saira:wdth,wght@100,400..700&family=Source+Code+Pro:wght@400;500&display=swap");

/* =========================================
   NOVABOT CHAT WIDGET
   Loaded on the live site from the Worker (see the
   Squarespace snippet in README-SQUARESPACE.md).
   Everything is tied to the nv- IDs, so it
   won't clash with the site's own styles.
   ========================================= */

/* Keep Squarespace's own styles from leaking into the widget */
#nv-chat-toggle,
#nv-chat-teaser,
#nv-chat-teaser *,
#nv-chat-panel,
#nv-chat-panel * {
  box-sizing: border-box;
}
#nv-chat-panel {
  letter-spacing: normal;
  line-height: 1.4;
}

/* ----- The bubble button (a ring, like the logo) ----- */
#nv-chat-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(229, 194, 224, 0.7);
  background: linear-gradient(120deg, #9c1757 0%, #5e1b82 55%, #25194d 100%);
  color: rgb(229, 194, 224);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 6px rgba(158, 92, 200, 0.18),
    0 0 28px rgba(158, 92, 200, 0.45),
    0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, filter 0.15s ease;
}
#nv-chat-toggle:hover {
  transform: scale(1.16);
  filter: brightness(1.15);
}
#nv-chat-toggle svg {
  width: 26px;
  height: 26px;
}
/* A slow breathing glow, so the button feels alive */
#nv-chat-toggle {
  animation: nv-breathe 3.6s ease-in-out infinite;
}
@keyframes nv-breathe {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(158, 92, 200, 0.18),
      0 0 28px rgba(158, 92, 200, 0.45),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(158, 92, 200, 0.24),
      0 0 40px rgba(176, 29, 104, 0.6),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

/* Waveform bars inside the chat bubble icon, swaying gently */
#nv-chat-toggle .nv-wave rect {
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleY(0.35);
  animation: nv-sway 1.8s ease-in-out infinite;
}
#nv-chat-toggle .nv-wave rect:nth-child(2) { animation-delay: -0.3s; }
#nv-chat-toggle .nv-wave rect:nth-child(3) { animation-delay: -0.6s; }
#nv-chat-toggle .nv-wave rect:nth-child(4) { animation-delay: -0.9s; }
#nv-chat-toggle .nv-wave rect:nth-child(5) { animation-delay: -1.2s; }
@keyframes nv-sway {
  0%, 100% { transform: scaleY(0.3); }
  50%      { transform: scaleY(0.7); }
}

/* Music, video or NovaBot's voice playing (sound we can't follow):
   a busier beat */
#nv-chat-toggle.nv-playing {
  animation-duration: 1s;
}
#nv-chat-toggle.nv-playing .nv-wave rect {
  animation: nv-beat 0.6s ease-in-out infinite alternate;
}
#nv-chat-toggle.nv-playing .nv-wave rect:nth-child(2) { animation-duration: 0.45s; animation-delay: -0.2s; }
#nv-chat-toggle.nv-playing .nv-wave rect:nth-child(3) { animation-duration: 0.7s; animation-delay: -0.5s; }
#nv-chat-toggle.nv-playing .nv-wave rect:nth-child(4) { animation-duration: 0.5s; animation-delay: -0.1s; }
#nv-chat-toggle.nv-playing .nv-wave rect:nth-child(5) { animation-duration: 0.65s; animation-delay: -0.35s; }
@keyframes nv-beat {
  from { transform: scaleY(0.25); }
  to   { transform: scaleY(1); }
}

/* Following the page's actual sound (set from novabot.js) */
#nv-chat-toggle.nv-live {
  animation: none;
  box-shadow:
    0 0 0 calc(6px + var(--nv-level, 0) * 8px) rgba(158, 92, 200, 0.22),
    0 0 calc(28px + var(--nv-level, 0) * 50px) rgba(176, 29, 104, 0.6),
    0 10px 30px rgba(0, 0, 0, 0.5);
}
#nv-chat-toggle.nv-live .nv-wave rect {
  animation: none;
  transform: scaleY(var(--nv-bar, 0.3));
}

/* While the speech bubble is up, or a reply arrives while the chat is
   tucked away, the button pulses a ring outwards */
#nv-chat-toggle.nv-attention,
#nv-chat-toggle.nv-unread {
  animation: nv-ping 2s ease-out 0.6s infinite;
}
@keyframes nv-ping {
  0% {
    box-shadow:
      0 0 0 6px rgba(158, 92, 200, 0.18),
      0 0 0 6px rgba(208, 42, 125, 0.6),
      0 0 28px rgba(158, 92, 200, 0.45),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
  70%, 100% {
    box-shadow:
      0 0 0 6px rgba(158, 92, 200, 0.18),
      0 0 0 22px rgba(208, 42, 125, 0),
      0 0 28px rgba(158, 92, 200, 0.45),
      0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

/* ----- Speech bubble over the button ("I can help with...") ----- */
#nv-chat-teaser {
  position: fixed;
  right: 24px;
  bottom: 104px;
  z-index: 9999;
  width: max-content;
  max-width: min(280px, calc(100vw - 48px));
  transform-origin: calc(100% - 32px) 100%;
  animation:
    nv-teaser-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    nv-float 4s ease-in-out 0.5s infinite;
}
#nv-chat-teaser[hidden] {
  display: none;
}
@keyframes nv-teaser-in {
  from { opacity: 0; transform: translateY(16px) scale(0.6); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes nv-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
.nv-teaser-open {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 40px 14px 18px;
  border: 1px solid rgba(229, 194, 224, 0.35);
  border-radius: 22px 22px 6px 22px;
  background:
    radial-gradient(ellipse at 100% 100%, rgba(74, 26, 120, 0.55) 0%, transparent 70%),
    #150d1f;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 26px rgba(158, 92, 200, 0.35);
  color: rgb(229, 194, 224);
  font-family: saira, "Futura", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: left;
  text-shadow: 0 0 6px rgb(155, 20, 222);
  cursor: pointer;
}
/* The little tail pointing down at the button */
.nv-teaser-open::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: #1d1230;
  border-right: 1px solid rgba(229, 194, 224, 0.35);
  border-bottom: 1px solid rgba(229, 194, 224, 0.35);
  transform: rotate(45deg);
}
.nv-teaser-open:hover {
  border-color: rgba(255, 95, 168, 0.7);
}
.nv-teaser-name {
  display: block;
  margin-bottom: 2px;
  font-family: "Archivo", "Futura", Arial, sans-serif;
  font-stretch: 125%;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff5fa8;
  text-shadow: none;
}
.nv-teaser-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(229, 194, 224, 0.7);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.nv-teaser-close:hover {
  color: #fff;
}

/* ----- The chat window ----- */
#nv-chat-panel {
  display: flex;
  position: fixed;
  right: 24px;
  bottom: 104px;
  z-index: 9999;
  width: 440px;
  height: 680px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 130px);
  max-height: calc(100dvh - 130px);
  flex-direction: column;
  text-align: center;
  overflow: hidden;
  border-radius: 56px 56px 74px 56px;
  background:
    radial-gradient(ellipse at 100% 100%, rgba(74, 26, 120, 0.55) 0%, transparent 60%),
    #150d1f;

  box-shadow: 0 20px 60px rgba(113, 4, 57, 0.6);
  filter: drop-shadow(0px 0px 115px rgba(158, 92, 200, 0.5));
  font-family: "Source Code Pro", "Futura", Arial, sans-serif;
  animation:
    nv-rise 0.2s ease-out,
    nv-glow 18s ease-in-out 0.2s infinite;
  color: #fff;
}
#nv-chat-panel.nv-closed,
#nv-chat-panel.nv-waiting {
  display: none;
}
/* Slightly see-through so the page shows behind it, until the mouse is
   over it or someone is typing in it */
#nv-chat-panel {
  opacity: 0.85;
}
#nv-chat-panel:hover,
#nv-chat-panel:focus-within {
  opacity: 1;
}
/* Tucked into the chat button, out of the way of the page.
   It shrinks towards the button's centre (32px in from the right,
   48px below the window). */
#nv-chat-panel {
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.3s ease,
    visibility 0s;
}
#nv-chat-panel.nv-tucked {
  transform: translate(calc(50% - 32px), calc(50% + 48px)) scale(0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.6, 1),
    opacity 0.25s ease 0.1s,
    visibility 0s 0.35s;
}
@keyframes nv-rise {
  from { opacity: 0; transform: rotateZ(180deg); translateY(200px); }
  to   { transform: translateY(0); }
}
/* Slow, uneven breathing glow that drifts between
   the logo purple and pink */
@keyframes nv-glow {
  0%, 100% { filter: drop-shadow(0 0 115px rgba(158, 92, 200, 0.5)); }
  18%      { filter: drop-shadow(-8px 4px 135px rgba(176, 29, 104, 0.5)); }
  37%      { filter: drop-shadow(6px -7px 90px rgba(122, 31, 134, 0.5)); }
  55%      { filter: drop-shadow(0 8px 150px rgba(208, 42, 125, 0.5)); }
  76%      { filter: drop-shadow(7px 0 100px rgba(90, 28, 134, 0.5)); }
}

/* ----- Header with jagged peaks, like the homepage ----- */
.nv-header {
  position: relative;
  padding: 22px 32px 40px;
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #9c1757 0%, #5e1b82 55%, #25194d 100%);
  clip-path: polygon(
    0 0, 100% 0, 100% 72%,
    93% 100%, 85% 80%, 76% 96%, 66% 70%, 55% 100%,
    45% 78%, 34% 94%, 24% 68%, 13% 98%, 5% 80%, 0 92%
  );
}
.nv-title {
  margin: 0;
  font-family: "Archivo", "Arial Black", sans-serif;
  font-stretch: 125%;
  font-weight: 900;
  font-size: clamp(18px, 5vw, 24px);
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
}
.nv-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: saira;
  color: rgba(255, 255, 255, 0.8);
}
#nv-chat-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  padding: 16px 4px;
  transform: translateX(30px);
}

/* ----- Message area ----- */
#nv-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  text-align: center;
  
  gap: 10px;
}

/* ----- Scrollbar (message area) ----- */
#nv-chat-messages::-webkit-scrollbar {
  width: 8px;
}
#nv-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  margin: 12px 0;
}
#nv-chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b01d68, #5a1c86);
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(176, 29, 104, 0.6);
}
#nv-chat-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d02a7d, #7a1f86);
}
/* Firefox (no gradient support, so flat brand colours).
   Kept out of Chrome, where scrollbar-color would
   override the gradient styles above. */
@supports not selector(::-webkit-scrollbar) {
  #nv-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #b01d68 rgba(255, 255, 255, 0.04);
  }
}

/* ----- Messages ----- */
.nv-msg {
  max-width: 95%;
  padding: 11px 14px;
  font-size: clamp(16px, 4.5vw, 23px);
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-line; /* keeps paragraph breaks, tidies spaces */
  overflow-wrap: break-word; /* only splits a word if it can't fit at all */
  hyphens: none;
  text-wrap: pretty; /* avoids a lonely last word on its own line */
  font-family: saira;
  text-align: center;
  border-radius: 24px 16px 24px 16px;
  
  color: rgb(229, 194, 224);
  text-shadow: 0px 0px 6px rgb(155, 20, 222);
 
  
  
}
.nv-msg a {
  color: #ff5fa8;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere; /* long links wrap instead of overflowing */
}
.nv-msg a:hover {
  color: #fff;
}
.nv-bot {
  align-self: center;

  
  
}
.nv-user {
  align-self: center;
  color: rgb(203, 61, 179);
}
.nv-typing {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  animation: nv-pulse 1.2s ease-in-out infinite;
}
@keyframes nv-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ----- Typing row ----- */
.nv-input-row {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
#nv-chat-input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 14px;
  color: #fff;
  background: transparent;
}
#nv-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
#nv-chat-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.04);
}
#nv-chat-send {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 20px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
#nv-chat-send:hover {
  color: #ff5fa8;
}
#nv-chat-send:disabled {
  color: rgba(255, 255, 255, 0.3);
  cursor: wait;
}

/* ----- Voice buttons (speaker + microphone) ----- */
.nv-icon-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  border: 0;
  background: transparent;
  color: rgb(229, 194, 224);
  cursor: pointer;
  transition: color 0.15s ease, filter 0.15s ease;
}
.nv-icon-btn[hidden] {
  display: none;
}
.nv-icon-btn svg {
  width: 20px;
  height: 20px;
}
.nv-icon-btn:hover {
  color: #ff5fa8;
}
.nv-icon-btn:disabled {
  opacity: 0.4;
  cursor: wait;
}
/* ----- Voice replies switch (above the typing row) ----- */
#nv-voice-toggle {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 10px;
  padding: 7px 16px;
  border: 1px solid rgba(229, 194, 224, 0.35);
  border-radius: 999px;
  background: rgba(122, 31, 134, 0.18);
  color: rgb(229, 194, 224);
  font-family: saira, "Jost", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
#nv-voice-toggle[hidden] {
  display: none;
}
#nv-voice-toggle svg {
  flex: none;
  width: 16px;
  height: 16px;
}
#nv-voice-toggle:hover {
  color: #ff5fa8;
  border-color: rgba(255, 95, 168, 0.6);
}
/* On: filled pink, like the other active buttons */
#nv-voice-toggle[aria-pressed="true"] {
  background: linear-gradient(120deg, #b01d68, #7a1f86);
  border-color: transparent;
  color: #fff;
}
/* Show the matching icon and label for on / off */
#nv-voice-toggle[aria-pressed="true"] .nv-when-off,
#nv-voice-toggle[aria-pressed="false"] .nv-when-on {
  display: none;
}
/* A soft glow until the visitor has tried it once, so they notice it */
#nv-voice-toggle.nv-nudge {
  animation: nv-nudge 2.4s ease-in-out infinite;
}
@keyframes nv-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(208, 42, 125, 0); }
  50%      { box-shadow: 0 0 14px 2px rgba(208, 42, 125, 0.55); }
}
/* Mic glows and pulses while listening */
#nv-mic.nv-listening {
  color: #ff5fa8;
  filter: drop-shadow(0 0 6px rgb(208, 42, 125));
  animation: nv-pulse 1.2s ease-in-out infinite;
}

/* ----- "Chats are saved" note under the message box ----- */
.nv-privacy {
  margin: 0;
  padding: 6px 16px 8px;
  font-family: "Source Code Pro", monospace;
  font-size: 11px;
  line-height: 1.3;
  color: rgba(229, 194, 224, 0.55);
}
.nv-privacy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nv-privacy a:hover {
  color: #ff5fa8;
}

/* ----- Booking button ----- */
.nv-book {
  display: block;
  text-align: center;
  background: linear-gradient(120deg, #b01d68 0%, #9a1c72 60%, #7a1f86 100%);
  color: #fff;
  padding: 15px;
  font-family: "Archivo", "Arial Black", sans-serif;
  font-stretch: 125%;
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter 0.15s ease;
  border-radius: 16px 24px 32px 4px;
}
.nv-book:hover {
  filter: brightness(1.18);
}

/* ----- Keyboard focus ----- */
#nv-chat-toggle:focus-visible,
#nv-chat-close:focus-visible,
#nv-chat-send:focus-visible,
.nv-icon-btn:focus-visible,
.nv-teaser-open:focus-visible,
.nv-privacy a:focus-visible,
.nv-teaser-close:focus-visible,
#nv-voice-toggle:focus-visible,
.nv-book:focus-visible {
  outline: 2px solid #ff5fa8;
  outline-offset: 3px;
}

/* ----- Phones: full screen chat ----- */
@media (max-width: 480px), (max-height: 560px) {
  #nv-chat-panel {
    opacity: 1; /* full screen, so nothing to see through to */
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .nv-header {
    padding: 16px 24px 32px;
  }
  #nv-chat-close {
    transform: translateX(16px);
  }
  #nv-chat-messages {
    padding: 14px;
  }
  /* 16px stops iPhones zooming in when the box is tapped */
  #nv-chat-input {
    font-size: 16px;
  }
  .nv-book {
    border-radius: 0;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
  }
}

/* ----- Less motion for people who ask for it ----- */
@media (prefers-reduced-motion: reduce) {
  #nv-chat-panel,
  #nv-chat-teaser,
  #nv-chat-toggle,
  #nv-chat-toggle .nv-wave rect,
  #nv-chat-toggle.nv-attention,
  #nv-chat-toggle.nv-unread,
  .nv-typing,
  #nv-mic.nv-listening,
  #nv-voice-toggle.nv-nudge {
    animation: none;
  }
  #nv-chat-toggle,
  #nv-chat-panel,
  #nv-chat-panel.nv-tucked,
  .nv-book {
    transition: none;
  }
}
