/* páginas sem React: o lançador pré-renderizado do React (.kh-launcher-wrap) não funciona aqui; só o .leo-w */
.kh-launcher-wrap { display: none !important; }

/* Leo nas páginas de HTML puro. Mesmo visual do LeoLauncher (home-en.css). */
a.fixed.bottom-6.right-6[href^="tel:"] { display: none !important; }

.leo-w {
  --leo-ink: #061c1f;
  --leo-teal: #028592;
  --leo-deep: #016e79;
  --leo-gold: #f8c12d;
  --leo-cream: #faf7ee;
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.leo-w *, .leo-w *::before, .leo-w *::after { box-sizing: border-box; }

.leo-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 18px 6px 6px;
  border: 1px solid rgba(2, 133, 146, 0.55);
  border-radius: 999px;
  background: var(--leo-ink);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(6, 28, 31, 0.75), 0 0 0 4px rgba(2, 133, 146, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.leo-btn:hover { transform: translateY(-2px); }
.leo-btn:focus-visible { outline: 3px solid var(--leo-gold); outline-offset: 3px; }
.leo-av { position: relative; display: block; width: 44px; height: 44px; flex: none; }
.leo-av img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--leo-gold);
  border: 2px solid var(--leo-gold);
}
.leo-av i, .leo-h span i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2fbf71;
  border: 2px solid var(--leo-ink);
}
.leo-txt { display: flex; flex-direction: column; align-items: flex-start; text-align: left; font: 700 1rem/1.1 Montserrat, system-ui, sans-serif; }
.leo-txt small { font: 500 0.75rem/1.2 "Open Sans", system-ui, sans-serif; opacity: 0.8; }
.leo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.leo-p {
  width: min(380px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--leo-cream);
  color: #12282b;
  box-shadow: 0 30px 60px -20px rgba(6, 28, 31, 0.55), 0 0 0 1px rgba(6, 28, 31, 0.08);
  animation: leo-in 0.22s ease-out;
}
.leo-p[hidden] { display: none; }
@keyframes leo-in { from { opacity: 0; transform: translateY(10px); } }

.leo-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 14px;
  background: var(--leo-deep);
  color: #fff;
}
.leo-h img { width: 40px; height: 40px; border-radius: 50%; background: var(--leo-gold); border: 2px solid var(--leo-gold); object-fit: cover; }
.leo-h div { flex: 1; min-width: 0; }
.leo-h b { display: block; font: 700 1rem/1.2 Montserrat, system-ui, sans-serif; }
.leo-h span { position: relative; display: block; padding-left: 16px; font-size: 0.8125rem; opacity: 0.9; }
.leo-h span i { left: 0; right: auto; top: 50%; bottom: auto; width: 9px; height: 9px; margin-top: -4.5px; border-width: 0; }
.leo-x {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
}
.leo-x:hover { background: rgba(255, 255, 255, 0.28); }
.leo-x:focus-visible, .leo-q button:focus-visible, .leo-f button:focus-visible, .leo-ft :focus-visible { outline: 3px solid var(--leo-gold); outline-offset: 2px; }

.leo-b { flex: 1; min-height: 80px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.leo-m { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 0.9375rem; line-height: 1.45; word-wrap: break-word; }
.leo-a { align-self: flex-start; background: #fff; border: 1px solid rgba(6, 28, 31, 0.08); border-bottom-left-radius: 4px; }
.leo-u { align-self: flex-end; background: var(--leo-deep); color: #fff; border-bottom-right-radius: 4px; }
.leo-m a { color: var(--leo-deep); font-weight: 600; }
.leo-u a { color: #fff; }
.leo-typing { min-width: 56px; min-height: 36px; }
.leo-typing::after { content: "• • •"; letter-spacing: 2px; color: var(--leo-teal); animation: leo-dots 1s infinite; }
@keyframes leo-dots { 50% { opacity: 0.3; } }

.leo-q { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.leo-q:empty { display: none; }
.leo-q button {
  flex: none;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(2, 133, 146, 0.45);
  border-radius: 999px;
  background: #fff;
  color: var(--leo-deep);
  font: 600 0.8125rem/1.2 "Open Sans", system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.leo-f { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid rgba(6, 28, 31, 0.08); background: #fff; }
.leo-f input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(6, 28, 31, 0.18);
  border-radius: 12px;
  font: 400 16px/1 "Open Sans", system-ui, sans-serif;
  color: #12282b;
  background: #fff;
}
.leo-f input:focus { outline: 2px solid var(--leo-teal); outline-offset: 0; border-color: transparent; }
.leo-f button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; background: var(--leo-deep); color: #fff; cursor: pointer; display: grid; place-items: center; }
.leo-f button:disabled { opacity: 0.5; cursor: default; }
.leo-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 12px; background: #fff; }
.leo-hu { min-height: 40px; border: 0; background: none; color: var(--leo-deep); font: 600 0.8125rem/1.2 "Open Sans", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
.leo-en {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--leo-gold);
  color: #1b1405;
  font: 700 0.875rem/1 Montserrat, system-ui, sans-serif;
  text-decoration: none;
}

@media (max-width: 767px) {
  .leo-btn { padding: 4px; min-height: 0; }
  .leo-txt { display: none; }
  .leo-av, .leo-av img { width: 52px; height: 52px; }
  .leo-w.leo-open { left: 0; right: 0; bottom: 0; align-items: stretch; gap: 0; }
  .leo-w.leo-open .leo-btn { display: none; }
  .leo-p {
    width: 100%;
    max-height: 55vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation-name: leo-up;
  }
  .leo-h { padding-top: 14px; position: relative; }
  .leo-h::before { content: ""; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(255, 255, 255, 0.45); }
}
@keyframes leo-up { from { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .leo-p, .leo-btn, .leo-typing::after { animation: none !important; transition: none !important; }
}
@media print { .leo-w { display: none !important; } }

/* sai da frente de um botão de ação que passa por baixo (páginas de venda, 2026-11-30) */
.leo-w.leo-yield { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 150ms ease, visibility 0s linear 150ms; }
/* desktop: acima da barra fixa de CTA quando ela aparece */
@media (min-width: 768px) {
  body.kh-bar-on .leo-w { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
