/* AFBS Chat v4.4 — widget isolado do layout institucional */
.afbs-chat-widget{position:fixed;right:22px;bottom:22px;z-index:110;font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;font-size:14px;color:#102846}
.afbs-chat-trigger{display:flex;align-items:center;gap:10px;border:1px solid #b3daf5;color:#fff;background:#0b3f78;box-shadow:0 10px 25px rgba(7,50,102,.20);font-weight:750;border-radius:30px;padding:12px 17px;min-height:48px;transition:background .2s,transform .2s}
.afbs-chat-trigger:hover{background:#076ac2;transform:translateY(-2px)}.afbs-chat-trigger svg{width:19px;height:19px}.afbs-chat-dot{width:8px;height:8px;border-radius:50%;background:#48de9c;box-shadow:0 0 0 3px rgba(72,222,156,.16);margin-left:3px}
.afbs-chat-panel{position:absolute;right:0;bottom:64px;width:min(400px,calc(100vw - 28px));height:min(620px,calc(100dvh - 112px));max-height:calc(100dvh - 112px);display:flex;flex-direction:column;border:1px solid #cfe2f4;border-radius:19px;overflow:hidden;background:#fff;box-shadow:0 25px 70px rgba(6,39,78,.22)}
.afbs-chat-panel[hidden],.afbs-chat-intro[hidden],.afbs-chat-conversation[hidden]{display:none!important}
.afbs-chat-header{background:linear-gradient(115deg,#0c3768,#07599d);color:#fff;padding:17px 18px;display:flex;align-items:center;justify-content:space-between;gap:15px;flex:none}
.afbs-chat-heading{display:flex;align-items:center;gap:11px;min-width:0}.afbs-chat-avatar{display:grid;place-items:center;border-radius:12px;background:rgba(255,255,255,.16);width:40px;height:40px;font-size:18px;font-weight:900;flex:none}.afbs-chat-heading b{display:block;font-size:15px;line-height:1.35}.afbs-chat-heading small{display:block;color:#cae7fa;font-size:11px;line-height:1.4;margin-top:2px}.afbs-chat-close{background:transparent;color:white;border:0;font-size:27px;line-height:1;padding:4px;align-self:start}
.afbs-chat-intro{flex:1;overflow-y:auto;padding:23px 22px;background:#fff}.afbs-chat-intro h3{font-size:22px;letter-spacing:-.025em;line-height:1.25;margin:0 0 10px;color:#102846}.afbs-chat-intro p{font-size:13px;line-height:1.6;color:#526d86;margin:0 0 18px}.afbs-chat-intro label{display:flex;flex-direction:column;font-size:12px;font-weight:700;color:#294e6e;gap:6px;margin-bottom:12px}
.afbs-chat-intro input{height:43px;border:1px solid #ccdfef;border-radius:9px;padding:10px 12px;color:#102846;background:#fff;outline-color:#078ce9}.afbs-chat-primary{border:0;background:#0874ce;color:#fff;padding:11px 16px;border-radius:9px;font-weight:750;font-size:13px;display:inline-flex;align-items:center;justify-content:center;gap:6px}.afbs-chat-primary:hover{background:#075fae}.afbs-chat-intro .afbs-chat-primary{width:100%;min-height:44px}.afbs-chat-privacy{display:block;font-size:10.5px;color:#7890a8;margin-top:13px;line-height:1.55}
.afbs-chat-conversation{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fbfe}
.afbs-chat-feed{flex:1;overflow-y:auto;padding:18px 15px;display:flex;flex-direction:column;gap:10px;scrollbar-color:#c4dbee transparent}
.afbs-chat-msg{display:flex;flex-direction:column;gap:3px;max-width:87%;align-self:flex-start}.afbs-chat-msg[data-role=visitor]{align-self:flex-end}.afbs-chat-bubble{border:1px solid #dfebf5;background:#fff;color:#264763;border-radius:14px 14px 14px 4px;padding:10px 12px;font-size:12.7px;line-height:1.53;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 2px 8px rgba(23,57,93,.025)}
.afbs-chat-msg[data-role=visitor] .afbs-chat-bubble{background:#0c6cc3;color:#fff;border-color:#0c6cc3;border-radius:14px 14px 4px 14px}.afbs-chat-msg[data-role=agent] .afbs-chat-bubble{background:#ecf7ff;border-color:#badcf4}.afbs-chat-msg[data-role=system] .afbs-chat-bubble{background:#eff2f6;color:#52657a;font-style:italic}.afbs-chat-meta{font-size:10px;color:#7790a6;padding-inline:5px}
.afbs-chat-actions{padding:9px 14px 7px;background:#fff;border-top:1px solid #e4eef7;display:flex;gap:7px;flex-wrap:wrap}.afbs-chat-chip{font-size:11px;border:1px solid #c9e0f2;color:#135e9d;background:#f4faff;border-radius:20px;padding:6px 9px;white-space:nowrap}.afbs-chat-chip:hover{background:#e1f2fe}.afbs-chat-compose{display:flex;gap:8px;background:#fff;padding:9px 12px;border-top:1px solid #e4eef7;align-items:flex-end}.afbs-chat-compose textarea{resize:none;flex:1;max-height:85px;min-height:42px;border:1px solid #cfe0ee;border-radius:10px;padding:10px 11px;font-size:13px;color:#193b5c;background:#fff;line-height:1.45}.afbs-chat-compose .afbs-chat-primary{min-height:42px;padding:10px 12px}.afbs-chat-footer{background:#fff;border-top:1px solid #e8eff6;padding:9px 13px 11px;display:flex;align-items:center;justify-content:space-between;gap:7px;flex-wrap:wrap}.afbs-chat-footer button,.afbs-chat-footer a{border:0;background:none;padding:0;color:#1769ac;font-size:11px;font-weight:700;text-decoration:none}.afbs-chat-footer a{color:#0a8464}.afbs-chat-footer button:hover,.afbs-chat-footer a:hover{text-decoration:underline}
.afbs-chat-status{font-size:10.8px;color:#40688a;display:flex;gap:6px;align-items:center;margin:0 0 3px}.afbs-chat-status::before{content:'';display:block;width:7px;height:7px;flex:none;background:#4dbf8f;border-radius:50%}.afbs-chat-status.offline::before{background:#efa647}
@media(max-width:520px){.afbs-chat-widget{right:12px;bottom:12px}.afbs-chat-trigger{padding:12px 14px}.afbs-chat-panel{bottom:59px;width:calc(100vw - 24px);max-height:calc(100dvh - 86px);height:min(630px,calc(100dvh - 86px))}.afbs-chat-heading b{font-size:14px}}
@media(prefers-reduced-motion:reduce){.afbs-chat-trigger{transition:none}}
