/* CM Bot de Triagem — estilos isolados sob .cmt- (não depende do cm-color-system; fallbacks embutidos). */
:root{
  /* PALETA DE MARCA — hex DIRETO (proposital). As vars oficiais --cm-navy-500/--cm-ouro-500
     estão DEFINIDAS-VAZIAS no site → `var(--cm-navy-500, #fallback)` descarta o fallback e
     resolve vazio (fundo transparente). Por isso NÃO referenciamos --cm-* aqui. Valores =
     navy #1B365D (o que de fato renderiza em cm-search/cm-sub-fab = rgb(27,54,93)) e
     ouro #C9A227 (marca). Fonte da paleta nas configurações: Aparência → Personalizar →
     Cores Globais (Kadence, --global-palette*). Ver memória project_cm_palette_vars_vazias. */
  --cmt-navy:   #1B365D;
  --cmt-navy-d: #122544;
  --cmt-gold:   #C9A227;
  --cmt-wa:     #25D366;   /* verde WhatsApp — convenção do site (diag/dor/CNIS) */
  --cmt-ink:    #15233a;
  --cmt-muted:  #5b6779;
  --cmt-line:   #e2e6ee;
  --cmt-bg:     #ffffff;
  --cmt-soft:   #f6f8fc;
  --cmt-radius: 14px;
  --cmt-shadow: 0 18px 50px rgba(10,19,33,.28);
}

/* ───── launcher ───── */
/* canto inferior ESQUERDO: evita aglomeração com Agendar/sino (que ficam à direita) */
.cmt-launcher-wrap{ position:fixed; left:18px; bottom:18px; z-index:999990; }
.cmt-launcher{
  position:relative;
  display:inline-flex; align-items:center; gap:10px;
  padding:11px 16px 11px 13px; border:none; cursor:pointer;
  background:var(--cmt-navy); color:#fff; border-radius:999px;
  box-shadow:var(--cmt-shadow); font-family:inherit;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
  max-width:min(82vw,330px);
}
.cmt-launcher-dismiss{
  position:absolute; top:-8px; right:-8px; width:24px; height:24px; border-radius:50%;
  border:none; cursor:pointer; background:#fff; color:var(--cmt-navy);
  box-shadow:0 2px 8px rgba(0,0,0,.25); font-size:16px; line-height:1; font-family:inherit;
  display:flex; align-items:center; justify-content:center; padding:0;
}
.cmt-launcher-dismiss:hover{ background:#f0f0f0; }
.cmt-launcher-dismiss:focus-visible{ outline:2px solid var(--cmt-gold); outline-offset:1px; }
.cmt-launcher:hover{ transform:translateY(-2px); background:var(--cmt-navy-d); }
.cmt-launcher:focus-visible{ outline:3px solid var(--cmt-gold); outline-offset:2px; }
.cmt-launcher-ic{ font-size:20px; line-height:1; flex:0 0 auto; }
.cmt-launcher-tx{ display:flex; flex-direction:column; text-align:left; line-height:1.18; min-width:0; }
.cmt-launcher-tx strong{ font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cmt-launcher-tx small{ font-size:11.5px; opacity:.82; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ───── overlay + card ───── */
.cmt-overlay{
  position:fixed; inset:0; z-index:999999; display:none;
  align-items:center; justify-content:center;
  background:rgba(10,19,33,.55); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  padding:20px;
}
.cmt-overlay.cmt-active{ display:flex; }
body.cmt-lock{ overflow:hidden; }
.cmt-card{
  width:100%; max-width:440px; max-height:86vh; display:flex; flex-direction:column;
  background:var(--cmt-bg); color:var(--cmt-ink); border-radius:var(--cmt-radius);
  box-shadow:var(--cmt-shadow); overflow:hidden; font-family:inherit;
  animation:cmt-in .22s ease;
}
@keyframes cmt-in{ from{opacity:0; transform:translateY(12px) scale(.98);} to{opacity:1; transform:none;} }

.cmt-head{ display:flex; align-items:center; gap:10px; padding:16px 18px; background:var(--cmt-navy); color:#fff; }
.cmt-head-title{ font-size:16px; font-weight:600; flex:1; }
.cmt-close{ background:transparent; border:none; color:#fff; font-size:26px; line-height:1; cursor:pointer; width:34px; height:34px; border-radius:50%; transition:background .15s; }
.cmt-close:hover{ background:rgba(255,255,255,.16); }

.cmt-nav{ display:flex; align-items:center; justify-content:space-between; padding:8px 14px; border-bottom:1px solid var(--cmt-line); background:var(--cmt-soft); }
.cmt-back,.cmt-restart{ background:transparent; border:none; cursor:pointer; font-family:inherit; font-size:13px; color:var(--cmt-navy); padding:4px 8px; border-radius:8px; }
.cmt-back:hover,.cmt-restart:hover{ background:rgba(27,54,93,.08); }
.cmt-restart{ color:var(--cmt-muted); }

.cmt-body{ padding:16px 18px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.cmt-foot{ padding:10px 18px; font-size:11px; color:var(--cmt-muted); border-top:1px solid var(--cmt-line); background:var(--cmt-soft); line-height:1.45; }

.cmt-prompt{ margin:0 0 12px; font-size:15px; font-weight:600; color:var(--cmt-ink); }

/* ───── opções ───── */
.cmt-grid{ display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.cmt-opt{ display:flex; align-items:center; gap:9px; width:100%; text-align:left; cursor:pointer; font-family:inherit;
  background:#fff; border:1.5px solid var(--cmt-line); border-radius:11px; padding:12px 13px; font-size:14px; color:var(--cmt-ink);
  transition:border-color .15s, background .15s, transform .1s; }
.cmt-opt:hover{ border-color:var(--cmt-gold); background:#fffdf5; }
.cmt-opt:active{ transform:scale(.99); }
.cmt-opt:focus-visible{ outline:3px solid var(--cmt-gold); outline-offset:1px; }
.cmt-opt-area{ flex-direction:column; align-items:flex-start; gap:6px; min-height:74px; justify-content:center; }
.cmt-opt-ic{ font-size:22px; line-height:1; }
.cmt-opt-lb{ font-weight:600; line-height:1.25; }
.cmt-list{ display:flex; flex-direction:column; gap:8px; }
.cmt-opt-dor,.cmt-opt-moment{ font-weight:500; }

.cmt-notfound{ display:block; width:100%; margin-top:14px; background:transparent; border:1px dashed var(--cmt-line); color:var(--cmt-muted);
  border-radius:10px; padding:10px; font-family:inherit; font-size:13px; cursor:pointer; }
.cmt-notfound:hover{ border-color:var(--cmt-navy); color:var(--cmt-navy); }

/* ───── roteamento ───── */
.cmt-route-head{ margin:0 0 6px; font-size:16px; font-weight:700; color:var(--cmt-navy); }
.cmt-route-intro{ margin:0 0 14px; font-size:13.5px; line-height:1.5; color:var(--cmt-muted); }
.cmt-actions{ display:flex; flex-direction:column; gap:9px; }
.cmt-act{ display:flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; text-align:center;
  padding:13px 16px; border-radius:11px; font-size:14.5px; font-weight:600; font-family:inherit; cursor:pointer; transition:filter .15s, transform .1s; }
.cmt-act:active{ transform:scale(.99); }
.cmt-act-tool{ background:var(--cmt-navy); color:#fff; }
.cmt-act-ajuda{ background:#fff; color:var(--cmt-navy); border:1.5px solid var(--cmt-navy); }
.cmt-act-wa{ background:var(--cmt-wa); color:#fff; }
.cmt-act-agendar{ background:var(--cmt-gold); color:#1a1405; }
.cmt-act:hover{ filter:brightness(1.05); }

/* ───── lead ───── */
.cmt-lead{ margin-top:18px; padding-top:16px; border-top:1px solid var(--cmt-line); }
.cmt-lead-title{ margin:0 0 3px; font-size:14.5px; font-weight:700; color:var(--cmt-ink); }
.cmt-lead-sub{ margin:0 0 12px; font-size:12.5px; color:var(--cmt-muted); }
.cmt-form{ display:flex; flex-direction:column; gap:9px; }
.cmt-field input{ width:100%; box-sizing:border-box; padding:11px 13px; border:1.5px solid var(--cmt-line); border-radius:10px;
  font-size:14px; font-family:inherit; color:var(--cmt-ink); -webkit-text-fill-color:var(--cmt-ink); background:#fff; transition:border-color .15s; }
.cmt-field input:focus{ outline:none; border-color:var(--cmt-gold); box-shadow:0 0 0 3px rgba(201,162,39,.18); }
.cmt-hp{ position:absolute !important; left:-9999px !important; width:1px; height:1px; overflow:hidden; }
.cmt-consent{ display:flex; align-items:flex-start; gap:9px; font-size:12px; color:var(--cmt-muted); line-height:1.45; cursor:pointer; }
.cmt-consent input{ margin-top:2px; flex:0 0 auto; width:16px; height:16px; }
.cmt-submit{ margin-top:4px; padding:13px 16px; background:var(--cmt-navy); color:#fff; border:none; border-radius:11px;
  font-size:14.5px; font-weight:600; font-family:inherit; cursor:pointer; transition:background .15s; }
.cmt-submit:hover{ background:var(--cmt-navy-d); }
.cmt-submit:disabled{ opacity:.65; cursor:default; }
.cmt-form-msg{ font-size:12.5px; min-height:1px; }
.cmt-form-msg.cmt-err{ color:#b3261e; }

/* ───── obrigado ───── */
.cmt-thanks{ text-align:center; padding:18px 6px; display:flex; flex-direction:column; align-items:center; gap:12px; }
.cmt-thanks-ic{ width:54px; height:54px; border-radius:50%; background:var(--cmt-wa); color:#fff; font-size:30px; display:flex; align-items:center; justify-content:center; }
.cmt-thanks-tx{ margin:0; font-size:14.5px; line-height:1.5; color:var(--cmt-ink); }
.cmt-thanks .cmt-act{ width:100%; box-sizing:border-box; }

/* ───── busca ───── */
.cmt-search-input{ width:100%; box-sizing:border-box; padding:12px 14px; border:1.5px solid var(--cmt-line); border-radius:10px; font-size:15px; font-family:inherit; color:var(--cmt-ink); }
.cmt-search-input:focus{ outline:none; border-color:var(--cmt-gold); box-shadow:0 0 0 3px rgba(201,162,39,.18); }
.cmt-search-hint{ font-size:11.5px; color:var(--cmt-muted); margin:6px 2px 10px; }
.cmt-search-out{ display:flex; flex-direction:column; gap:4px; margin-bottom:14px; }
.cmt-search-group{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--cmt-navy); margin:10px 0 4px; }
.cmt-search-item{ display:flex; flex-direction:column; gap:2px; text-decoration:none; padding:9px 11px; border-radius:9px; background:var(--cmt-soft); color:var(--cmt-ink); transition:background .15s; }
.cmt-search-item:hover{ background:#eef2fa; }
.cmt-search-item strong{ font-size:13.5px; font-weight:600; line-height:1.3; }
.cmt-search-item span{ font-size:12px; color:var(--cmt-muted); line-height:1.4; }
.cmt-search-empty{ font-size:13px; color:var(--cmt-muted); padding:6px 2px; }

/* ───── DEFESA DE CONTRASTE (anti-sumiço no hover) ─────
   O tema (Kadence) aplica a:hover{color:var(--global-palette…)} e button:hover, cuja
   pseudo-classe vence classes simples e zera o contraste do texto sobre fundo escuro.
   Fixamos a cor em hover/focus/active com !important — o texto NUNCA some. */
.cmt-act-tool:hover,.cmt-act-tool:focus,.cmt-act-tool:focus-visible,.cmt-act-tool:active{ color:#fff !important; }
.cmt-act-wa:hover,.cmt-act-wa:focus,.cmt-act-wa:focus-visible,.cmt-act-wa:active{ color:#fff !important; }
.cmt-act-agendar:hover,.cmt-act-agendar:focus,.cmt-act-agendar:focus-visible,.cmt-act-agendar:active{ color:#1a1405 !important; }
.cmt-act-ajuda:hover,.cmt-act-ajuda:focus,.cmt-act-ajuda:focus-visible,.cmt-act-ajuda:active{ color:var(--cmt-navy) !important; background:var(--cmt-bg) !important; }
.cmt-launcher:hover,.cmt-launcher:focus,.cmt-launcher:focus-visible,.cmt-launcher:active{ color:#fff !important; }
.cmt-launcher:hover .cmt-launcher-tx strong,.cmt-launcher:hover .cmt-launcher-tx small,
.cmt-launcher:focus .cmt-launcher-tx strong,.cmt-launcher:focus .cmt-launcher-tx small{ color:#fff !important; }
.cmt-opt:hover,.cmt-opt:focus,.cmt-opt:focus-visible{ color:var(--cmt-ink) !important; }
.cmt-search-item:hover,.cmt-search-item:focus{ color:var(--cmt-ink) !important; }
.cmt-search-item:hover strong,.cmt-search-item:hover span{ color:var(--cmt-ink) !important; }
.cmt-notfound:hover,.cmt-notfound:focus{ color:var(--cmt-navy) !important; }
.cmt-back:hover,.cmt-back:focus,.cmt-restart:hover,.cmt-restart:focus{ color:var(--cmt-navy) !important; }
.cmt-close:hover,.cmt-close:focus{ color:#fff !important; }
.cmt-launcher-dismiss:hover,.cmt-launcher-dismiss:focus{ color:var(--cmt-navy) !important; }
.cmt-consent-link,.cmt-consent-link:hover,.cmt-consent-link:focus{ color:var(--cmt-navy) !important; text-decoration:underline; }
.cmt-submit:hover,.cmt-submit:focus,.cmt-submit:active{ color:#fff !important; }

/* ───── mobile: bottom sheet ───── */
@media (max-width:560px){
  /* mobile: FAB circular (só ícone) no canto inferior esquerdo — sem colidir com o Agendar (direita) */
  .cmt-launcher-wrap{ left:12px; bottom:12px; }
  .cmt-launcher{ width:54px; height:54px; padding:0; border-radius:50%; justify-content:center; }
  .cmt-launcher .cmt-launcher-tx{ display:none; }
  .cmt-launcher-ic{ font-size:24px; }
  .cmt-launcher-dismiss{ width:22px; height:22px; top:-6px; right:-6px; font-size:14px; }
  .cmt-overlay{ padding:0; align-items:flex-end; }
  .cmt-card{ max-width:100%; max-height:92vh; border-radius:18px 18px 0 0; }
  .cmt-grid{ grid-template-columns:1fr 1fr; }
  .cmt-close{ width:44px; height:44px; font-size:28px; }
  .cmt-back,.cmt-restart{ min-height:40px; padding:8px 12px; }
}
@media (prefers-reduced-motion: reduce){
  .cmt-card{ animation:none; }
  .cmt-launcher{ transition:none; }
}
