.tkn-lm-widget-root {
  --tkn-lm-accent: #6d5dfc;
  --tkn-lm-header: #171827;
  --tkn-lm-surface: #f7f8fb;
  --tkn-lm-text: #171827;
  --tkn-lm-radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--tkn-lm-text);
  z-index: 99999;
}
.tkn-lm-widget-root.is-floating {
  position: fixed;
  right: 22px;
  bottom: 22px;
}
.tkn-lm-widget-root.is-floating.bottom-left {
  right: auto;
  left: 22px;
}
.tkn-lm-widget-root.is-inline {
  max-width: 420px;
  width: 100%;
}
.tkn-lm-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 12px 17px 12px 14px;
  min-height: 50px;
  background: var(--tkn-lm-launcher-bg, var(--tkn-lm-accent));
  color: #fff;
  font-weight: 850;
  letter-spacing: -.01em;
  box-shadow: 0 16px 38px rgba(22, 24, 39, .24);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.tkn-lm-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(22, 24, 39, .3);
  filter: saturate(1.05);
}
.tkn-lm-launcher.is-open {
  transform: translateY(0);
  box-shadow: 0 14px 34px rgba(22, 24, 39, .22);
}
.tkn-lm-launcher.has-whatsapp-icon {
  background: var(--tkn-lm-launcher-bg, #25D366);
}
.tkn-lm-launcher.is-icon-only,
.tkn-lm-launcher.is-compact {
  width: 58px;
  height: 58px;
  padding: 0;
}
.tkn-lm-launcher.is-compact .tkn-lm-launcher-text {
  display: none;
}
.tkn-lm-launcher-text {
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}
.tkn-lm-launcher-whatsapp {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
}
.tkn-lm-launcher-whatsapp svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
}
.tkn-lm-launcher-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #38f8a6;
  box-shadow: 0 0 0 6px rgba(56,248,166,.16);
}
.tkn-lm-chat {
  width: min(390px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 110px));
  background: var(--tkn-lm-surface);
  border: 1px solid rgba(255,255,255,.68);
  border-radius: var(--tkn-lm-radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(11, 12, 28, .28);
  display: none;
  flex-direction: column;
  margin-bottom: 12px;
}
.tkn-lm-widget-root.is-inline .tkn-lm-chat,
.tkn-lm-chat.is-open {
  display: flex;
}
.tkn-lm-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--tkn-lm-header);
  color: #fff;
}
.tkn-lm-avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--tkn-lm-accent);
  font-weight: 900;
}
.tkn-lm-chat-head strong { display: block; font-size: 15px; line-height: 1.15; }
.tkn-lm-chat-head span { display: block; opacity: .78; font-size: 12px; line-height: 1.35; }
.tkn-lm-close {
  margin-left: auto;
  border: 1px solid rgba(31, 37, 68, .10);
  background: rgba(255, 255, 255, .78);
  color: var(--tkn-lm-text);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(31, 37, 68, .08);
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tkn-lm-close::before,
.tkn-lm-close::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.tkn-lm-close::before { transform: rotate(45deg); }
.tkn-lm-close::after { transform: rotate(-45deg); }
.tkn-lm-close:hover {
  background: #fff;
  border-color: rgba(31, 37, 68, .18);
  box-shadow: 0 10px 24px rgba(31, 37, 68, .14);
  transform: scale(1.04);
}
.tkn-lm-chat-body {
  padding: 14px;
  overflow: auto;
  min-height: 220px;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tkn-lm-line {
  display: flex;
}
.tkn-lm-line span {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .07);
}
.tkn-lm-line.is-bot { justify-content: flex-start; }
.tkn-lm-line.is-bot span {
  background: #fff;
  border-bottom-left-radius: 4px;
}
.tkn-lm-line.is-user { justify-content: flex-end; }
.tkn-lm-line.is-user span {
  background: var(--tkn-lm-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.tkn-lm-line.is-error span {
  background: #fff1f1;
  color: #a72f2f;
}
.tkn-lm-chat-foot {
  border-top: 1px solid #e6e9f2;
  padding: 12px;
  background: rgba(255,255,255,.88);
}
.tkn-lm-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tkn-lm-option,
.tkn-lm-primary,
.tkn-lm-reset {
  width: 100%;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 800;
  cursor: pointer;
}
.tkn-lm-option {
  border: 1px solid rgba(109,93,252,.32);
  background: #fff;
  color: #292a42;
  text-align: left;
}
.tkn-lm-option:hover {
  border-color: var(--tkn-lm-accent);
  color: var(--tkn-lm-accent);
}
.tkn-lm-primary {
  border: 0;
  background: var(--tkn-lm-accent);
  color: #fff;
}
.tkn-lm-primary:disabled {
  opacity: .62;
  cursor: wait;
}
.tkn-lm-reset {
  border: 1px solid #d8dceb;
  background: #fff;
  color: #393b4f;
}
.tkn-lm-input-form {
  display: grid;
  gap: 8px;
}
.tkn-lm-input-form input,
.tkn-lm-input-form textarea {
  border: 1px solid #d9deea;
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
.tkn-lm-input-form textarea {
  min-height: 88px;
  resize: vertical;
}
.tkn-lm-privacy {
  margin: 10px 2px 0;
  font-size: 11px;
  line-height: 1.35;
  color: #697084;
}
.tkn-lm-privacy a { color: var(--tkn-lm-accent); }
@media (max-width: 520px) {
  .tkn-lm-widget-root.is-floating {
    right: 14px;
    left: 14px;
    bottom: 14px;
  }
  .tkn-lm-widget-root.is-floating.bottom-left {
    right: 14px;
    left: 14px;
  }
  .tkn-lm-launcher {
    width: 100%;
    justify-content: center;
  }
  .tkn-lm-chat {
    width: 100%;
    max-height: calc(100vh - 90px);
  }
}

.tkn-lm-launcher-chat {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  position: relative;
  font-size: 15px;
}

.tkn-lm-widget-root.theme-light .tkn-lm-chat-head {
  color: var(--tkn-lm-text);
  background: var(--tkn-lm-header);
  border-bottom: 1px solid #e1e5f0;
}

.tkn-lm-widget-root.theme-light .tkn-lm-chat-head span {
  color: #5f6575;
  opacity: 1;
}

.tkn-lm-widget-root.theme-light .tkn-lm-close {
  color: var(--tkn-lm-text);
  background: rgba(17, 24, 39, .08);
}

.tkn-lm-widget-root.theme-minimal .tkn-lm-launcher,
.tkn-lm-widget-root.theme-minimal .tkn-lm-primary {
  background: var(--tkn-lm-accent);
}

.tkn-lm-widget-root.theme-minimal .tkn-lm-chat {
  box-shadow: 0 18px 44px rgba(11, 12, 28, .14);
  border: 1px solid #e7e9f1;
}

.tkn-lm-widget-root.theme-minimal .tkn-lm-chat-head {
  background: #fff;
  color: var(--tkn-lm-text);
  border-bottom: 1px solid #e7e9f1;
}

.tkn-lm-widget-root.theme-minimal .tkn-lm-chat-head span {
  opacity: .72;
  color: #606779;
}


/* 0.3.2 — modo sem degradê e preset Vila Bethânia */
.tkn-lm-widget-root.mode-gradient .tkn-lm-launcher {
  background: linear-gradient(135deg, var(--tkn-lm-launcher-bg, var(--tkn-lm-accent)), var(--tkn-lm-accent));
}

.tkn-lm-widget-root.mode-gradient .tkn-lm-chat-head {
  background: linear-gradient(135deg, var(--tkn-lm-header), var(--tkn-lm-accent));
}

.tkn-lm-widget-root.mode-gradient .tkn-lm-avatar,
.tkn-lm-widget-root.mode-gradient .tkn-lm-primary {
  background: linear-gradient(135deg, var(--tkn-lm-accent), #00b4d8);
}

.tkn-lm-widget-root.mode-solid .tkn-lm-launcher,
.tkn-lm-widget-root.mode-solid .tkn-lm-primary,
.tkn-lm-widget-root.mode-solid .tkn-lm-avatar,
.tkn-lm-widget-root.mode-solid .tkn-lm-chat-head {
  background-image: none !important;
}

.tkn-lm-widget-root.mode-solid .tkn-lm-launcher {
  background-color: var(--tkn-lm-launcher-bg, var(--tkn-lm-accent)) !important;
}

.tkn-lm-widget-root.mode-solid .tkn-lm-primary,
.tkn-lm-widget-root.mode-solid .tkn-lm-avatar {
  background-color: var(--tkn-lm-accent) !important;
}

.tkn-lm-widget-root.mode-solid .tkn-lm-chat-head {
  background-color: var(--tkn-lm-header) !important;
}

.tkn-lm-widget-root.preset-vila-bethania {
  font-family: "Poppins", "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-chat {
  border: 1px solid #e3e8f2;
  box-shadow: 0 18px 48px rgba(31, 37, 68, .16);
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-chat-head {
  color: #1f2544;
  border-bottom: 1px solid #e3e8f2;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-chat-head span {
  color: #597f99;
  opacity: 1;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-avatar {
  color: #ffffff;
  border-radius: 12px;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-line.is-bot span {
  color: #1f2544;
  background: #ffffff;
  border: 1px solid #eef2f7;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-line.is-user span {
  background: #5b83a0;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-option {
  border-color: #dbe5ee;
  color: #1f2544;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-option:hover {
  border-color: #d8ab4d;
  color: #1f2544;
  background: #fff8ea;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-primary {
  color: #ffffff;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-close {
  color: #1f2544;
  background: #f1f4f8;
}


/* 0.3.3 — refinamento específico Clínica Vila Bethânia */
.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-launcher {
  background: #d8ab4d !important;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 37, 68, .18);
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-chat-head {
  background: #ffffff !important;
  color: #1f2544;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-avatar {
  background: #5b83a0 !important;
  color: #ffffff;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-primary {
  background: #d8ab4d !important;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(216, 171, 77, .22);
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-primary:hover {
  filter: brightness(.98);
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-chat-foot {
  background: #ffffff;
  border-top-color: #e3e8f2;
}

.tkn-lm-widget-root.preset-vila-bethania .tkn-lm-input {
  background: #ffffff;
  border-color: #dbe5ee;
  color: #1f2544;
}


/* 0.3.4 — launcher fixo independente do estado do chat
   Evita que o botão flutuante mude de posição ao abrir/fechar a janela. */
.tkn-lm-widget-root.is-floating {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 99999;
}

.tkn-lm-widget-root.is-floating .tkn-lm-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100001;
}

.tkn-lm-widget-root.is-floating .tkn-lm-chat {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 100000;
  margin-bottom: 0 !important;
}

.tkn-lm-widget-root.is-floating.bottom-left .tkn-lm-launcher {
  right: auto;
  left: 22px;
}

.tkn-lm-widget-root.is-floating.bottom-left .tkn-lm-chat {
  right: auto;
  left: 22px;
}

@media (max-width: 520px) {
  .tkn-lm-widget-root.is-floating .tkn-lm-launcher {
    right: 16px;
    bottom: 16px;
  }

  .tkn-lm-widget-root.is-floating .tkn-lm-chat {
    width: calc(100vw - 24px);
    right: 12px;
    left: 12px;
    bottom: 82px;
    max-height: calc(100vh - 104px);
  }

  .tkn-lm-widget-root.is-floating.bottom-left .tkn-lm-launcher {
    left: 16px;
    right: auto;
  }

  .tkn-lm-widget-root.is-floating.bottom-left .tkn-lm-chat {
    left: 12px;
    right: 12px;
  }
}


/* 0.3.6/0.3.7 — UX conversacional e código de atendimento */
.tkn-lm-line.is-typing span {
  min-width: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.tkn-lm-line.is-typing i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: .36;
  animation: tkn-lm-typing 1s infinite ease-in-out;
}
.tkn-lm-line.is-typing i:nth-child(2) { animation-delay: .16s; }
.tkn-lm-line.is-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes tkn-lm-typing {
  0%, 80%, 100% { transform: translateY(0); opacity: .28; }
  40% { transform: translateY(-4px); opacity: .72; }
}

/* Ícone do WhatsApp verde dentro do botão flutuante */
.tkn-lm-launcher.has-whatsapp-icon .tkn-lm-launcher-whatsapp {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  color: #25D366;
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, .14);
}
.tkn-lm-launcher.has-whatsapp-icon .tkn-lm-launcher-whatsapp svg {
  width: 20px;
  height: 20px;
  fill: #25D366;
}

/* Ajuste fino do botão fechar */
.tkn-lm-close {
  background: rgba(31, 37, 68, .06);
}
.tkn-lm-close:hover {
  background: rgba(31, 37, 68, .10);
}


/* 0.3.8 — variação Vila Bethânia com botão flutuante verde tradicional do WhatsApp.
   Mantém o chat com identidade institucional, mas usa o launcher todo verde para leitura imediata de WhatsApp. */
.tkn-lm-widget-root.preset-vila-bethania-whatsapp {
  font-family: "Poppins", "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-launcher {
  background: #25D366 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(37, 211, 102, .28);
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-launcher:hover {
  box-shadow: 0 18px 44px rgba(37, 211, 102, .34);
  filter: brightness(.98) saturate(1.02);
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-launcher.has-whatsapp-icon .tkn-lm-launcher-whatsapp {
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-launcher.has-whatsapp-icon .tkn-lm-launcher-whatsapp svg {
  fill: #ffffff;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-chat {
  border: 1px solid #e3e8f2;
  box-shadow: 0 18px 48px rgba(31, 37, 68, .16);
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-chat-head {
  background: #ffffff !important;
  color: #1f2544;
  border-bottom: 1px solid #e3e8f2;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-chat-head span {
  color: #597f99;
  opacity: 1;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-avatar {
  background: #5b83a0 !important;
  color: #ffffff;
  border-radius: 12px;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-line.is-bot span {
  color: #1f2544;
  background: #ffffff;
  border: 1px solid #eef2f7;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-line.is-user span {
  background: #5b83a0;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-option:hover {
  border-color: #d8ab4d;
  color: #1f2544;
  background: #fff8ea;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-primary {
  background: #d8ab4d !important;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(216, 171, 77, .22);
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-chat-foot {
  background: #ffffff;
  border-top-color: #e3e8f2;
}

.tkn-lm-widget-root.preset-vila-bethania-whatsapp .tkn-lm-input {
  background: #ffffff;
  border-color: #dbe5ee;
  color: #1f2544;
}
