/* KALO Tesmatic: assistente do site (janela de chat). Usado com assets/js/chat.js. */
.chat__launch{position:fixed;right:var(--gutter);bottom:24px;z-index:145;display:inline-flex;align-items:center;gap:10px;padding:14px 20px;border:0;border-radius:2px;background:var(--blue-deep);color:#fff;font-family:var(--body);font-size:15px;font-weight:700;line-height:1;letter-spacing:.02em;cursor:pointer;box-shadow:0 0 0 1px rgba(255,255,255,.14),0 18px 40px rgba(19,19,34,.28);transition:transform .25s ease,box-shadow .25s ease,background .25s ease}
/* azul forte: le-se sobre branco e sobre o azul-marinho do rodape e das seccoes escuras */
.chat__launch:hover{transform:translateY(-3px);background:var(--blue);box-shadow:0 0 0 1px rgba(255,255,255,.14),0 22px 50px rgba(19,19,34,.34)}
.chat__launch:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.chat__launch svg{flex:0 0 auto}
.chat__launch[hidden]{display:none}
@media (max-width:900px){body:has(.sticky-cta.is-on) .chat__launch{bottom:96px}}
@media (max-width:560px){.chat__launch span{display:none}.chat__launch{padding:14px}}

.chat{position:fixed;right:var(--gutter);bottom:24px;z-index:160;display:flex;flex-direction:column;width:min(400px,calc(100vw - 2 * var(--gutter)));height:min(600px,calc(100dvh - 48px));background:#fff;color:var(--ink);border-radius:8px;box-shadow:0 30px 80px rgba(19,19,34,.36);overflow:hidden}
.chat[hidden]{display:none}
@media (max-width:560px){.chat{inset:0;width:auto;height:auto;border-radius:0}}

/* titulo e botoes na primeira linha; o subtitulo usa a largura toda por baixo */
.chat__head{display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:12px;padding:18px 20px;background:var(--navy);color:#fff}
.chat__head > div:first-child{display:contents}
.chat__t{grid-column:1;grid-row:1}
.chat__tools{grid-column:2;grid-row:1}
.chat__s{grid-column:1/-1;grid-row:2}
/* titulo como .modal h2, no minimo de --fs-d5 (19px) porque a janela e estreita */
.chat__t{margin:0;font-family:var(--display);font-weight:900;font-size:19px;line-height:1.1;letter-spacing:-.02em;text-transform:uppercase}
/* palavra em destaque no azul claro, como nos titulos sobre escuro (.path__h i) */
.chat__t i{font-style:normal;color:var(--blue-light)}
.chat__t:focus{outline:none}
.chat__s{margin:8px 0 0;font-family:var(--mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--on-navy-2)}
.chat__tools{display:flex;flex:0 0 auto;margin:-10px -10px -10px 0}
.chat__x,.chat__new{display:grid;place-items:center;width:44px;height:44px;border:0;background:none;color:#fff;font-size:24px;line-height:1;cursor:pointer}
.chat__x:hover,.chat__new:hover{color:var(--blue-light)}
.chat__x:focus-visible,.chat__new:focus-visible{outline:2px solid var(--blue-light);outline-offset:-4px}

.chat__log{flex:1 1 auto;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px;background:var(--surface,#f6f7f9)}
/* texto das mensagens como as respostas das FAQ (.qa__a): 16px, entrelinha 1.6 */
.chat__m{max-width:86%;margin:0;padding:12px 16px;border-radius:8px;font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.chat__m--bot{align-self:flex-start;background:#fff;color:var(--slate);border:1px solid var(--line);border-top-left-radius:2px}
.chat__m--me{align-self:flex-end;background:var(--navy);color:#fff;border-top-right-radius:2px}
.chat__m a{color:var(--blue-deep,var(--blue));font-weight:600}
.chat__m ul{margin:6px 0;padding-left:18px}
.chat__m p{margin:0 0 8px}.chat__m p:last-child{margin:0}
.chat__m--wait{display:inline-flex;gap:5px;align-items:center}
.chat__m--wait i{width:6px;height:6px;border-radius:50%;background:var(--muted,#8a8f98);animation:chatDot 1s infinite ease-in-out}
.chat__m--wait i:nth-child(2){animation-delay:.15s}.chat__m--wait i:nth-child(3){animation-delay:.3s}
@keyframes chatDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.chat__m--wait i{animation:none}}

.chat__form{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line);background:#fff}
/* campo como .fld input */
.chat__in{flex:1 1 auto;min-height:52px;max-height:120px;resize:none;padding:14px 16px;border:1px solid var(--edge-strong);border-radius:2px;font-family:var(--body);font-size:16px;line-height:1.4;color:var(--ink);transition:border-color .25s ease}
.chat__in::placeholder{color:var(--muted)}
.chat__in:hover{border-color:var(--muted)}
.chat__in:focus{outline:none;border-color:var(--blue)}
.chat__go{flex:0 0 auto;width:52px;border:0;border-radius:2px;background:var(--navy);color:#fff;font-family:var(--body);font-size:20px;line-height:1;cursor:pointer;transition:background .25s ease}
.chat__go:hover:not(:disabled){background:var(--navy-lift)}
.chat__go:disabled{opacity:.45;cursor:default}
/* nota como .modal__note */
.chat__note{margin:0;padding:0 12px 12px;background:#fff;font-family:var(--mono);font-size:12px;line-height:1.5;color:var(--muted)}
.chat__note a{color:inherit}
