#mbi-chat-wrap{
  position:fixed; right:22px; bottom:22px; z-index:400;
  display:flex; align-items:center; gap:10px;
}
#mbi-chat-label{
  background:#0A1230; color:#F3F6FC; font-family:'Inter', sans-serif;
  font-size:13px; font-weight:600; padding:10px 16px; border-radius:999px;
  box-shadow:0 8px 20px -6px rgba(20,45,90,0.35);
  white-space:nowrap;
  animation:mbiLabelIn 0.4s ease 1s both;
}
#mbi-chat-label small{ display:block; font-weight:400; font-size:11px; color:#8FA3C7; margin-top:1px; }
@keyframes mbiLabelIn{
  from{ opacity:0; transform:translateX(8px); }
  to{ opacity:1; transform:translateX(0); }
}
#mbi-chat-botao{
  position:relative;
  width:60px; height:60px; border-radius:50%; border:none;
  background:#25D366;
  box-shadow:0 10px 26px -6px rgba(37,211,102,0.6);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:transform 0.2s ease;
  flex:0 0 60px;
  animation:mbiPulseGlow 2.2s ease-in-out infinite;
}
#mbi-chat-botao::before{
  content:''; position:absolute; inset:0; border-radius:50%;
  background:#25D366; z-index:-1;
  animation:mbiPulseRing 2.2s ease-out infinite;
}
@keyframes mbiPulseGlow{
  0%, 100%{ box-shadow:0 10px 26px -6px rgba(37,211,102,0.6); }
  50%{ box-shadow:0 10px 34px -4px rgba(37,211,102,0.95); }
}
@keyframes mbiPulseRing{
  0%{ transform:scale(1); opacity:0.55; }
  100%{ transform:scale(1.9); opacity:0; }
}
@media (prefers-reduced-motion: reduce){
  #mbi-chat-botao, #mbi-chat-botao::before, #mbi-chat-label{ animation:none; }
}
#mbi-chat-botao:hover{ transform:translateY(-3px) scale(1.03); }
#mbi-chat-botao svg{ width:26px; height:26px; color:#fff; }
#mbi-chat-botao .mbi-chat-ponto{
  position:absolute; top:6px; right:6px; width:12px; height:12px; border-radius:50%;
  background:#FF5A5A; border:2px solid #ffffff; display:none;
}
#mbi-chat-botao.tem-novidade .mbi-chat-ponto{ display:block; }

#mbi-chat-painel{
  position:fixed; right:22px; bottom:94px; z-index:400;
  width:344px; max-width:calc(100vw - 32px); height:480px; max-height:calc(100vh - 140px);
  background:#0A1230; border:1px solid rgba(143,163,199,0.25); border-radius:16px;
  display:none; flex-direction:column; overflow:hidden;
  box-shadow:0 24px 60px -12px rgba(0,0,0,0.6);
  font-family:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color:#F3F6FC;
}
#mbi-chat-painel.aberto{ display:flex; }

#mbi-chat-conteudo{ flex:1; display:flex; flex-direction:column; min-height:0; overflow:hidden; }

.mbi-chat-topo{
  background:linear-gradient(120deg, #0D1B42, #122256);
  padding:16px 18px; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid rgba(143,163,199,0.2);
  flex:0 0 auto;
}
.mbi-chat-topo-info{ display:flex; flex-direction:column; }
.mbi-chat-topo-info strong{ font-size:14.5px; }
.mbi-chat-topo-info span{ font-size:11.5px; color:#7CDBFF; }
.mbi-chat-fechar{ background:none; border:none; color:#8FA3C7; cursor:pointer; padding:4px; }
.mbi-chat-fechar svg{ width:18px; height:18px; }

.mbi-chat-corpo{ flex:1 1 auto; min-height:0; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:8px; }
#mbi-chat-rodape-wrap{ flex:0 0 auto; }
.mbi-chat-msg{ max-width:80%; padding:9px 13px; border-radius:13px; font-size:13.5px; line-height:1.45; }
.mbi-chat-msg.visitante{ align-self:flex-end; background:linear-gradient(120deg, #1E4FD9, #2F6BFF); border-bottom-right-radius:3px; }
.mbi-chat-msg.admin{ align-self:flex-start; background:#122256; border-bottom-left-radius:3px; }
.mbi-chat-msg-hora{ display:block; font-size:10px; opacity:0.65; margin-top:4px; }

.mbi-chat-form-inicial{ padding:16px; display:flex; flex-direction:column; gap:10px; overflow-y:auto; min-height:0; }
.mbi-chat-form-inicial p{ font-size:12.5px; color:#8FA3C7; margin:0 0 4px; }
.mbi-chat-setores{ padding:16px; display:flex; flex-direction:column; gap:8px; overflow-y:auto; min-height:0; }
.mbi-chat-setores p{ font-size:12.5px; color:#8FA3C7; margin:0 0 6px; }
.mbi-chat-setor-btn{
  text-align:left; padding:12px 14px; border-radius:10px; border:1px solid rgba(143,163,199,0.25);
  background:rgba(255,255,255,0.03); color:#F3F6FC; cursor:pointer; font-family:inherit;
}
.mbi-chat-setor-btn:hover{ border-color:#33C5FF; background:rgba(51,197,255,0.08); }
.mbi-chat-setor-btn strong{ display:block; font-size:13.5px; }
.mbi-chat-setor-btn span{ display:block; font-size:11.5px; color:#8FA3C7; margin-top:2px; }
.mbi-chat-form-inicial input, .mbi-chat-form-inicial select, .mbi-chat-form-inicial textarea{
  width:100%; box-sizing:border-box; background:rgba(255,255,255,0.05); border:1px solid rgba(143,163,199,0.25);
  border-radius:8px; padding:10px 12px; color:#F3F6FC; font-family:inherit; font-size:13px;
}
/* O menu suspenso do <select> é renderizado pelo navegador/SO, não pelo CSS do widget —
   forçamos texto escuro em fundo claro nas opções para não ficarem "brancas sobre brancas". */
.mbi-chat-form-inicial select option{ color:#101827; background:#ffffff; }
.mbi-chat-form-inicial textarea{ min-height:70px; resize:none; }
.mbi-chat-form-inicial input::placeholder, .mbi-chat-form-inicial textarea::placeholder{ color:#6C81A8; }
.mbi-chat-honeypot{ position:absolute; left:-9999px; opacity:0; }

.mbi-chat-rodape{ border-top:1px solid rgba(143,163,199,0.2); padding:10px 12px; display:flex; gap:8px; align-items:flex-end; flex:0 0 auto; }
.mbi-chat-rodape textarea{
  flex:1; resize:none; max-height:90px; min-height:38px; background:rgba(255,255,255,0.05);
  border:1px solid rgba(143,163,199,0.25); border-radius:10px; color:#F3F6FC; padding:9px 12px;
  font-family:inherit; font-size:13.5px;
}
.mbi-chat-rodape textarea::placeholder{ color:#6C81A8; }
.mbi-chat-enviar{
  width:38px; height:38px; border-radius:10px; border:none; flex:0 0 38px;
  background:linear-gradient(120deg, #1E4FD9, #33C5FF); color:#fff; display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.mbi-chat-enviar svg{ width:16px; height:16px; }
.mbi-chat-btn{
  padding:11px; border-radius:9px; border:none; background:linear-gradient(120deg, #1E4FD9, #33C5FF);
  color:#fff; font-weight:600; font-size:13.5px; cursor:pointer;
}
.mbi-chat-status{ text-align:center; font-size:11.5px; color:#6C81A8; padding:6px 0 0; }

@media (max-width: 460px){
  #mbi-chat-painel{ right:16px; left:16px; width:auto; bottom:88px; }
  #mbi-chat-botao{ right:16px; bottom:16px; }
}
