/* ===================================================================
 * Cliqo website assistant (js/assistant.js)
 *
 * Everything is scoped under .ca-root and sized in px: base.css sets
 * html to 62.5% and main.css styles every button, input, label, p, strong
 * and list globally, so each of those properties is reset here.
 *
 * White text sits on #2f7f84, a darker brand teal: on #5ea6aa it would be
 * 2.8:1, below the 4.5:1 that WCAG AA needs.
 * ------------------------------------------------------------------- */
.ca-root [hidden] { display: none !important; }

.ca-root,
.ca-root * { box-sizing: border-box; }

.ca-root button,
.ca-root input,
.ca-root textarea {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  height: auto;
  min-height: 0;
  line-height: 1.4;
  margin: 0;
  box-shadow: none;
  transition: none; /* main.css animates everything for .3s, which fades focus rings in */
}
.ca-root a { transition: none; }

.ca-root p,
.ca-root ul,
.ca-root ol,
.ca-root form,
.ca-root label { margin: 0; }

.ca-root strong,
.ca-root b { font-family: inherit; font-weight: 700; }

/* main.css removes the focus outline from buttons and inputs; keyboard users need it back. */
.ca-root button:focus-visible,
.ca-root input:focus-visible,
.ca-root textarea:focus-visible,
.ca-root a:focus-visible,
.ca-root .ca-msg[tabindex]:focus-visible { outline: 2px solid #1a1a2e; outline-offset: 2px; }

/* launcher
 * -------------------------------------- */
.ca-root .ca-launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2f7f84;
  color: #fff;
  box-shadow: 0 10px 26px rgba(26, 26, 46, .25);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.ca-root .ca-launch:hover,
.ca-root .ca-launch:focus-visible { background: #26696d; color: #fff; transform: translateY(-2px); }
.ca-root .ca-launch:focus-visible { outline: 3px solid #1a1a2e; outline-offset: 3px; }

/* The site's mobile menu drawer can't sit above the launcher, so hide the launcher while it's open. */
body:has(.header-nav.active) .ca-root .ca-launch { display: none; }

/* panel
 * -------------------------------------- */
.ca-root .ca-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 750;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(26, 26, 46, .25);
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a2e;
}

.ca-root .ca-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #2f7f84;
  color: #fff;
}
.ca-root .ca-head strong { font-size: 16px; font-weight: 800; }
.ca-root .ca-close {
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.ca-root .ca-close:hover,
.ca-root .ca-close:focus-visible { background: transparent; color: #fff; opacity: .8; }
.ca-root .ca-close:focus-visible { outline-color: #fff; opacity: 1; }

.ca-root .ca-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain; /* scrolling the chat doesn't scroll the page behind it */
  background: #f5f8f8;
}

/* messages
 * -------------------------------------- */
.ca-root .ca-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  overflow-wrap: anywhere;
}
.ca-root .ca-msg p + p,
.ca-root .ca-msg p + ul,
.ca-root .ca-msg p + ol,
.ca-root .ca-msg ul + p,
.ca-root .ca-msg ol + p { margin-top: 8px; }
.ca-root .ca-msg ul { list-style: disc; padding-left: 20px; }
.ca-root .ca-msg ol { list-style: decimal; padding-left: 20px; }
.ca-root .ca-msg li { display: list-item; margin: 0 0 4px; padding-left: 0; }
.ca-root .ca-msg a { color: #2f7f84; text-decoration: underline; }
.ca-root .ca-assistant { align-self: flex-start; background: #fff; border: 1px solid #e1eaea; }
.ca-root .ca-user { align-self: flex-end; background: #2f7f84; color: #fff; }
.ca-root .ca-error { border-color: #ecc8c8; }

.ca-root .ca-typing { display: flex; gap: 4px; padding: 4px 0; }
.ca-root .ca-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9bbcbe;
  animation: ca-blink 1.2s infinite ease-in-out;
}
.ca-root .ca-typing span:nth-child(2) { animation-delay: .2s; }
.ca-root .ca-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ca-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* input
 * -------------------------------------- */
.ca-root .ca-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e1eaea;
  background: #fff;
}
.ca-root .ca-input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px;
  border: 1px solid #cfdcdc;
  border-radius: 10px;
  background: #fff;
  color: #1a1a2e;
  font-size: 16px; /* 16px stops iOS zooming in on focus */
  resize: none;
  overflow-y: hidden; /* grow() in assistant.js turns scrolling on past 120px */
}
.ca-root .ca-input:focus { border-color: #2f7f84; color: #1a1a2e; }
.ca-root .ca-input::placeholder { color: #6b7280; }
.ca-root .ca-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #2f7f84;
  color: #fff;
  cursor: pointer;
}
.ca-root .ca-send:hover,
.ca-root .ca-send:focus-visible { background: #26696d; color: #fff; }
.ca-root .ca-send:disabled { background: #b9d3d4; cursor: default; }

.ca-root .ca-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
}
.ca-root .ca-team,
.ca-root .ca-team-inline,
.ca-root .ca-submit,
.ca-root .ca-cancel {
  align-self: flex-start;
  padding: 7px 14px;
  border: 1.5px solid #5ea6aa;
  border-radius: 999px;
  background: #fff;
  color: #2f7f84;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ca-root .ca-team:hover,
.ca-root .ca-team:focus-visible,
.ca-root .ca-team-inline:hover,
.ca-root .ca-team-inline:focus-visible,
.ca-root .ca-cancel:hover,
.ca-root .ca-cancel:focus-visible { background: #eef6f6; color: #26696d; }
.ca-root .ca-team-inline { margin-top: 8px; }
.ca-root .ca-submit { border-color: #2f7f84; background: #2f7f84; color: #fff; }
.ca-root .ca-submit:hover,
.ca-root .ca-submit:focus-visible { background: #26696d; color: #fff; }
.ca-root .ca-submit:disabled,
.ca-root .ca-cancel:disabled { opacity: .6; cursor: default; }
.ca-root .ca-note { font-size: 11.5px; line-height: 1.4; color: #6b7280; }
.ca-root .ca-note a { color: #6b7280; text-decoration: underline; }

/* hand-off form
 * -------------------------------------- */
.ca-root .ca-handoff { display: flex; flex-direction: column; gap: 8px; width: 88%; }
.ca-root .ca-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: #1a1a2e;
}
.ca-root .ca-field input,
.ca-root .ca-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cfdcdc;
  border-radius: 8px;
  background: #fff;
  color: #1a1a2e;
  font-size: 16px;
  font-weight: 400;
}
.ca-root .ca-field textarea { min-height: 72px; resize: vertical; }
.ca-root .ca-field input:focus,
.ca-root .ca-field textarea:focus { border-color: #2f7f84; color: #1a1a2e; }
.ca-root .ca-actions { display: flex; gap: 8px; }
.ca-root .ca-status { font-size: 13px; color: #6b7280; }
.ca-root .ca-status:empty { display: none; }
.ca-root .ca-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ca-root .ca-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* small screens: full-screen panel (narrow, or a phone on its side);
 * sit clear of the pricing page's total bar. js/assistant.js uses the same query.
 * -------------------------------------- */
@media only screen and (max-width: 900px) {
  body.ca-has-dock .ca-root .ca-launch { bottom: 108px; }
}

@media only screen and (max-width: 600px), only screen and (max-height: 500px) {
  .ca-root .ca-panel {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .ca-root .ca-launch { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ca-root .ca-launch { transition: none; }
  .ca-root .ca-typing span { animation: none; opacity: .7; }
}
