/* FUNESBOM · assistente v3 — janela de conversa
   Paleta do site: vinho #7A1D1B/#4E1111, dourado #C8912F/#E8C57A, fundo #F6F3F3, tinta #211C1C.
   Tudo com prefixo .fba para não colidir com Astra/Elementor. */
.fba{--v:#7A1D1B;--v9:#4E1111;--v6:#8A231E;--ouro:#C8912F;--ouro2:#E8C57A;--tinta:#211C1C;--cinza:#5B5454;--linha:#E9E3E3;
  --fundo:#F6F3F3;--r:16px;--sombra:0 24px 60px rgba(78,17,17,.28),0 4px 14px rgba(33,28,28,.12);
  --fd:'Montserrat',system-ui,'Segoe UI',Arial,sans-serif;--ft:'Roboto','Lato',system-ui,'Segoe UI',Arial,sans-serif;
  --vh:100dvh;font-family:var(--ft);color:var(--tinta);font-size:16px;line-height:1.5}
.fba *,.fba *::before,.fba *::after{box-sizing:border-box}
:where(.fba) button{font:inherit;color:inherit;cursor:pointer}
.fba svg{width:1.15em;height:1.15em;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fba :focus-visible{outline:3px solid var(--ouro);outline-offset:2px}
.fba .fb-sr{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ------------------------------------------------ lançador: pílula no computador, círculo no celular */
.fba-lancador{position:fixed;z-index:2147482000;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));
  display:flex;align-items:center;gap:10px;height:56px;padding:0 22px 0 8px;border:0;border-radius:999px;
  background:linear-gradient(135deg,var(--v6),var(--v9));color:#fff;box-shadow:0 10px 28px rgba(78,17,17,.35);
  transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease}
.fba-lancador:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(78,17,17,.42)}
.fba-lancador-ico{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--ouro);color:var(--v9)}
.fba-lancador-ico svg{width:22px;height:22px}
.fba-lancador-txt{font-family:var(--fd);font-weight:700;font-size:15px;letter-spacing:.01em;white-space:nowrap}
.fba-lancador-txt small{display:block;font:400 12px/1.2 var(--ft);opacity:.85;letter-spacing:0}
.fba[data-aberto="1"] .fba-lancador,.fba[data-recolhido="1"] .fba-lancador,.fba[data-captcha="1"] .fba-lancador{opacity:0;pointer-events:none;transform:scale(.8)}
@media (max-width:599px){
  .fba-lancador{right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));width:58px;height:58px;padding:0;justify-content:center}
  .fba-lancador-ico{width:58px;height:58px;background:transparent;color:#fff}
  .fba-lancador-ico svg{width:26px;height:26px}
  .fba-lancador-txt{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}

/* ------------------------------------------------ janela */
.fba-janela{position:fixed;z-index:2147483000;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));
  width:min(410px,calc(100vw - 40px));height:min(680px,calc(var(--vh) - 40px));display:flex;flex-direction:column;
  background:#fff;border-radius:22px;box-shadow:var(--sombra);overflow:hidden;transform-origin:bottom right;
  transition:opacity .18s ease,transform .22s cubic-bezier(.2,.8,.2,1)}
.fba-janela[hidden]{display:none}
.fba-janela.fba-entrando{opacity:0;transform:translateY(12px) scale(.96)}
@media (max-width:599px){
  .fba-janela{inset:0;right:0;bottom:auto;width:100%;height:var(--vh);border-radius:0;transform-origin:bottom center}
  .fba-janela.fba-entrando{transform:translateY(40px)}
}

.fba-topo{display:flex;align-items:center;gap:12px;padding:14px 12px 14px 16px;color:#fff;
  background:radial-gradient(120% 140% at 0% 0%,var(--v6) 0%,var(--v) 45%,var(--v9) 100%);position:relative}
.fba-topo::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,var(--ouro),var(--ouro2),var(--ouro))}
.fba-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.12);
  box-shadow:inset 0 0 0 2px var(--ouro2);color:var(--ouro2)}
.fba-avatar svg{width:22px;height:22px;fill:currentColor;stroke:none}
.fba-topo-txt{flex:1;min-width:0}
.fba-topo h2{margin:0;font:800 16px/1.2 var(--fd);color:#fff;letter-spacing:.01em}
.fba-topo p{margin:2px 0 0;font-size:12.5px;color:#F3E7E7;display:flex;align-items:center;gap:6px}
.fba-topo p::before{content:"";width:8px;height:8px;border-radius:50%;background:#7BD88F;box-shadow:0 0 0 3px rgba(123,216,143,.25)}
.fba-ic{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:#fff}
.fba-ic:hover{background:rgba(255,255,255,.12)}

.fba-faixa193{display:flex;align-items:center;gap:10px;padding:10px 16px;background:#FDECEC;color:#8B1212;font-weight:700;font-size:14px;
  border-bottom:1px solid #F5C9C9;text-decoration:none}
.fba-faixa193[hidden]{display:none}
.fba-faixa193 b{font:900 18px/1 var(--fd);color:#B3151B}

/* ------------------------------------------------ conversa */
.fba-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:18px 14px 8px;background:var(--fundo);
  scroll-behavior:smooth;display:flex;flex-direction:column;gap:10px}
.fba-msg{max-width:88%;animation:fba-sobe .22s ease both}
.fba-bot{align-self:flex-start;max-width:96%}
.fba-eu{align-self:flex-end;background:var(--v);color:#fff;padding:10px 14px;border-radius:18px 18px 4px 18px;font-size:15px;overflow-wrap:anywhere}
.fba-bolha{background:#fff;border:1px solid var(--linha);padding:12px 14px;border-radius:4px 18px 18px 18px;font-size:15px;
  box-shadow:0 1px 2px rgba(33,28,28,.05)}
.fba-bolha p{margin:0}
.fba-bolha p+p{margin-top:8px}
@keyframes fba-sobe{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* resposta completa: cartão */
.fba-cartao{background:#fff;border:1px solid var(--linha);border-radius:4px 18px 18px 18px;overflow:hidden;box-shadow:0 2px 8px rgba(33,28,28,.06)}
.fba-cartao-tit{display:flex;align-items:center;gap:8px;margin:0;padding:12px 14px 0;font:800 15px/1.3 var(--fd);color:var(--v9)}
.fba-cartao-tit svg{color:var(--ouro)}
.fba-cartao-txt{padding:6px 14px 12px;font-size:15px}
.fba-cartao-txt p{margin:0}
.fba-aviso{display:flex;gap:8px;align-items:flex-start;margin:0 14px 12px;padding:10px 12px;border-radius:12px;background:#FBF1DF;color:#5C3A06;font-size:13.5px;line-height:1.45}
.fba-aviso svg{color:#9A6510;margin-top:2px}
.fba-docs{margin:0 14px 12px;border:1px solid var(--linha);border-radius:12px;background:#FCFAFA}
.fba-docs summary{display:flex;align-items:center;gap:8px;padding:10px 12px;font-weight:700;font-size:14px;color:var(--v);cursor:pointer;list-style:none;min-height:44px}
.fba-docs summary::-webkit-details-marker{display:none}
.fba-docs summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .2s}
.fba-docs[open] summary::after{transform:rotate(-135deg)}
.fba-docs ul,.fba-docs ol{margin:0;padding:0 14px 12px 32px;font-size:14px;color:var(--cinza)}
.fba-docs li+li{margin-top:4px}
.fba-acoes{display:flex;flex-direction:column;gap:8px;padding:0 14px 14px}
.fba-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 16px;border-radius:12px;
  font:700 15px/1.2 var(--fd);text-decoration:none;text-align:center;border:2px solid transparent;transition:background .15s,transform .15s}
.fba-btn:active{transform:scale(.98)}
.fba-btn-p{background:var(--ouro);color:var(--tinta)}
.fba-btn-p:hover{background:#D9A23E}
.fba-btn-s{background:#fff;color:var(--v);border-color:#E3D2D2}
.fba-btn-s:hover{background:#FBF3F3}
.fba-btn-193{background:#B3151B;color:#fff;font-size:18px}
.fba-dica{margin:-2px 0 0;font-size:12.5px;color:var(--cinza);text-align:center}

/* escolhas (temas, dúvida, sugestões) */
.fba-escolhas{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px;animation:fba-sobe .22s ease both}
.fba-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:9px 14px;border-radius:999px;background:#fff;
  border:1.5px solid #E3D2D2;color:var(--v9);font-size:14.5px;font-weight:500;text-align:left;transition:border-color .15s,background .15s}
.fba-chip:hover{border-color:var(--v);background:#FBF3F3}
.fba-chip svg{color:var(--v)}
.fba-temas{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;animation:fba-sobe .22s ease both}
.fba-tema{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-height:88px;padding:12px;border-radius:14px;background:#fff;
  border:1.5px solid var(--linha);text-align:left;transition:border-color .15s,transform .15s,box-shadow .15s}
.fba-tema:hover{border-color:var(--ouro);transform:translateY(-1px);box-shadow:0 6px 14px rgba(78,17,17,.08)}
.fba-tema-ic{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#F8EDED;color:var(--v)}
.fba-tema b{font:700 14px/1.25 var(--fd);color:var(--v9)}
.fba-tema small{font-size:12.5px;line-height:1.35;color:var(--cinza)}
.fba-lista{display:flex;flex-direction:column;gap:6px;width:100%;animation:fba-sobe .22s ease both}
.fba-lista .fba-chip{border-radius:12px;width:100%;justify-content:space-between}
.fba-lista .fba-chip::after{content:"";width:7px;height:7px;border-right:2px solid var(--v);border-top:2px solid var(--v);transform:rotate(45deg);flex:none}

/* digitando */
.fba-digitando{display:inline-flex;gap:5px;padding:14px 16px}
.fba-digitando i{width:7px;height:7px;border-radius:50%;background:#B9A9A9;animation:fba-pulo 1s infinite ease-in-out}
.fba-digitando i:nth-child(2){animation-delay:.15s}.fba-digitando i:nth-child(3){animation-delay:.3s}
@keyframes fba-pulo{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}

/* ------------------------------------------------ sugestões enquanto digita + campo */
.fba-sugere{display:flex;gap:6px;overflow-x:auto;padding:8px 12px 0;background:#fff;scrollbar-width:none}
.fba-sugere::-webkit-scrollbar{display:none}
.fba-sugere[hidden]{display:none}
.fba-sugere .fba-chip{flex:none;min-height:38px;padding:6px 12px;font-size:13.5px;background:#FBF6F6;border-color:#EBDCDC}
.fba-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;background:#fff;border-top:1px solid var(--linha)}
.fba-campo{flex:1;min-height:48px;max-height:120px;resize:none;padding:12px 14px;border:1.5px solid #DCCFCF;border-radius:14px;
  font:16px/1.4 var(--ft);color:var(--tinta);background:#fff;overflow-y:auto;scrollbar-width:thin}
.fba-campo:focus{outline:none;border-color:var(--v);box-shadow:0 0 0 3px rgba(122,29,27,.15)}
.fba-campo::placeholder{color:#8C8282}
.fba-enviar{display:grid;place-items:center;width:48px;height:48px;border:0;border-radius:14px;background:var(--v);color:#fff;transition:background .15s,transform .15s}
.fba-enviar:hover{background:var(--v6)}
.fba-enviar:disabled{background:#CDBEBE;cursor:default}
.fba-rodape{margin:0;padding:0 12px 10px;background:#fff;font-size:11.5px;color:#7A7070;text-align:center}
@media (max-width:599px){.fba-rodape{padding-bottom:max(10px,env(safe-area-inset-bottom))}}

/* enquanto a janela está aberta, o botão do Ally não fica por cima dela */
body.fba-aberto #ea11y-root{visibility:hidden}
@media (max-width:599px){body.fba-aberto{overflow:hidden}}

@media (prefers-reduced-motion:reduce){
  .fba *,.fba{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media (forced-colors:active){.fba-btn,.fba-chip,.fba-tema,.fba-lancador{border:2px solid ButtonText}}
