/* Ask Sprout: chat widget styles. All selectors are scoped under .stanlera-root. */

.stanlera-root {
  --stanlera-navy: #1F3D14;
  --stanlera-header: #2F5E1C;
  --stanlera-purple-mid: #3F7A26;
  --stanlera-primary: #4A8F2E;
  --stanlera-teal: #7EB63A;
  --stanlera-lavender: #CFE5BF;
  --stanlera-tint: #F2F8EC;
  --stanlera-text: #3F4A3A;
  --stanlera-ink: #1F3D14;
  --stanlera-muted: #6F7A69;
  --stanlera-line: #DDEAD3;
  --stanlera-grad: linear-gradient(90deg, #7EB63A 0%, #62B43A 55%, #2F5E1C 100%);
  --stanlera-font: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --stanlera-ease: cubic-bezier(.2, .8, .2, 1);
  --stanlera-ring: 0 0 0 3px rgba(126, 182, 58, .55);
}

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

.stanlera-root .stanlera-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;
}

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

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

/* ---------- Launcher ---------- */
.stanlera-root .stanlera-launcher {
  position: fixed;
  right: 24px;
  bottom: var(--stanlera-launch-b, 24px); /* lifted by the script when another button sits here */
  z-index: 999999990; /* above sticky headers (Divi 99999) and the admin bar, just below WhatsApp (999999998+) and popup overlays */
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--stanlera-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(31, 61, 20, .55), 0 2px 6px rgba(31, 61, 20, .18), inset 0 1px 0 rgba(255, 255, 255, .22);
  opacity: 0;
  transform: translateY(16px) scale(.96);
  transition: background-position .5s var(--stanlera-ease), box-shadow .25s ease, transform .25s var(--stanlera-ease), padding .25s var(--stanlera-ease), width .25s var(--stanlera-ease);
}
.stanlera-root.stanlera-ready .stanlera-launcher {
  opacity: 1;
  transform: none;
  animation: stanlera-rise .6s var(--stanlera-ease) .5s backwards;
}
.stanlera-root .stanlera-launcher:hover {
  background: var(--stanlera-grad);
  background-size: 100% 100%;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -8px rgba(31, 61, 20, .6), 0 3px 8px rgba(31, 61, 20, .2), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.stanlera-root .stanlera-launcher:focus { background: var(--stanlera-grad); background-size: 100% 100%; color: #fff; }
.stanlera-root .stanlera-launcher:focus-visible { outline: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--stanlera-teal), 0 10px 28px -8px rgba(31, 61, 20, .55); }
.stanlera-root .stanlera-launcher:active { transform: scale(.97); }
.stanlera-root .stanlera-launcher-spark svg { width: 20px; height: 20px; }
.stanlera-root .stanlera-launcher-spark { animation: stanlera-twinkle 4.5s ease-in-out 1.4s infinite; }
.stanlera-root .stanlera-launcher-close { display: none; }
.stanlera-root .stanlera-launcher-label { font-size: 15px; font-weight: 600; color: #fff; line-height: 1; }

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

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

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

/* Header */
.stanlera-root .stanlera-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(126, 182, 58, .24) 0%, rgba(126, 182, 58, 0) 46%),
    radial-gradient(90% 140% at 0% 100%, rgba(74, 143, 46, .6) 0%, rgba(74, 143, 46, 0) 62%),
    var(--stanlera-header);
  color: #fff;
}
.stanlera-root .stanlera-header--nologo { padding-top: 16px; padding-bottom: 16px; }
.stanlera-root .stanlera-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--stanlera-grad);
  opacity: .9;
}
.stanlera-root .stanlera-htop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.stanlera-root .stanlera-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}
.stanlera-root .stanlera-logo {
  display: block;
  height: 36px; /* the Stanler Farms roundel needs more height than a wordmark to stay legible */
  width: auto;
  max-width: 200px;
  flex: none;
}
.stanlera-root .stanlera-titles { min-width: 0; padding-right: 8px; }
.stanlera-root .stanlera-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #fff;
}
.stanlera-root .stanlera-title-spark { color: var(--stanlera-teal); }
.stanlera-root .stanlera-title-spark svg { width: 17px; height: 17px; }
.stanlera-root .stanlera-subtitle {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--stanlera-lavender);
}
.stanlera-root .stanlera-hactions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.stanlera-root .stanlera-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(--stanlera-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;
}
.stanlera-root .stanlera-hbtn:hover,
.stanlera-root .stanlera-hbtn:focus-visible {
  background-color: rgba(255, 255, 255, .1);
  color: #fff;
}
.stanlera-root .stanlera-newchat {
  height: 30px;
  padding: 0 11px 0 9px;
  margin-right: 4px;
  border: 1px solid rgba(207, 229, 191, .3);
  border-radius: 999px;
}
.stanlera-root .stanlera-newchat:hover { border-color: rgba(255, 255, 255, .5); }

/* Scroll area */
.stanlera-root .stanlera-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(242, 248, 236, .9) 0%, rgba(255, 255, 255, 0) 70%),
    #fff;
  scrollbar-width: thin;
  scrollbar-color: #CFE5BF transparent;
}
.stanlera-root .stanlera-scroll::-webkit-scrollbar { width: 8px; }
.stanlera-root .stanlera-scroll::-webkit-scrollbar-thumb { background: #CFE5BF; border-radius: 8px; border: 2px solid #fff; }
.stanlera-root .stanlera-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 18px 18px;
  outline: none;
}

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

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

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

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

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

/* CTA row and buttons */
.stanlera-root .stanlera-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.stanlera-root .stanlera-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(--stanlera-ease), box-shadow .2s ease, border-color .15s ease, color .15s ease, transform .15s var(--stanlera-ease);
}
.stanlera-root .stanlera-btn--primary,
.stanlera-root .stanlera-btn--primary:focus,
.stanlera-root button.stanlera-btn--primary:hover {
  background: var(--stanlera-grad);
  background-size: 100% 100%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(74, 143, 46, .8);
}
.stanlera-root .stanlera-btn--primary:hover,
.stanlera-root button.stanlera-btn--primary:hover {
  color: #fff;
  filter: saturate(1.12) brightness(1.03);
  box-shadow: 0 10px 22px -10px rgba(74, 143, 46, .9);
}
.stanlera-root .stanlera-btn--primary[disabled] { opacity: .7; cursor: progress; }
.stanlera-root .stanlera-btn--ghost {
  border: 1px solid #CFE5BF;
  background: #fff;
  color: var(--stanlera-primary);
}
.stanlera-root .stanlera-btn--ghost:hover,
.stanlera-root .stanlera-btn--ghost:focus-visible {
  border-color: var(--stanlera-primary);
  background: #fff;
  color: var(--stanlera-primary);
}
.stanlera-root .stanlera-btn--text {
  height: 40px;
  padding: 0 12px;
  color: var(--stanlera-muted);
  font-weight: 500;
}
.stanlera-root .stanlera-btn--text:hover { color: var(--stanlera-navy); }

/* Suggestions */
.stanlera-root .stanlera-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
  animation: stanlera-in .3s var(--stanlera-ease) .08s both;
}
.stanlera-root .stanlera-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #D2E4C6;
  border-radius: 999px;
  background: #fff;
  color: var(--stanlera-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;
}
.stanlera-root .stanlera-chip:hover,
.stanlera-root .stanlera-chip:focus-visible {
  border-color: var(--stanlera-teal);
  background-color: #F3F9EC;
  color: var(--stanlera-navy);
}

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

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

/* ---------- Footer / composer ---------- */
.stanlera-root .stanlera-footer {
  flex: none;
  padding: 12px 14px 10px;
  border-top: 1px solid var(--stanlera-line);
  background: #fff;
}
.stanlera-root .stanlera-composer { position: relative; }
.stanlera-root .stanlera-inputwrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border: 1px solid #D6E6CB;
  border-radius: 16px;
  background: #FBFDF9;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.stanlera-root .stanlera-inputwrap:focus-within {
  border-color: var(--stanlera-teal);
  background: #fff;
  box-shadow: var(--stanlera-ring);
}
.stanlera-root .stanlera-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(--stanlera-ink);
  font-size: 14.5px;
  line-height: 22px;
  resize: none;
  overflow-y: hidden;
  box-sizing: content-box;
}
.stanlera-root .stanlera-input:focus,
.stanlera-root .stanlera-input:focus-visible { outline: 0; border: 0; box-shadow: none; background: transparent; }
.stanlera-root .stanlera-input::placeholder { color: #8F9C89; opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stanlera-root .stanlera-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--stanlera-grad);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(74, 143, 46, .9);
  transition: opacity .15s ease, transform .15s var(--stanlera-ease), filter .15s ease;
}
.stanlera-root .stanlera-send:hover,
.stanlera-root .stanlera-send:focus { background: var(--stanlera-grad); color: #fff; }
.stanlera-root .stanlera-send:hover:not([disabled]) { transform: translateY(-1px); filter: saturate(1.15); }
.stanlera-root .stanlera-send[disabled] {
  background: #DCE9D2;
  color: #95A48E;
  box-shadow: none;
  cursor: default;
}
.stanlera-root .stanlera-busy .stanlera-send[disabled] { cursor: progress; }
.stanlera-root .stanlera-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(--stanlera-muted);
  font-variant-numeric: tabular-nums;
}
.stanlera-root .stanlera-counter--show { display: block; }
.stanlera-root .stanlera-counter--max { color: #B4324A; }
.stanlera-root .stanlera-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--stanlera-muted);
  text-align: center;
}
.stanlera-root .stanlera-note .stanlera-link { font-weight: 500; color: var(--stanlera-primary); }
.stanlera-root .stanlera-notebtn { all: unset; cursor: pointer; font: inherit; font-weight: 600; color: var(--stanlera-primary); text-decoration: underline; text-underline-offset: 2px; }
.stanlera-root .stanlera-notebtn:hover { color: var(--stanlera-navy, #1F3D14); }
.stanlera-root .stanlera-notebtn:focus-visible { outline: 2px solid #7EB63A; outline-offset: 2px; border-radius: 3px; }

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

  .stanlera-root .stanlera-panel {
    top: 0;
    right: 0;
    bottom: var(--stanlera-clear, 0px); /* full screen, ending above any floating button such as WhatsApp */
    left: 0;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 0;
    transform: translateY(24px);
    transform-origin: bottom center;
  }
  .stanlera-root .stanlera-header {
    gap: 10px;
    padding: 10px 8px 14px 16px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }
  .stanlera-root .stanlera-close { width: 44px; height: 44px; }
  .stanlera-root .stanlera-newchat { height: 32px; }
  .stanlera-root .stanlera-log { padding: 18px 14px 16px; }
  .stanlera-root .stanlera-footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .stanlera-root .stanlera-input { font-size: 16px; }
  .stanlera-root .stanlera-field-input { font-size: 16px; }
  .stanlera-root .stanlera-cards { width: 100%; }
  .stanlera-root .stanlera-bubble { max-width: 94%; }
}
@media (max-width: 380px) {
  .stanlera-root .stanlera-field--half { flex-basis: 100%; }
  .stanlera-root .stanlera-logo { max-width: 150px; }
}
/* ---------- Answer feedback (thumbs) ---------- */
.stanlera-root .stanlera-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-left: 4px;
  min-height: 26px;
}
.stanlera-root .stanlera-feedback-label,
.stanlera-root .stanlera-feedback-thanks {
  font-size: 11.5px;
  color: var(--stanlera-muted);
}
.stanlera-root .stanlera-feedback-thanks { color: var(--stanlera-primary); font-weight: 500; }
.stanlera-root .stanlera-thumb {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: var(--stanlera-muted);
  cursor: pointer;
  transition: background .15s var(--stanlera-ease), color .15s var(--stanlera-ease), transform .15s var(--stanlera-ease);
}
.stanlera-root .stanlera-thumb:hover { background: var(--stanlera-tint); color: var(--stanlera-primary); transform: translateY(-1px); }
.stanlera-root .stanlera-thumb:focus-visible { outline: 2px solid var(--stanlera-teal); outline-offset: 1px; }
.stanlera-root .stanlera-thumb svg { display: block; }

/* ---------- Page-aware nudge beside the launcher ---------- */
.stanlera-root .stanlera-nudge {
  position: fixed;
  right: 24px;
  bottom: var(--stanlera-panel-b, 88px);
  z-index: 999999989;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: min(320px, calc(100vw - 48px));
  padding: 12px 10px 12px 16px;
  border-radius: 16px 16px 4px 16px;
  background: #fff;
  color: var(--stanlera-ink);
  border: 1px solid var(--stanlera-line);
  box-shadow: 0 16px 40px -12px rgba(31, 61, 20, .35), 0 2px 6px rgba(31, 61, 20, .08);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transition: opacity .35s var(--stanlera-ease), transform .35s var(--stanlera-ease);
}
.stanlera-root .stanlera-nudge[hidden] { display: none; }
.stanlera-root .stanlera-nudge--in { opacity: 1; transform: none; }
.stanlera-root .stanlera-nudge-text {
  all: unset;
  box-sizing: border-box;
  display: block;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.45;
  color: var(--stanlera-ink);
}
.stanlera-root .stanlera-nudge-text:focus-visible { outline: 2px solid var(--stanlera-teal); outline-offset: 3px; border-radius: 6px; }
.stanlera-root .stanlera-nudge-name {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--stanlera-primary);
  margin-bottom: 3px;
}
.stanlera-root .stanlera-nudge-close {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -4px -2px 0 0;
  border-radius: 999px;
  color: var(--stanlera-muted);
  cursor: pointer;
  flex: none;
}
.stanlera-root .stanlera-nudge-close:hover { background: var(--stanlera-tint); color: var(--stanlera-ink); }
.stanlera-root .stanlera-nudge-close:focus-visible { outline: 2px solid var(--stanlera-teal); }
.stanlera-root .stanlera-nudge-close svg { width: 14px; height: 14px; }
@media (max-width: 599.98px) {
  .stanlera-root .stanlera-nudge { right: 16px; bottom: var(--stanlera-panel-b, 84px); }
  .stanlera-root.stanlera-has-clear .stanlera-panel { border-radius: 0 0 18px 18px; box-shadow: 0 18px 40px -16px rgba(31, 61, 20, .45); }
}
@media (prefers-reduced-motion: reduce) {
  .stanlera-root .stanlera-nudge { transition: none; }
}

html.stanlera-lock,
html.stanlera-lock body {
  overflow: hidden !important;
}

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .stanlera-root *,
  .stanlera-root *::before,
  .stanlera-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;
  }
  .stanlera-root .stanlera-launcher { opacity: 1; transform: none; }
  .stanlera-root .stanlera-launcher-spark { animation: none !important; }
}

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