/* Ask Lightstruck: chat widget styles. All selectors are scoped under .lsa-root. */

.lsa-root {
  --lsa-navy: #242B3D;
  --lsa-header: #39445C;
  --lsa-purple-mid: #303A51;
  --lsa-primary: #CF2A1D;
  --lsa-teal: #ED3729;
  --lsa-lavender: #CDD3E0;
  --lsa-tint: #F6F3EF;
  --lsa-text: #4C4C4C;
  --lsa-ink: #232323;
  --lsa-muted: #6E727C;
  --lsa-line: #E4E7EC;
  --lsa-grad: linear-gradient(90deg, #D93022 0%, #CF2A1D 55%, #B8261A 100%);
  --lsa-font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lsa-ease: cubic-bezier(.2, .8, .2, 1);
  --lsa-ring: 0 0 0 3px rgba(237, 55, 41, .55);
}

/* ---------- Reset (defend against theme and Elementor globals) ---------- */
.lsa-root,
.lsa-root *,
.lsa-root *::before,
.lsa-root *::after {
  box-sizing: border-box;
}
.lsa-root * {
  font-family: var(--lsa-font);
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  word-spacing: normal;
}
.lsa-root p,
.lsa-root h2,
.lsa-root h3,
.lsa-root ul,
.lsa-root ol,
.lsa-root li,
.lsa-root form,
.lsa-root label {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  font-weight: inherit;
}
.lsa-root button,
.lsa-root input,
.lsa-root textarea {
  margin: 0;
  padding: 0;
  border-radius: 0;
  max-width: none;
  font: inherit;
  font-family: var(--lsa-font);
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: auto;
  line-height: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.lsa-root button {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
}
.lsa-root button:hover,
.lsa-root button:focus {
  background-color: transparent;
  color: inherit;
}
.lsa-root a {
  text-decoration: none;
  box-shadow: none;
  border: 0;
}
.lsa-root img {
  max-width: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.lsa-root [hidden] { display: none !important; }

.lsa-root .lsa-sr {
  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;
}

.lsa-root .lsa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 0;
}
.lsa-root .lsa-icon svg { display: block; }

/* Teal focus ring on every control */
.lsa-root a:focus-visible,
.lsa-root button:focus-visible,
.lsa-root input:focus-visible,
.lsa-root textarea:focus-visible,
.lsa-root .lsa-log:focus-visible {
  outline: 2px solid var(--lsa-teal);
  outline-offset: 2px;
}

/* ---------- Launcher ---------- */
.lsa-root .lsa-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--lsa-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 28px -8px rgba(36, 43, 61, .55), 0 2px 6px rgba(36, 43, 61, .18), inset 0 1px 0 rgba(255, 255, 255, .22);
  opacity: 0;
  transform: translateY(16px) scale(.96);
  transition: background-position .5s var(--lsa-ease), box-shadow .25s ease, transform .25s var(--lsa-ease), padding .25s var(--lsa-ease), width .25s var(--lsa-ease);
}
.lsa-root.lsa-ready .lsa-launcher {
  opacity: 1;
  transform: none;
  animation: lsa-rise .6s var(--lsa-ease) .5s backwards;
}
.lsa-root .lsa-launcher:hover {
  background: var(--lsa-grad);
  background-size: 100% 100%;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -8px rgba(36, 43, 61, .6), 0 3px 8px rgba(36, 43, 61, .2), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.lsa-root .lsa-launcher:focus { background: var(--lsa-grad); background-size: 100% 100%; color: #fff; }
.lsa-root .lsa-launcher:focus-visible { outline: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--lsa-teal), 0 10px 28px -8px rgba(36, 43, 61, .55); }
.lsa-root .lsa-launcher:active { transform: scale(.97); }
.lsa-root .lsa-launcher-spark svg { width: 20px; height: 20px; }
.lsa-root .lsa-launcher-spark { animation: lsa-twinkle 4.5s ease-in-out 1.4s infinite; }
.lsa-root .lsa-launcher-close { display: none; }
.lsa-root .lsa-launcher-label { font-size: 15px; font-weight: 600; color: #fff; line-height: 1; }

/* Launcher when the panel is open: compact round close control */
.lsa-root.lsa-is-open .lsa-launcher {
  width: 52px;
  padding: 0;
  justify-content: center;
  background: var(--lsa-navy);
}
.lsa-root.lsa-is-open .lsa-launcher:hover,
.lsa-root.lsa-is-open .lsa-launcher:focus { background: var(--lsa-header); }
.lsa-root.lsa-is-open .lsa-launcher-label,
.lsa-root.lsa-is-open .lsa-launcher-spark { display: none; }
.lsa-root.lsa-is-open .lsa-launcher-close { display: inline-flex; }

@keyframes lsa-rise {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes lsa-twinkle {
  0%, 86%, 100% { transform: rotate(0) scale(1); }
  92% { transform: rotate(18deg) scale(1.15); }
}

/* ---------- Panel ---------- */
.lsa-root .lsa-panel {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 99991;
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  color: var(--lsa-text);
  font-family: var(--lsa-font);
  font-size: 14.5px;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 30px 70px -20px rgba(36, 43, 61, .45), 0 10px 24px -12px rgba(36, 43, 61, .25), 0 0 0 1px rgba(36, 43, 61, .06);
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .28s var(--lsa-ease), visibility 0s linear .28s;
}
.lsa-root.lsa-is-open .lsa-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .22s ease, transform .28s var(--lsa-ease), visibility 0s;
}

/* Header */
.lsa-root .lsa-header {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 16px 20px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(237, 55, 41, .24) 0%, rgba(237, 55, 41, 0) 46%),
    radial-gradient(90% 140% at 0% 100%, rgba(207, 42, 29, .6) 0%, rgba(207, 42, 29, 0) 62%),
    var(--lsa-header);
  color: #fff;
}
.lsa-root .lsa-header--nologo { padding-top: 16px; padding-bottom: 16px; }
.lsa-root .lsa-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--lsa-grad);
  opacity: .9;
}
.lsa-root .lsa-htop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.lsa-root .lsa-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}
.lsa-root .lsa-logo {
  display: block;
  height: 22px;
  width: auto;
  max-width: 200px;
  flex: none;
}
.lsa-root .lsa-titles { min-width: 0; padding-right: 8px; }
.lsa-root .lsa-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #fff;
}
.lsa-root .lsa-title-spark { color: var(--lsa-teal); }
.lsa-root .lsa-title-spark svg { width: 17px; height: 17px; }
.lsa-root .lsa-subtitle {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--lsa-lavender);
}
.lsa-root .lsa-hactions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.lsa-root .lsa-hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border-radius: 10px;
  color: var(--lsa-lavender);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.lsa-root .lsa-hbtn:hover,
.lsa-root .lsa-hbtn:focus-visible {
  background-color: rgba(255, 255, 255, .1);
  color: #fff;
}
.lsa-root .lsa-newchat {
  height: 30px;
  padding: 0 11px 0 9px;
  margin-right: 4px;
  border: 1px solid rgba(205, 211, 224, .3);
  border-radius: 999px;
}
.lsa-root .lsa-newchat:hover { border-color: rgba(255, 255, 255, .5); }

/* Scroll area */
.lsa-root .lsa-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(140% 60% at 50% 0%, rgba(246, 243, 239, .9) 0%, rgba(255, 255, 255, 0) 70%),
    #fff;
  scrollbar-width: thin;
  scrollbar-color: #D3D7E0 transparent;
}
.lsa-root .lsa-scroll::-webkit-scrollbar { width: 8px; }
.lsa-root .lsa-scroll::-webkit-scrollbar-thumb { background: #D3D7E0; border-radius: 8px; border: 2px solid #fff; }
.lsa-root .lsa-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px 18px;
  outline: none;
}

/* Empty state */
.lsa-root .lsa-empty {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lsa-root .lsa-starters-label {
  margin: 6px 0 -4px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lsa-muted);
}
.lsa-root .lsa-starters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.lsa-root .lsa-starter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--lsa-line);
  border-radius: 12px;
  background: #fff;
  color: var(--lsa-navy);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, transform .15s var(--lsa-ease), box-shadow .15s ease;
}
.lsa-root .lsa-starter:hover,
.lsa-root .lsa-starter:focus-visible {
  border-color: var(--lsa-teal);
  background-color: #fff;
  color: var(--lsa-navy);
  box-shadow: 0 6px 16px -10px rgba(36, 43, 61, .45);
  transform: translateY(-1px);
}
.lsa-root .lsa-starter-arrow { color: var(--lsa-primary); opacity: .55; transition: opacity .15s ease, transform .15s var(--lsa-ease); }
.lsa-root .lsa-starter:hover .lsa-starter-arrow { opacity: 1; transform: translateX(2px); }

/* Messages */
.lsa-root .lsa-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  animation: lsa-in .28s var(--lsa-ease) both;
}
.lsa-root .lsa-msg--user { align-items: flex-end; }
.lsa-root .lsa-bubble {
  position: relative;
  max-width: 90%;
  padding: 11px 15px;
  border-radius: 16px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.lsa-root .lsa-msg--user .lsa-bubble {
  max-width: 84%;
  background: var(--lsa-navy);
  color: #fff;
  border-bottom-right-radius: 6px;
  white-space: pre-wrap;
  box-shadow: 0 6px 16px -10px rgba(36, 43, 61, .7);
}
.lsa-root .lsa-msg--assistant .lsa-bubble {
  background: var(--lsa-tint);
  color: var(--lsa-ink);
  border-bottom-left-radius: 6px;
}
.lsa-root .lsa-msg--error .lsa-bubble {
  background: #FFF6EC;
  color: #5B3A16;
  box-shadow: inset 3px 0 0 #E9A55A;
}
.lsa-root .lsa-msg--confirm .lsa-bubble {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(237, 55, 41, .16), rgba(207, 42, 29, .08));
  box-shadow: inset 0 0 0 1px rgba(237, 55, 41, .45);
}
.lsa-root .lsa-confirm-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--lsa-teal);
  color: #fff;
  margin-top: 1px;
}
.lsa-root .lsa-confirm-icon svg { width: 15px; height: 15px; }

@keyframes lsa-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Markdown inside assistant bubbles */
.lsa-root .lsa-bubble p + p,
.lsa-root .lsa-bubble p + .lsa-md-list,
.lsa-root .lsa-bubble .lsa-md-list + p,
.lsa-root .lsa-bubble .lsa-md-list + .lsa-md-list { margin-top: 9px; }
.lsa-root .lsa-bubble strong { font-weight: 650; color: var(--lsa-navy); }
.lsa-root .lsa-msg--user .lsa-bubble strong { color: #fff; }
.lsa-root .lsa-md-h { font-weight: 650; color: var(--lsa-navy); }
.lsa-root .lsa-md-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lsa-root .lsa-md-list li {
  position: relative;
  padding-left: 18px;
  margin: 0;
  list-style: none;
}
.lsa-root .lsa-md-list li + li { margin-top: 5px; }
.lsa-root .lsa-md-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lsa-teal);
}
.lsa-root .lsa-md-ol { counter-reset: lsa-ol; }
.lsa-root .lsa-md-ol li { counter-increment: lsa-ol; padding-left: 22px; }
.lsa-root .lsa-md-ol li::before {
  content: counter(lsa-ol) ".";
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  font-weight: 650;
  color: var(--lsa-primary);
}
.lsa-root .lsa-link {
  color: var(--lsa-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(207, 42, 29, .35);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.lsa-root .lsa-link:hover { color: var(--lsa-navy); text-decoration-color: var(--lsa-teal); }
.lsa-root .lsa-msg--error .lsa-link { color: #7A4310; }

/* Page cards */
.lsa-root .lsa-cards-label {
  margin: 12px 0 6px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lsa-muted);
}
.lsa-root .lsa-cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 90%;
}
.lsa-root .lsa-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--lsa-line);
  border-radius: 12px;
  background: #fff;
  color: var(--lsa-ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(36, 43, 61, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s var(--lsa-ease);
}
.lsa-root .lsa-card:hover,
.lsa-root .lsa-card:focus-visible {
  border-color: var(--lsa-teal);
  box-shadow: 0 8px 20px -12px rgba(36, 43, 61, .45);
  transform: translateY(-1px);
  color: var(--lsa-ink);
}
.lsa-root .lsa-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.lsa-root .lsa-card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--lsa-navy);
}
.lsa-root .lsa-card-why {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--lsa-muted);
}
.lsa-root .lsa-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lsa-tint);
  color: var(--lsa-primary);
  transition: background .15s ease, color .15s ease, transform .15s var(--lsa-ease);
}
.lsa-root .lsa-card:hover .lsa-card-arrow,
.lsa-root .lsa-card:focus-visible .lsa-card-arrow {
  background: var(--lsa-grad);
  color: #fff;
  transform: translateX(2px);
}

/* CTA row and buttons */
.lsa-root .lsa-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.lsa-root .lsa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-position .4s var(--lsa-ease), box-shadow .2s ease, border-color .15s ease, color .15s ease, transform .15s var(--lsa-ease);
}
.lsa-root .lsa-btn--primary,
.lsa-root .lsa-btn--primary:focus,
.lsa-root button.lsa-btn--primary:hover {
  background: var(--lsa-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(207, 42, 29, .8);
}
.lsa-root .lsa-btn--primary:hover,
.lsa-root button.lsa-btn--primary:hover {
  color: #fff;
  filter: saturate(1.12) brightness(1.03);
  box-shadow: 0 10px 22px -10px rgba(207, 42, 29, .9);
}
.lsa-root .lsa-btn--primary[disabled] { opacity: .7; cursor: progress; }
.lsa-root .lsa-btn--ghost {
  border: 1px solid #D3D7E0;
  background: #fff;
  color: var(--lsa-primary);
}
.lsa-root .lsa-btn--ghost:hover,
.lsa-root .lsa-btn--ghost:focus-visible {
  border-color: var(--lsa-primary);
  background: #fff;
  color: var(--lsa-primary);
}
.lsa-root .lsa-btn--text {
  height: 40px;
  padding: 0 12px;
  color: var(--lsa-muted);
  font-weight: 500;
}
.lsa-root .lsa-btn--text:hover { color: var(--lsa-navy); }

/* Suggestions */
.lsa-root .lsa-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
  animation: lsa-in .3s var(--lsa-ease) .08s both;
}
.lsa-root .lsa-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #D9DDE5;
  border-radius: 999px;
  background: #fff;
  color: var(--lsa-primary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.lsa-root .lsa-chip:hover,
.lsa-root .lsa-chip:focus-visible {
  border-color: var(--lsa-teal);
  background-color: #FDF1EF;
  color: var(--lsa-navy);
}

/* Typing indicator */
.lsa-root .lsa-typing .lsa-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
}
.lsa-root .lsa-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lsa-primary);
  opacity: .35;
  animation: lsa-bounce 1.2s ease-in-out infinite;
}
.lsa-root .lsa-dot:nth-child(3) { animation-delay: .15s; }
.lsa-root .lsa-dot:nth-child(4) { animation-delay: .3s; }
@keyframes lsa-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .35; }
  30% { transform: translateY(-4px); opacity: .9; }
}

/* ---------- Lead form ---------- */
.lsa-root .lsa-lead {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 16px;
  border: 1px solid var(--lsa-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px -20px rgba(36, 43, 61, .5);
  animation: lsa-in .3s var(--lsa-ease) both;
  position: relative;
  overflow: hidden;
}
.lsa-root .lsa-lead::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--lsa-grad);
}
.lsa-root .lsa-lead-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--lsa-navy);
}
.lsa-root .lsa-lead-intro {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--lsa-muted);
}
.lsa-root .lsa-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.lsa-root .lsa-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 100%;
  min-width: 0;
}
.lsa-root .lsa-field--half { flex: 1 1 calc(50% - 5px); }
.lsa-root .lsa-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--lsa-navy);
}
.lsa-root .lsa-req { color: var(--lsa-primary); }
.lsa-root .lsa-field-input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 8px 11px;
  border: 1px solid #D9DDE5;
  border-radius: 10px;
  background: #FCFCFD;
  color: var(--lsa-ink);
  font-size: 14px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.lsa-root textarea.lsa-field-input {
  height: auto;
  min-height: 70px;
  resize: vertical;
}
.lsa-root .lsa-field-input:hover { border-color: #BFC6D3; }
.lsa-root .lsa-field-input:focus,
.lsa-root .lsa-field-input:focus-visible {
  outline: 0;
  border-color: var(--lsa-teal);
  background: #fff;
  box-shadow: var(--lsa-ring);
}
.lsa-root .lsa-field-input[aria-invalid="true"] { border-color: #D2556B; }
.lsa-root .lsa-field-error {
  font-size: 12px;
  line-height: 1.3;
  color: #B4324A;
}
.lsa-root .lsa-field-error:empty { display: none; }
.lsa-root .lsa-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 4px 10px;
  align-items: start;
}
.lsa-root .lsa-check {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #AEB6C6;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.lsa-root .lsa-check::after {
  content: "";
  width: 9px;
  height: 5px;
  border: 2px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.lsa-root .lsa-check:checked { background: var(--lsa-primary); border-color: var(--lsa-primary); }
.lsa-root .lsa-check:checked::after { opacity: 1; }
.lsa-root .lsa-check[aria-invalid="true"] { border-color: #D2556B; }
.lsa-root .lsa-check:focus-visible { outline: 2px solid var(--lsa-teal); outline-offset: 2px; }
.lsa-root .lsa-consent-label {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--lsa-text);
  cursor: pointer;
}
.lsa-root .lsa-consent .lsa-field-error { grid-column: 2; }
.lsa-root .lsa-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.lsa-root .lsa-lead-status:empty { display: none; }
.lsa-root .lsa-lead-status--error {
  padding: 10px 12px;
  border-radius: 10px;
  background: #FDF0F2;
  color: #8A2236;
  font-size: 13px;
  line-height: 1.45;
}
.lsa-root .lsa-lead-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Footer / composer ---------- */
.lsa-root .lsa-footer {
  flex: none;
  padding: 12px 14px 10px;
  border-top: 1px solid var(--lsa-line);
  background: #fff;
}
.lsa-root .lsa-composer { position: relative; }
.lsa-root .lsa-inputwrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid #D9DDE5;
  border-radius: 16px;
  background: #FCFCFD;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.lsa-root .lsa-inputwrap:focus-within {
  border-color: var(--lsa-teal);
  background: #fff;
  box-shadow: var(--lsa-ring);
}
.lsa-root .lsa-input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 22px;
  max-height: 120px;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--lsa-ink);
  font-size: 14.5px;
  line-height: 22px;
  resize: none;
  overflow-y: hidden;
  box-sizing: content-box;
}
.lsa-root .lsa-input:focus,
.lsa-root .lsa-input:focus-visible { outline: 0; border: 0; box-shadow: none; background: transparent; }
.lsa-root .lsa-input::placeholder { color: #8E929C; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsa-root .lsa-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--lsa-grad);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(207, 42, 29, .9);
  transition: opacity .15s ease, transform .15s var(--lsa-ease), filter .15s ease;
}
.lsa-root .lsa-send:hover,
.lsa-root .lsa-send:focus { background: var(--lsa-grad); color: #fff; }
.lsa-root .lsa-send:hover:not([disabled]) { transform: translateY(-1px); filter: saturate(1.15); }
.lsa-root .lsa-send[disabled] {
  background: #E4E7EC;
  color: #9AA1AE;
  box-shadow: none;
  cursor: default;
}
.lsa-root .lsa-busy .lsa-send[disabled] { cursor: progress; }
.lsa-root .lsa-counter {
  display: none;
  position: absolute;
  right: 54px;
  top: -20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  color: var(--lsa-muted);
  font-variant-numeric: tabular-nums;
}
.lsa-root .lsa-counter--show { display: block; }
.lsa-root .lsa-counter--max { color: #B4324A; }
.lsa-root .lsa-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--lsa-muted);
  text-align: center;
}
.lsa-root .lsa-note .lsa-link { font-weight: 500; color: var(--lsa-primary); }
.lsa-root .lsa-notebtn { all: unset; cursor: pointer; font: inherit; font-weight: 600; color: var(--lsa-primary); text-decoration: underline; text-underline-offset: 2px; }
.lsa-root .lsa-notebtn:hover { color: var(--lsa-navy, #242B3D); }
.lsa-root .lsa-notebtn:focus-visible { outline: 2px solid #ED3729; outline-offset: 2px; border-radius: 3px; }

/* ---------- Mobile ---------- */
@media (max-width: 599.98px) {
  .lsa-root .lsa-launcher {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }
  .lsa-root .lsa-launcher-label { display: none; }
  .lsa-root .lsa-launcher-spark svg { width: 24px; height: 24px; }
  .lsa-root.lsa-is-open .lsa-launcher { display: none; }

  .lsa-root .lsa-panel {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    transform: translateY(24px);
    transform-origin: bottom center;
  }
  .lsa-root .lsa-header {
    gap: 10px;
    padding: 10px 8px 14px 16px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }
  .lsa-root .lsa-close { width: 44px; height: 44px; }
  .lsa-root .lsa-newchat { height: 32px; }
  .lsa-root .lsa-log { padding: 18px 14px 16px; }
  .lsa-root .lsa-footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .lsa-root .lsa-input { font-size: 16px; }
  .lsa-root .lsa-field-input { font-size: 16px; }
  .lsa-root .lsa-cards { width: 100%; }
  .lsa-root .lsa-bubble { max-width: 94%; }
}
@media (max-width: 380px) {
  .lsa-root .lsa-field--half { flex-basis: 100%; }
  .lsa-root .lsa-logo { max-width: 150px; }
}
html.lsa-lock,
html.lsa-lock body {
  overflow: hidden !important;
}

/* Short desktop viewports */
@media (min-width: 600px) and (max-height: 520px) {
  .lsa-root .lsa-panel { bottom: 84px; max-height: calc(100vh - 100px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .lsa-root *,
  .lsa-root *::before,
  .lsa-root *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .lsa-root .lsa-launcher { opacity: 1; transform: none; }
  .lsa-root .lsa-launcher-spark { animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .lsa-root { display: none !important; }
}
