/* Assistente com IA (CH9). Cores próprias e explícitas: funciona em qualquer tema, claro ou escuro.
   As cores, a fonte, os cantos e a largura vêm do painel em variáveis (--wlc-*) no próprio elemento. */
.wlc, .wlc-float {
  --wlc-brand: #1d4fd8; --wlc-on-brand: #fff; --wlc-ink: #0f172a; --wlc-muted: #475569; --wlc-line: #dbe3ef;
  --wlc-bot: #f1f5f9; --wlc-bot-ink: #0f172a; --wlc-user: var(--wlc-brand); --wlc-on-user: var(--wlc-on-brand);
  --wlc-price: #047857; --wlc-font: inherit; --wlc-size: 15px; --wlc-radius: 14px; --wlc-width: 380px;
  --wlc-brand-soft: color-mix(in srgb, var(--wlc-brand) 12%, #fff);
}
.wlc { box-sizing: border-box; display: flex; flex-direction: column; max-width: 640px; margin: 24px auto; background: #fff; color: var(--wlc-ink); border: 1px solid var(--wlc-line); border-radius: calc(var(--wlc-radius) + 2px); box-shadow: 0 10px 30px rgba(15, 23, 42, .08); font-family: var(--wlc-font); font-size: var(--wlc-size); line-height: 1.5; overflow: hidden; text-align: left; }
.wlc *, .wlc *::before, .wlc *::after { box-sizing: border-box; }
.wlc[hidden] { display: none; }
.wlc .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.wlc :is(h2, p, button, input, textarea, label, a) { font-family: var(--wlc-font) !important; text-transform: none; letter-spacing: normal; text-shadow: none; }
.wlc .wlc-ico { display: block; flex: 0 0 auto; width: 1.15em; height: 1.15em; }

/* Topo: o tema não pinta o <header> (Asap: header{color:#fff}). Nome em uma linha, selo compacto e
   botões redondos do mesmo tamanho (dev.38, pedido de 21/11/2026). */
.wlc .wlc-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--wlc-line); background: #fff; color: var(--wlc-ink); }
.wlc.wlc-head--brand .wlc-head { background: var(--wlc-brand); color: var(--wlc-on-brand); border-bottom-color: transparent; }
.wlc-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--wlc-brand); color: var(--wlc-on-brand); font-weight: 700; font-size: 17px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.wlc-head--brand .wlc-avatar { background: var(--wlc-on-brand); color: var(--wlc-brand); }
.wlc-avatar img, .wlc-launcher-dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wlc-head-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wlc .wlc-name { margin: 0; padding: 0; font-size: 1.02em; line-height: 1.25; font-weight: 700; color: inherit; border: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wlc .wlc-badge { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; max-width: 100%; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--wlc-brand-soft); color: var(--wlc-brand); font-size: 11.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wlc-head--brand .wlc-badge { background: rgba(255, 255, 255, .16); color: inherit; }
.wlc-badge-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, .25); }
.wlc-head-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.wlc .wlc-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .75; line-height: 1; cursor: pointer; transition: background .15s ease, opacity .15s ease, transform .15s ease; }
.wlc .wlc-icon-btn .wlc-ico { width: 18px; height: 18px; }
.wlc .wlc-icon-btn:hover, .wlc .wlc-icon-btn:focus-visible { background: rgba(15, 23, 42, .07); opacity: 1; }
.wlc-head--brand .wlc-icon-btn:hover, .wlc-head--brand .wlc-icon-btn:focus-visible { background: rgba(255, 255, 255, .16); }
.wlc .wlc-ch { color: #fff; opacity: 1; }
.wlc .wlc-ch .wlc-ico { width: 19px; height: 19px; }
.wlc .wlc-ch--whatsapp { background: #25d366; box-shadow: 0 2px 6px rgba(37, 211, 102, .35); }
.wlc .wlc-ch--whatsapp:hover, .wlc .wlc-ch--whatsapp:focus-visible { background: #1ebe5a; transform: translateY(-1px); }
.wlc .wlc-ch--telegram { background: #229ed9; box-shadow: 0 2px 6px rgba(34, 158, 217, .35); }
.wlc .wlc-ch--telegram .wlc-ico { width: 17px; height: 17px; margin-left: -2px; }
.wlc .wlc-ch--telegram:hover, .wlc .wlc-ch--telegram:focus-visible { background: #1b8cc2; transform: translateY(-1px); }
.wlc-head--brand .wlc-ch { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }.wlc .wlc-disclaimer { margin: 0; padding: 8px 16px; background: #f8fafc; color: var(--wlc-muted); font-size: 12px; line-height: 1.45; border-bottom: 1px solid var(--wlc-line); }

/* Conversa: espaço embaixo para o último balão aparecer inteiro. */
.wlc-log { display: flex; flex-direction: column; gap: 10px; height: 380px; padding: 16px 16px 20px; overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 20px; }
.wlc-log:focus-visible { outline: 2px solid var(--wlc-brand); outline-offset: -2px; }
.wlc-msg { flex: 0 0 auto; max-width: 86%; padding: 10px 14px; border-radius: var(--wlc-radius); overflow-wrap: anywhere; }
.wlc .wlc-msg p { margin: 0; color: inherit; font-size: inherit; line-height: 1.5; }
.wlc .wlc-msg p + p { margin-top: 6px; }
.wlc-msg--bot { align-self: flex-start; background: var(--wlc-bot); color: var(--wlc-bot-ink); border-bottom-left-radius: 4px; }
.wlc-msg--user { align-self: flex-end; background: var(--wlc-user); color: var(--wlc-on-user); border-bottom-right-radius: 4px; }
.wlc-turn { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.wlc-turn > .wlc-msg { align-self: flex-start; }

/* Digitando: três pontinhos dentro da conversa (e/ou o texto) */
.wlc .wlc-typing { display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; color: var(--wlc-muted); font-size: 13px; font-style: italic; }
.wlc-dots { display: inline-flex; gap: 4px; }
.wlc-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .35; animation: wlc-dot 1.2s infinite ease-in-out; }
.wlc-dots i:nth-child(2) { animation-delay: .15s; }
.wlc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes wlc-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: .9; } }

/* Produto indicado */
.wlc-msg-offers { align-self: stretch; }
.wlc .wlc-cards { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wlc .wlc-card { display: flex; gap: 12px; align-items: stretch; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--wlc-line); border-radius: var(--wlc-radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 16px rgba(15, 23, 42, .06); transition: box-shadow .2s ease, transform .2s ease; }
.wlc .wlc-card:hover { box-shadow: 0 2px 4px rgba(15, 23, 42, .06), 0 10px 24px rgba(15, 23, 42, .1); }
.wlc-card-media { flex: 0 0 auto; display: grid; place-items: center; width: 76px; height: 76px; padding: 6px; border-radius: calc(var(--wlc-radius) - 4px); background: #f6f8fb; color: var(--wlc-muted); }
.wlc-card-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.wlc-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wlc .wlc-card-merchant { align-self: flex-start; padding: 1px 7px; border-radius: 999px; background: #f1f5f9; color: var(--wlc-muted); font-size: 11px; font-weight: 600; line-height: 1.6; }
.wlc .wlc-card-title { margin: 0; color: var(--wlc-ink); font-weight: 600; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wlc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.wlc .wlc-card-price { color: var(--wlc-price); font-weight: 800; font-size: 15px; letter-spacing: -.2px; }
.wlc .wlc-card-price.is-check { color: var(--wlc-muted); font-weight: 600; font-size: 12.5px; }
.wlc .wlc-card-cta { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--wlc-brand); color: var(--wlc-on-brand); font-weight: 600; font-size: 13px; line-height: 1.2; text-decoration: none; }
.wlc .wlc-card-cta .wlc-ico { width: 14px; height: 14px; }
.wlc .wlc-card-cta:hover, .wlc .wlc-card-cta:focus-visible { filter: brightness(.92); color: var(--wlc-on-brand); text-decoration: none; }
.wlc .wlc-handoff { display: inline-block; margin-top: 10px; padding: 7px 14px; border-radius: 999px; background: #0b6b3a; color: #fff; font-weight: 600; font-size: 13.5px; text-decoration: none; }
.wlc .wlc-handoff:hover, .wlc .wlc-handoff:focus-visible { background: #08542d; color: #fff; }
/* Aviso de afiliado: curto e discreto, mas sempre presente e legível (contraste 4,5:1). */
.wlc .wlc-disclosure { display: flex; align-items: center; gap: 4px; margin: 6px 2px 0; color: #64748b; font-size: 11px; line-height: 1.4; }
.wlc .wlc-disclosure .wlc-ico { width: 12px; height: 12px; }

.wlc-starters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.wlc-starters[hidden] { display: none; }
.wlc .wlc-starter { padding: 6px 12px; border: 1px solid var(--wlc-brand); border-radius: 999px; background: #fff; color: var(--wlc-brand); font-size: 13.5px; cursor: pointer; }
.wlc .wlc-starter:hover, .wlc .wlc-starter:focus-visible { background: var(--wlc-brand-soft); }

.wlc-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--wlc-line); background: #fff; }
.wlc .wlc-input { flex: 1 1 auto; min-height: 42px; max-height: 120px; margin: 0; padding: 9px 12px; border: 1px solid #94a3b8; border-radius: var(--wlc-radius); background: #fff; color: var(--wlc-ink); font-size: 15px; resize: none; box-shadow: none; }
.wlc .wlc-input:focus { outline: 2px solid var(--wlc-brand); outline-offset: 0; border-color: var(--wlc-brand); }
.wlc .wlc-send { flex: 0 0 auto; padding: 0 18px; border: 0; border-radius: var(--wlc-radius); background: var(--wlc-brand); color: var(--wlc-on-brand); font-size: 15px; font-weight: 600; cursor: pointer; }
.wlc .wlc-send:disabled, .wlc .wlc-input:disabled { opacity: .6; cursor: not-allowed; }
.wlc :focus-visible { outline: 2px solid var(--wlc-brand); outline-offset: 2px; }

/* Botão flutuante, no canto oposto ao do WhatsApp (ou no lugar dele, quando juntos) */
.wlc-float { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 99991; display: flex; flex-direction: column; gap: 10px; font-family: var(--wlc-font); }
.wlc-float--left { left: 20px; align-items: flex-start; }
.wlc-float--right { right: 20px; align-items: flex-end; }
.wlc-float .wlc-launcher { display: inline-flex; align-items: center; gap: 10px; max-width: min(340px, calc(100vw - 40px)); margin: 0; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; background: var(--wlc-brand); color: var(--wlc-on-brand); font: 600 14px/1.3 var(--wlc-font, system-ui); text-transform: none; letter-spacing: normal; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); cursor: pointer; }
.wlc-float .wlc-launcher:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 5px var(--wlc-brand); }
.wlc-launcher-dot { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--wlc-on-brand); color: var(--wlc-brand); font-weight: 700; overflow: hidden; }
.wlc-launcher-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wlc-launch--round .wlc-launcher { padding: 8px; }
.wlc-launch--round .wlc-launcher-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wlc-launch--round .wlc-launcher-dot { width: 44px; height: 44px; }
.wlc--floating { order: -1; width: min(var(--wlc-width), calc(100vw - 24px)); max-height: min(640px, calc(100vh - 110px)); margin: 0; }
.wlc--floating .wlc-log { height: auto; flex: 1 1 auto; min-height: 180px; }
/* Juntos: o botão do WhatsApp do Chat sai da tela; o WhatsApp abre pelo topo da conversa. */
.wlc-merged .wl-root .wl-launchers { display: none !important; }
@media (min-width: 601px) { .wlc-no-desktop { display: none !important; } }
@media (max-width: 600px) {
  .wlc-no-mobile { display: none !important; }
  .wlc-float { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .wlc-float--left { left: 12px; }
  .wlc-float--right { right: 12px; }
  /* No celular o botão vira um círculo (sem texto) e não cruza o do WhatsApp nem o sino da Loja. */
  .wlc-launch--auto .wlc-launcher { padding: 7px; }
  .wlc-launch--auto .wlc-launcher-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wlc-launch--auto .wlc-launcher-dot { width: 44px; height: 44px; }
  .wlc-launch--pill .wlc-launcher { max-width: calc(50vw - 20px); }
  /* Aberto: ocupa a largura toda e os outros botões flutuantes saem da frente. */
  .wlc-is-open .wlc-float { left: 8px; right: 8px; align-items: stretch; }
  .wlc-is-open .wlc-float .wlc-launcher { display: none; }
  .wlc-is-open .wlc--floating { width: 100%; max-height: calc(100dvh - 24px); }
  .wlc-is-open :is(.wl-root .wl-launchers, #aas-push-bell-btn) { visibility: hidden; }
  .wlc-log { height: 340px; }
}
/* Logado no WordPress: a barra de administrador (32/46 px) não cobre o topo da conversa. */
body.admin-bar .wlc--floating { max-height: min(640px, calc(100vh - 142px)); }
@media (max-width: 600px) { .wlc-is-open body.admin-bar .wlc--floating { max-height: calc(100dvh - 74px); } }
@media (prefers-reduced-motion: reduce) { .wlc-dots i { animation: none; opacity: .6; } .wlc .wlc-card { transition: none; } }

.wlc-admin-note { padding: 10px 14px; border-left: 4px solid #b45309; background: #fffbeb; color: #78350f; }

/* Captura de contato (lead) dentro da conversa */
.wlc .wlc-lead { max-width: 100%; width: 100%; border: 1px solid var(--wlc-line); background: #fff; color: var(--wlc-ink); }
.wlc .wlc-lead-title { font-weight: 700; }
.wlc .wlc-lead-text { color: var(--wlc-muted); font-size: 13.5px; }
.wlc .wlc-lead-field { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.wlc .wlc-lead-field label { font-size: 13px; font-weight: 600; color: var(--wlc-ink); }
.wlc .wlc-lead-field input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #94a3b8; border-radius: 10px; background: #fff; color: var(--wlc-ink); font-size: 15px; }
.wlc .wlc-lead-field input:focus { outline: 2px solid var(--wlc-brand); border-color: var(--wlc-brand); }
.wlc .wlc-lead-field input[aria-invalid="true"] { border-color: #b91c1c; }
.wlc .wlc-lead-consent { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--wlc-muted); }
.wlc .wlc-lead-consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; }
.wlc .wlc-lead-consent label { flex: 1 1 200px; }
.wlc .wlc-lead-consent a { color: var(--wlc-brand); }
.wlc .wlc-lead-status { color: #b91c1c; font-size: 13px; font-weight: 600; }
.wlc .wlc-lead-status:empty { display: none; }
.wlc .wlc-lead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wlc .wlc-lead-send { padding: 8px 16px; border: 0; border-radius: 999px; background: var(--wlc-brand); color: var(--wlc-on-brand); font-weight: 600; cursor: pointer; }
.wlc .wlc-lead-send:disabled { opacity: .6; }
.wlc .wlc-lead-skip { padding: 8px 14px; border: 1px solid var(--wlc-line); border-radius: 999px; background: #fff; color: var(--wlc-muted); cursor: pointer; }
.wlc .wlc-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
