.caamg-agent{position:fixed;right:22px;bottom:22px;z-index:2147482000;font-family:Inter,Arial,sans-serif;color:#1d2a34}
.caamg-agent-launch{display:flex;align-items:center;gap:9px;border:0;border-radius:999px;padding:11px 15px 11px 11px;background:var(--brand-action,#c8102e);color:#fff;box-shadow:0 12px 30px rgba(15,30,43,.24);font:800 12px/1 Inter,Arial,sans-serif;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
.caamg-agent-launch:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(15,30,43,.29)}
.caamg-agent-launch-icon,.caamg-agent-avatar{display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.17)}
.caamg-agent-launch-icon{width:28px;height:28px;font-size:16px}.caamg-agent-launch-label{white-space:nowrap}
.caamg-agent-panel{position:absolute;right:0;bottom:58px;width:min(390px,calc(100vw - 28px));height:min(610px,calc(100vh - 100px));display:none;grid-template-rows:auto minmax(0,1fr) auto auto auto;background:#fff;border:1px solid rgba(15,36,56,.13);border-radius:18px;overflow:hidden;box-shadow:0 24px 60px rgba(10,31,48,.26)}
.caamg-agent.open .caamg-agent-panel{display:grid}.caamg-agent.open .caamg-agent-launch-label{display:none}.caamg-agent.open .caamg-agent-launch{width:48px;height:48px;padding:10px;justify-content:center}
.caamg-agent-head{display:grid;grid-template-columns:38px minmax(0,1fr) 32px 32px;align-items:center;gap:9px;padding:13px 13px 12px;background:linear-gradient(135deg,var(--brand-primary,#0e2438),#173d59);color:#fff}
.caamg-agent-avatar{width:38px;height:38px;font-size:18px}.caamg-agent-head b{display:block;font-size:13px}.caamg-agent-head small{display:block;margin-top:3px;color:rgba(255,255,255,.72);font-size:9px}
.caamg-agent-close,.caamg-agent-reset{border:0;background:rgba(255,255,255,.1);color:#fff;width:30px;height:30px;border-radius:8px;cursor:pointer;font-size:18px;display:grid;place-items:center}.caamg-agent-reset{font-size:15px}.caamg-agent-close:hover,.caamg-agent-reset:hover{background:rgba(255,255,255,.18)}
.caamg-agent-messages{overflow:auto;padding:16px 14px 10px;background:linear-gradient(#f8fafb,#fff);scroll-behavior:smooth}
.caamg-agent-message{display:flex;margin-bottom:11px}.caamg-agent-message>div{max-width:88%;padding:10px 12px;border-radius:14px;font-size:11px;line-height:1.52;white-space:pre-wrap;word-break:break-word;box-shadow:0 1px 1px rgba(0,0,0,.03)}
.caamg-agent-message.bot>div{background:#fff;border:1px solid #e3e9ed;border-top-left-radius:5px}.caamg-agent-message.user{justify-content:flex-end}.caamg-agent-message.user>div{background:var(--brand-primary,#0e2438);color:#fff;border-top-right-radius:5px}
.caamg-agent-message.error>div{background:#fff3f4;border:1px solid #f0c7cd;color:#9d2134}

/* V5.8.2.4 — presença conversacional sem chamadas extras ao backend/IA. */
.caamg-agent-typing>div{display:flex;align-items:center;justify-content:center;min-width:52px;min-height:38px;color:#6d7982;padding:9px 12px}
.caamg-agent-typing-dots{display:inline-flex;align-items:center;gap:5px;height:12px}
.caamg-agent-typing-dot{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.28;transform:translateY(0);animation:caamgAgentTypingDot 1.05s ease-in-out infinite}
.caamg-agent-typing-dot:nth-child(2){animation-delay:.14s}.caamg-agent-typing-dot:nth-child(3){animation-delay:.28s}
@keyframes caamgAgentTypingDot{0%,60%,100%{opacity:.28;transform:translateY(0)}30%{opacity:.92;transform:translateY(-4px)}}
.caamg-agent-message.caamg-agent-typing-text>div{cursor:pointer;transition:border-color .18s ease,box-shadow .18s ease}
.caamg-agent-message.caamg-agent-typing-text>div:hover{border-color:#cbd8df;box-shadow:0 4px 14px rgba(17,43,61,.06)}
.caamg-agent-typewriter{display:inline}
.caamg-agent-message.caamg-agent-typing-text .caamg-agent-typewriter::after{content:"";display:inline-block;width:1.5px;height:1em;margin-left:2px;background:currentColor;vertical-align:-.12em;opacity:.78;animation:caamgAgentCaret .78s steps(1,end) infinite}
.caamg-agent-message.caamg-agent-typed .caamg-agent-typewriter::after{display:none}
@keyframes caamgAgentCaret{0%,48%{opacity:.78}49%,100%{opacity:0}}

.caamg-agent-sources{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.caamg-agent-source{display:inline-flex;align-items:center;gap:4px;border:1px solid #dce5ea;background:#f8fafb;color:#415462;border-radius:999px;padding:5px 8px;text-decoration:none;font-size:8.5px;font-weight:700}.caamg-agent-source:hover{border-color:#aebdc6;background:#fff}.caamg-agent-source span{opacity:.65;text-transform:uppercase;font-size:7px}
.caamg-agent-action{display:inline-flex;margin-top:8px;align-items:center;justify-content:center;padding:7px 10px;border-radius:8px;background:var(--brand-action,#c8102e);color:#fff!important;text-decoration:none;font-size:9px;font-weight:800}
.caamg-agent-quick{display:flex;gap:6px;overflow-x:auto;padding:8px 12px;border-top:1px solid #edf1f3;background:#fff;scrollbar-width:thin}.caamg-agent-quick button{flex:0 0 auto;border:1px solid #dfe6ea;background:#fff;color:#344954;border-radius:999px;padding:7px 9px;font-size:8.5px;font-weight:700;cursor:pointer}.caamg-agent-quick button:hover{border-color:var(--brand-action,#c8102e);color:var(--brand-action,#c8102e)}
.caamg-agent-form{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:8px;padding:10px 12px;border-top:1px solid #e7ecef;background:#fff}.caamg-agent-form textarea{resize:none;max-height:92px;border:1px solid #d8e1e6;border-radius:10px;padding:9px 10px;font:500 10px/1.45 Inter,Arial,sans-serif;color:#1d2a34;outline:none}.caamg-agent-form textarea:focus{border-color:var(--brand-action,#c8102e);box-shadow:0 0 0 3px rgba(200,16,46,.07)}.caamg-agent-form button{border:0;border-radius:10px;background:var(--brand-action,#c8102e);color:#fff;font-size:16px;cursor:pointer}.caamg-agent-form button:disabled{opacity:.55;cursor:not-allowed}
.caamg-agent-foot{padding:0 12px 10px;background:#fff;color:#84909a;font-size:7.5px;line-height:1.4}.caamg-agent .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:620px){.caamg-agent{right:12px;bottom:12px}.caamg-agent-panel{position:fixed;left:10px;right:10px;bottom:70px;width:auto;height:min(72vh,610px);border-radius:16px}.caamg-agent-launch{padding-right:12px}.caamg-agent-message>div{max-width:92%}}
@media(prefers-reduced-motion:reduce){.caamg-agent-launch,.caamg-agent-messages,.caamg-agent-message.caamg-agent-typing-text>div{transition:none;scroll-behavior:auto}.caamg-agent-typing-dot,.caamg-agent-message.caamg-agent-typing-text .caamg-agent-typewriter::after{animation:none}.caamg-agent-typing-dot{opacity:.62;transform:none}.caamg-agent-message.caamg-agent-typing-text .caamg-agent-typewriter::after{display:none}}
