/* Chat assistente IA — widget flutuante + overrides de variáveis do widget.
   Carregado DEPOIS de style.css de propósito: o :root abaixo sobrescreve
   --accent/--bg do tema principal (comportamento herdado do bloco inline).
   Externalizado do <style> inline para permitir CSP sem 'unsafe-inline'. */
:root {
  --accent: #4f8cff;
  --accent2: #2f6bdc;
  --panel: #16181d;
  --panel2: #1d2026;
  --line: #2a2d34;
  --bg: #0e0f12;
  --txt: #f4f5f7;
  --muted: #9aa0a8;
}
#chatToggle{position:fixed;right:20px;bottom:20px;z-index:9999;width:60px;height:60px;border-radius:50%;background:var(--accent);color:#fff;font-size:26px;box-shadow:0 8px 28px rgba(79,140,255,.45);display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;transition:transform .2s,background .2s}
#chatToggle:hover{transform:scale(1.07);background:var(--accent2)}
#chatToggle.hidden{display:none}
#chatPanel{position:fixed;right:20px;bottom:20px;z-index:10000;width:380px;height:560px;max-height:calc(100vh - 40px);background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.55);display:none;flex-direction:column;overflow:hidden;animation:chatIn .22s ease}
#chatPanel.open{display:flex}
@keyframes chatIn{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
.chat-head{padding:14px 16px;background:linear-gradient(135deg,var(--accent),var(--accent2));display:flex;align-items:center;gap:11px;color:#fff}
.chat-head .logo{font-size:24px}
.chat-head h3{margin:0;font-size:15px;font-weight:600;color:#fff}
.chat-head .st{font-size:12px;opacity:.85}
.chat-head .x{margin-left:auto;font-size:26px;color:#fff;background:none;border:none;cursor:pointer;line-height:1;opacity:.9;padding:0 4px}
.chat-head .x:hover{opacity:1}
.chat-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--bg)}
.bub{max-width:85%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.45;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.bub.a{background:var(--panel2);border:1px solid var(--line);color:var(--txt);align-self:flex-start;border-bottom-left-radius:4px}
.bub.u{background:var(--accent);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}
.bub.typing{color:var(--muted);font-style:italic}
.chat-in{padding:12px;border-top:1px solid var(--line);display:flex;gap:8px;background:var(--panel)}
.chat-in input{flex:1;padding:11px 14px;font-size:14px;border-radius:12px;border:1px solid #33373e;background:#11131a;color:#fff;outline:none}
.chat-in input:focus{border-color:var(--accent)}
.chat-in button{width:44px;border:none;border-radius:12px;background:var(--accent);color:#fff;font-size:17px;cursor:pointer}
.chat-in button:hover{background:var(--accent2)}
@media(max-width:480px){#chatPanel{right:0;bottom:0;width:100%;height:100%;max-height:100%;border-radius:0}#chatToggle{right:16px;bottom:16px}}
