/* The assistant widget, on the public site and in the app (HIS's chat.css on Sndiq's tokens). Dark and light come from tokens.css. */
.sq-chat__launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--sq-line);
  border-radius: 50%;
  background: var(--sq-accent);
  color: var(--sq-on-accent);
  cursor: pointer;
  box-shadow: 0 6px 18px rgb(0 0 0 / 25%);
  transition: transform 0.15s ease;
}
.sq-chat__launch:hover { transform: translateY(-2px); }
.sq-chat__launch svg { width: 22px; height: 22px; }
.sq-chat {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 22rem;
  max-width: calc(100vw - 40px);
  height: 28rem;
  max-height: 70vh;
  overflow: hidden;
  background: var(--sq-surface);
  color: var(--sq-text);
  font-family: var(--sq-font);
  border: 1px solid var(--sq-line);
  border-radius: var(--sq-radius-card);
  box-shadow: var(--sq-shadow-lift);
}
.sq-chat[hidden] { display: none; }
.sq-chat__head {
  display: flex;
  align-items: center;
  gap: var(--sq-space-2);
  box-sizing: border-box;
  height: 44px;
  padding: 0 14px;
  background: var(--sq-accent);
  color: var(--sq-on-accent);
  font-weight: 600;
}
/* White on the plain accent is under 4.5:1 on warm paper; the deeper ink carries it (HIS does the same in light). */
[data-theme="light"] .sq-chat__launch,
[data-theme="light"] .sq-chat__head { background: var(--sq-accent-ink); }
.sq-chat__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--sq-radius-pill);
  background: rgb(255 255 255 / 20%);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  vertical-align: middle;
}
.sq-chat__icon,
.sq-chat__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  background: none;
  border: none;
  border-radius: 6px;
  color: inherit;
  opacity: 0.8;
  cursor: pointer;
}
.sq-chat__icon { margin-left: auto; }
.sq-chat__icon:hover,
.sq-chat__close:hover { opacity: 1; background: rgb(255 255 255 / 15%); }
.sq-chat__icon svg { width: 16px; height: 16px; }
/* Pushed right on its own, so a header with nothing else still puts it where every close button lives. */
.sq-chat__close { margin-left: auto; font-size: 1.25rem; line-height: 1; }
.sq-chat__icon ~ .sq-chat__close { margin-left: 0; }
.sq-chat__speaker.is-on { background: rgb(255 255 255 / 22%); opacity: 1; }
.sq-chat__speaker-on,
.sq-chat__speaker-off { display: inline-flex; }
.sq-chat__speaker:not(.is-on) .sq-chat__speaker-on,
.sq-chat__speaker.is-on .sq-chat__speaker-off { display: none; }
.sq-chat__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sq-space-2);
  padding: 14px;
  overflow-y: auto;
}
.sq-chat__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* safe: when the greeting outgrows the panel, plain center pushes it above the scrollable top. */
  justify-content: center;
  justify-content: safe center;
  gap: var(--sq-space-2);
  padding: 14px 20px 8px;
  text-align: center;
}
.sq-chat__empty svg { width: 32px; height: 32px; color: var(--sq-accent-ink); }
.sq-chat__emptytitle { margin: 0; font-size: 1rem; font-weight: 600; }
.sq-chat__msg {
  max-width: 85%;
  margin: 0;
  padding: 8px 11px;
  border-radius: var(--sq-radius-control);
  font-size: 0.9rem;
  line-height: 1.45;
  /* The model answers in plain text, so newlines are its only formatting. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sq-chat__msg--you {
  align-self: flex-end;
  background: var(--sq-accent);
  color: var(--sq-on-accent);
  border-bottom-right-radius: 3px;
}
.sq-chat__msg--bot {
  align-self: flex-start;
  background: var(--sq-surface-2);
  border-bottom-left-radius: 3px;
}
.sq-chat__msg a { color: inherit; text-decoration: underline; word-break: break-all; }
.sq-chat__typing { display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; }
.sq-chat__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: sq-chat-typing 1.1s ease-in-out infinite;
}
.sq-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.sq-chat__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes sq-chat-typing {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .sq-chat__typing span { animation: none; }
  .sq-chat__launch { transition: none; }
}
.sq-chat__starters {
  display: flex;
  gap: 6px;
  padding: 6px 12px 8px;
  overflow-x: auto;
  /* Scrolled with a swipe or trackpad; a bar is noise on a row of three. */
  scrollbar-width: none;
}
.sq-chat__starters::-webkit-scrollbar { display: none; }
.sq-chat__chip {
  flex: none;
  padding: 5px 9px;
  border: 1px solid var(--sq-line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--sq-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.sq-chat__chip:hover { border-color: var(--sq-accent-ink); color: var(--sq-accent-ink); }
.sq-chat__form {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border-top: 1px solid var(--sq-line);
}
.sq-chat__form input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 36px;
  margin-right: 2px;
  padding: 0 12px;
  border: 1px solid var(--sq-line-strong);
  border-radius: var(--sq-radius-control);
  background: var(--sq-sunken);
  color: var(--sq-text);
  font: inherit;
  font-size: 0.875rem;
}
.sq-chat__form input[type="text"]::placeholder { color: var(--sq-subtle); opacity: 1; }
.sq-chat__form input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--sq-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sq-accent) 25%, transparent);
}
.sq-chat__send,
.sq-chat__mic,
.sq-chat__miccancel {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--sq-radius-control);
  cursor: pointer;
}
.sq-chat__send { width: 40px; background: var(--sq-accent); color: var(--sq-on-accent); }
.sq-chat__send:disabled { opacity: 0.6; cursor: default; }
.sq-chat__mic,
.sq-chat__miccancel { width: 32px; background: none; color: var(--sq-muted); }
.sq-chat__mic:hover,
.sq-chat__miccancel:hover { background: var(--sq-surface-2); color: var(--sq-text); }
.sq-chat__send svg,
.sq-chat__miccancel svg { width: 16px; height: 16px; }
.sq-chat__mic svg { width: 18px; height: 18px; }
.sq-chat__send:focus-visible,
.sq-chat__mic:focus-visible,
.sq-chat__miccancel:focus-visible,
.sq-chat__chip:focus-visible,
.sq-chat__launch:focus-visible {
  outline: 2px solid var(--sq-accent-ink);
  outline-offset: 2px;
}
.sq-chat__mic-idle,
.sq-chat__mic-done { display: inline-flex; }
.sq-chat__mic-done,
.sq-chat__mic.is-listening .sq-chat__mic-idle { display: none; }
.sq-chat__mic.is-listening .sq-chat__mic-done { display: inline-flex; }
.sq-chat__mic.is-listening {
  color: var(--sq-danger);
  background: color-mix(in srgb, var(--sq-danger) 14%, transparent);
}
.sq-chat__mic[hidden],
.sq-chat__miccancel[hidden],
.sq-chat__send[hidden],
.sq-chat__speaker[hidden] { display: none; }
.sq-chat__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 480px) {
  .sq-chat__launch { right: 16px; bottom: 16px; }
  .sq-chat {
    right: 16px;
    left: 16px;
    bottom: 80px;
    width: auto;
    max-width: none;
    height: min(28rem, calc(100dvh - 112px));
    max-height: none;
  }
}
/* The bot check on the public site's first message: invisible until Cloudflare needs a click, so it takes no room otherwise. */
.sq-chat__form { flex-wrap: wrap; }
.sq-chat__check { flex: 1 0 100%; }
.sq-chat__check:empty { display: none; }
.sq-chat .sq-turnstile { display: flex; justify-content: center; }
.sq-chat .sq-turnstile:empty { display: none; }
/* Leave your email on the public site, Talk to a person in the dashboard: offered once the assistant has answered, so
   someone who wants a person has a way to ask. */
.sq-chat__lead {
  max-height: 60%;
  padding: 8px 12px;
  overflow-y: auto;
  border-top: 1px solid var(--sq-line);
}
.sq-chat__lead[hidden],
.sq-chat__leadform[hidden] { display: none; }
.sq-chat__leadopen {
  padding: 0;
  border: none;
  background: none;
  color: var(--sq-accent-ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
.sq-chat__leadform {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.sq-chat__leadform input[type="email"],
.sq-chat__leadform input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--sq-line-strong);
  border-radius: var(--sq-radius-control);
  background: var(--sq-sunken);
  color: var(--sq-text);
  font: inherit;
  font-size: 0.875rem;
}
.sq-chat__leadform input:focus-visible {
  outline: none;
  border-color: var(--sq-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sq-accent) 25%, transparent);
}
/* A honeypot a person never sees; off-screen rather than display none, which some bots skip. */
.sq-chat__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sq-chat__leadsend {
  align-self: flex-start;
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: var(--sq-radius-control);
  background: var(--sq-accent);
  color: var(--sq-on-accent);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.sq-chat__leadsend:disabled,
.sq-chat__leadopen:disabled { opacity: 0.6; cursor: default; }
.sq-chat__leadsend:focus-visible,
.sq-chat__leadopen:focus-visible {
  outline: 2px solid var(--sq-accent-ink);
  outline-offset: 2px;
}
.sq-chat__leadnote { margin: 0; color: var(--sq-muted); font-size: 0.8125rem; line-height: 1.4; }
.sq-chat__leadnote:empty { display: none; }
