/* Assistente virtual (chat com IA) */
.chat-botao{position:fixed;right:clamp(16px,3vw,28px);bottom:clamp(16px,3vw,28px);z-index:61;display:flex;align-items:center;gap:12px;border:0;background:none;padding:0;cursor:pointer;font:inherit;transition:opacity .2s,transform .2s}
.chat-botao.com-wa{bottom:calc(clamp(16px,3vw,28px) + 78px)}
.chat-botao .chat-dica{background:#fff;color:#0B2424;font-size:14px;font-weight:600;padding:10px 14px;border-radius:14px;box-shadow:0 12px 30px -12px rgba(0,0,0,.35);opacity:0;transform:translateX(8px);transition:opacity .2s,transform .2s;white-space:nowrap}
.chat-botao:hover .chat-dica,.chat-botao:focus-visible .chat-dica{opacity:1;transform:none}
.chat-bola{width:64px;height:64px;border-radius:50%;background:#0B2524;color:#fff;display:flex;align-items:center;justify-content:center;transition:transform .2s;border:2px solid #14937D}
.chat-botao:hover .chat-bola{transform:scale(1.06)}
.chat-botao.oculto,.chat-aberto .chat-botao{opacity:0;pointer-events:none;transform:translateY(16px)}

.chat-painel{position:fixed;right:clamp(12px,3vw,28px);bottom:clamp(12px,3vw,28px);z-index:70;width:min(400px,calc(100vw - 24px));height:min(620px,calc(100vh - 24px));height:min(620px,calc(100dvh - 24px));background:#fff;border-radius:22px;box-shadow:0 30px 70px -20px rgba(11,37,36,.55);display:flex;flex-direction:column;overflow:hidden;font-family:Inter,system-ui,sans-serif;color:#0B2424}
.chat-painel[hidden]{display:none}
.chat-cab{background:#0B2524;color:#fff;padding:16px 16px 14px 18px;display:flex;align-items:center;gap:12px}
.chat-cab .chat-avatar{width:40px;height:40px;border-radius:50%;background:#14937D;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.chat-cab b{display:block;font-size:15px}
.chat-cab small{display:block;font-size:12px;color:#A9C7C2;margin-top:2px}
.chat-fechar{margin-left:auto;background:rgba(255,255,255,.1);border:0;color:#fff;width:36px;height:36px;border-radius:50%;cursor:pointer;font-size:20px;line-height:1}
.chat-fechar:hover{background:rgba(255,255,255,.2)}
.chat-corpo{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:#F4F8F7;overscroll-behavior:contain}
.chat-msg{max-width:88%;padding:10px 13px;border-radius:16px;font-size:14.5px;line-height:1.5;overflow-wrap:anywhere}
.chat-msg.ia{background:#fff;border:1px solid #DDE8E6;border-bottom-left-radius:6px;align-self:flex-start}
.chat-msg.eu{background:#14937D;color:#fff;border-bottom-right-radius:6px;align-self:flex-end;white-space:pre-wrap}
.chat-msg.erro{background:#FDE8E5;color:#8E2B20;align-self:flex-start}
.chat-msg a{color:#0F6E5C;font-weight:600}
.chat-msg ul{margin:6px 0;padding-left:18px}
.chat-msg p{margin:0 0 8px}
.chat-msg p:last-child{margin:0}
.chat-digitando{display:inline-flex;gap:4px;align-items:center}
.chat-digitando i{width:7px;height:7px;border-radius:50%;background:#7FA9A2;animation:chatPisca 1.2s infinite}
.chat-digitando i:nth-child(2){animation-delay:.2s}
.chat-digitando i:nth-child(3){animation-delay:.4s}
@keyframes chatPisca{0%,80%,100%{opacity:.3}40%{opacity:1}}
.chat-sugestoes{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}
.chat-sugestoes button{border:1px solid #BFE3D7;background:#fff;color:#0F6E5C;border-radius:999px;padding:8px 12px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;text-align:left}
.chat-sugestoes button:hover{background:#E6F5F0}
.chat-form{display:flex;gap:8px;padding:12px;border-top:1px solid #E7EFED;background:#fff}
.chat-form textarea{flex:1;resize:none;border:1px solid #C9D9D6;border-radius:14px;padding:11px 12px;font:inherit;font-size:16px;max-height:120px;min-height:46px;line-height:1.4;color:#0B2424}
.chat-form textarea:focus{outline:2px solid #14937D;outline-offset:0;border-color:transparent}
.chat-form button{width:46px;height:46px;border-radius:50%;border:0;background:#14937D;color:#fff;cursor:pointer;flex:0 0 auto;display:flex;align-items:center;justify-content:center;align-self:flex-end}
.chat-form button[disabled]{opacity:.5;cursor:default}
.chat-aviso{font-size:11.5px;color:#56777C;padding:0 14px 10px;background:#fff;line-height:1.4}
.chat-aviso a{color:#0F6E5C}
@media (max-width:640px){
  .chat-painel{right:0;bottom:0;width:100vw;height:100dvh;border-radius:0}
  .chat-botao .chat-dica{display:none}
  .chat-bola{width:56px;height:56px}
  .chat-botao.com-wa{bottom:calc(16px + 74px)}
}
@media (prefers-reduced-motion:reduce){.chat-digitando i{animation:none}}

/* Brilho redondo em volta do botão (o box-shadow aparecia quadrado no Safari do iPhone). */
.chat-bola{position:relative}
.chat-bola::before{content:'';position:absolute;left:-16px;right:-16px;top:-10px;bottom:-26px;border-radius:50%;background:radial-gradient(closest-side,rgba(11,37,36,.45),rgba(11,37,36,0));z-index:-1;pointer-events:none}
