/* Chat de atendimento da loja (assets/js/chat.js) */
.tem-chat .whatsapp-fab{display:none!important}
.chat-fab{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:46;display:flex;align-items:center;gap:8px;height:56px;padding:0 20px 0 16px;border:0;border-radius:30px;background:var(--blue,#075DCF);color:#fff;font:600 15px/1 'DM Sans',system-ui,sans-serif;box-shadow:0 10px 26px #0a2c7a45;cursor:pointer;transition:transform .2s,box-shadow .2s}
.chat-fab:hover{transform:translateY(-2px);box-shadow:0 14px 30px #0a2c7a55}
.chat-fab:focus-visible{outline:3px solid #ffd529;outline-offset:3px}
.chat-fab svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.chat-fab .chat-fab-dot{position:absolute;top:-3px;right:-3px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--pink,#F9088E);color:#fff;font-size:12px;display:grid;place-items:center;border:2px solid #fff}
.chat-fab .chat-fab-online{width:9px;height:9px;border-radius:50%;background:#3ddc84;box-shadow:0 0 0 2px #ffffff80}
.chat-aberto .chat-fab{display:none}
@media (max-width:760px){
 .chat-fab{bottom:calc(76px + env(safe-area-inset-bottom));right:12px;width:56px;padding:0;justify-content:center}
 .chat-fab .chat-fab-txt{display:none}
 .chat-fab .chat-fab-online{position:absolute;bottom:6px;right:6px}
}

.chat-box{position:fixed;right:20px;bottom:20px;z-index:70;width:390px;height:min(640px,calc(100dvh - 40px));display:flex;flex-direction:column;background:#fff;border-radius:22px;box-shadow:0 24px 70px #10204a40,0 0 0 1px #10204a12;overflow:hidden;font:15px/1.45 'DM Sans',system-ui,sans-serif;color:var(--ink,#172C50);animation:chatIn .22s var(--ease,ease-out)}
.chat-box[hidden]{display:none!important}
@keyframes chatIn{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
@media (max-width:760px){.chat-box{inset:0;width:auto;height:100dvh;border-radius:0}}

.chat-top{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:linear-gradient(135deg,#0b3fb0,var(--blue,#075DCF));color:#fff}
.chat-av{width:42px;height:42px;border-radius:50%;background:#fff;display:grid;place-items:center;flex:none;font:800 17px/1 Outfit,sans-serif;color:var(--pink,#F9088E)}
.chat-top h2{margin:0;font:700 17px/1.2 Outfit,sans-serif;color:#fff}
.chat-st{display:flex;align-items:center;gap:6px;font-size:12.5px;opacity:.92;margin-top:2px}
.chat-st i{width:8px;height:8px;border-radius:50%;background:#ffd529;flex:none}
.chat-st.on i{background:#3ddc84}
.chat-top .chat-x{margin-left:auto;width:40px;height:40px;border:0;border-radius:50%;background:#ffffff26;color:#fff;font-size:24px;line-height:1;cursor:pointer;flex:none}
.chat-top .chat-x:hover{background:#ffffff40}

.chat-equipe{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 16px;background:#f2f6ff;border-bottom:1px solid #e3e9f6;font-size:13px;color:#4a5a78}
.chat-equipe button{border:1px solid #c9d6f3;background:#fff;color:var(--blue,#075DCF);font:600 13px/1 'DM Sans',sans-serif;padding:8px 12px;border-radius:20px;cursor:pointer;white-space:nowrap}
.chat-equipe button:hover{background:#e8efff}
.chat-equipe[hidden]{display:none}

.chat-msgs{flex:1;overflow-y:auto;padding:16px 14px 8px;background:#f7f9fd;display:flex;flex-direction:column;gap:8px;overscroll-behavior:contain}
.chat-m{max-width:84%;padding:10px 13px;border-radius:16px;white-space:pre-wrap;word-wrap:break-word;font-size:14.5px}
.chat-m.cli{align-self:flex-end;background:var(--blue,#075DCF);color:#fff;border-bottom-right-radius:5px}
.chat-m.bot,.chat-m.loja{align-self:flex-start;background:#fff;border:1px solid #e3e9f3;border-bottom-left-radius:5px}
.chat-m.loja{border-color:#ffc7e3;background:#fff6fb}
.chat-quem{display:block;font-size:11.5px;font-weight:700;color:#7b8aa6;margin-bottom:2px}
.chat-m.loja .chat-quem{color:var(--pink,#F9088E)}
.chat-util{display:flex;align-items:center;gap:4px;margin-top:6px;font-size:12px;color:#8592ab}
.chat-util button{border:1px solid #e0e6f1;background:#fff;border-radius:14px;padding:3px 9px;font-size:13px;cursor:pointer}
.chat-util button[aria-pressed=true]{background:#e9f0ff;border-color:#9fb6ec}
.chat-sis{align-self:center;max-width:92%;text-align:center;font-size:12.5px;color:#5f6d88;background:#eaf0fb;padding:7px 12px;border-radius:12px}
.chat-sis.ok{background:#e4f7ec;color:#1d6b3e}
.chat-card{align-self:stretch;background:#fff;border:1px solid #e3e9f3;border-radius:16px;padding:12px 13px;font-size:14px}
.chat-card p{margin:0 0 9px}
.chat-card .chat-btn{width:100%}
.chat-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:0;border-radius:12px;background:var(--pink,#F9088E);color:#fff;font:700 14.5px/1 'DM Sans',sans-serif;cursor:pointer;text-decoration:none;padding:0 14px}
.chat-btn.sec{background:#fff;color:var(--ink,#172C50);border:1px solid #d7dfec;margin-top:8px}
.chat-btn.wa{background:#1fae5c;margin-top:8px}
.chat-btn:disabled{opacity:.6;cursor:wait}
.chat-form label{display:block;font-size:12.5px;font-weight:600;color:#56647f;margin:8px 0 3px}
.chat-form input,.chat-form textarea{width:100%;box-sizing:border-box;border:1px solid #d5ddeb;border-radius:10px;padding:10px 11px;font:15px 'DM Sans',sans-serif;color:inherit;background:#fbfcff}
.chat-form textarea{min-height:76px;resize:vertical}
.chat-form input:focus,.chat-form textarea:focus{outline:2px solid #9db8f4;border-color:transparent}
.chat-form .chat-erro{color:#c3123f;font-size:13px;margin:6px 0 0;min-height:1em}
.chat-form button[type=submit]{margin-top:10px}

.chat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0 4px}
.chat-chips button{border:1px solid #cfdaf2;background:#fff;color:var(--blue,#075DCF);border-radius:18px;padding:8px 12px;font:600 13px/1.1 'DM Sans',sans-serif;cursor:pointer}
.chat-chips button:hover{background:#eef3ff}

.chat-dig{align-self:flex-start;background:#fff;border:1px solid #e3e9f3;border-radius:16px;padding:12px 14px;display:flex;gap:4px}
.chat-dig i{width:7px;height:7px;border-radius:50%;background:#9aa7c0;animation:chatDig 1s infinite}
.chat-dig i:nth-child(2){animation-delay:.15s}.chat-dig i:nth-child(3){animation-delay:.3s}
@keyframes chatDig{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}

.chat-pe{display:flex;align-items:flex-end;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #e7ecf5;background:#fff}
.chat-pe textarea{flex:1;max-height:110px;min-height:44px;border:1px solid #d5ddeb;border-radius:22px;padding:11px 15px;font:15px/1.35 'DM Sans',sans-serif;resize:none;color:inherit;background:#f9fbff}
.chat-pe textarea:focus{outline:2px solid #9db8f4;border-color:transparent}
.chat-env{width:44px;height:44px;flex:none;border:0;border-radius:50%;background:var(--blue,#075DCF);color:#fff;display:grid;place-items:center;cursor:pointer}
.chat-env:disabled{opacity:.5}
.chat-env svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.chat-aviso{font-size:11.5px;color:#8a96ad;text-align:center;padding:0 14px 8px;background:#fff}
@media (prefers-reduced-motion:reduce){.chat-box,.chat-dig i{animation:none}.chat-fab{transition:none}}
