/* VoltByte — painel do BYTE (assistente com IA). Abre acima do botão flutuante; em celular ocupa a tela. */
.byte{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(92px + env(safe-area-inset-bottom));z-index:80;width:min(400px,calc(100vw - 36px));height:min(640px,calc(100svh - 120px));
  opacity:0;transform:translateY(14px) scale(.98);transform-origin:100% 100%;transition:opacity .25s ease,transform .35s var(--ease);pointer-events:none}
.byte--visivel{opacity:1;transform:none;pointer-events:auto}
.byte[hidden]{display:none}
.byte-janela{display:flex;flex-direction:column;height:100%;background:var(--branco);border:1px solid var(--linha);border-radius:22px;overflow:hidden;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.28),0 8px 24px -8px rgba(0,0,0,.12)}
.byte-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

/* topo */
.byte-topo{display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;background:var(--tinta);color:#fff;flex:none}
.byte-av{width:42px;height:42px;border-radius:50%;background:radial-gradient(circle at 50% 35%,rgba(0,224,122,.35),rgba(0,224,122,.06) 70%);overflow:hidden;flex:none;display:flex;justify-content:center}
.byte-av img{height:76px;width:auto;max-width:none;margin-top:3px}
.byte-id{flex:1;min-width:0}
.byte-nome{font-weight:600;font-size:15px;line-height:1.2}
.byte-sub{font-size:12.5px;color:#A1A1A1;display:flex;align-items:center;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.byte-on{width:7px;height:7px;border-radius:50%;background:var(--verde2);box-shadow:0 0 0 3px rgba(0,224,122,.18);flex:none}
.byte-icone{width:36px;height:36px;border:0;border-radius:10px;background:transparent;color:#d4d4d4;display:grid;place-items:center;cursor:pointer;flex:none;transition:background .2s,color .2s}
.byte-icone:hover{background:rgba(255,255,255,.1);color:#fff}
.byte-icone svg{width:18px;height:18px}
.byte-icone[hidden]{display:none}

/* tela inicial com o aviso de privacidade */
.byte-inicio{flex:1;overflow:auto;padding:22px 22px 18px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px}
.byte-inicio[hidden],.byte-conversa[hidden]{display:none}
.byte-inicio-img{height:150px;width:auto;filter:drop-shadow(0 10px 10px rgba(0,0,0,.08));animation:byte-flutua 4.5s ease-in-out infinite}
.byte-ola{font-weight:600;font-size:20px;letter-spacing:-.02em;margin-top:4px}
.byte-inicio>p{font-size:14.5px;color:#444;line-height:1.55}
.byte-inicio .byte-priv{font-size:12.5px;color:var(--suave);background:var(--fundo);border:1px solid var(--linha);border-radius:12px;padding:10px 12px;text-align:left}
.byte-priv a{text-decoration:underline;text-underline-offset:2px}
.byte-comecar{margin-top:6px;width:100%;justify-content:center}
.byte-direto{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;color:var(--suave);padding:6px}
.byte-direto:hover{color:var(--tinta)}
.byte-direto svg,.byte-rodape svg,.byte-aviso-wa svg,.byte-brief-wa svg{width:16px;height:16px;color:#25D366;flex:none}

/* conversa */
.byte-conversa{flex:1;display:flex;flex-direction:column;min-height:0}
.byte-msgs{flex:1;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain;scroll-behavior:smooth}
.byte-msg{max-width:88%;padding:10px 13px;border-radius:16px;font-size:14.5px;line-height:1.5;overflow-wrap:anywhere}
.byte-msg--voce{align-self:flex-end;background:var(--tinta);color:#fff;border-bottom-right-radius:5px;white-space:pre-wrap}
.byte-msg--bot{align-self:flex-start;background:#F2F2F2;color:var(--tinta);border-bottom-left-radius:5px}
.byte-msg p+p,.byte-msg p+ul,.byte-msg ul+p{margin-top:7px}
.byte-msg ul{display:grid;gap:3px;margin-top:4px}
.byte-msg li{position:relative;padding-left:14px}
.byte-msg li::before{content:"";position:absolute;left:2px;top:.62em;width:5px;height:5px;border-radius:50%;background:var(--verde)}
.byte-msg strong{font-weight:600}
.byte-msg--aviso{background:#FFF8E6;border:1px solid #F3E2B3}
.byte-aviso-wa{display:inline-flex;align-items:center;gap:7px;margin-top:8px;font-weight:600;font-size:13.5px}
.byte-digitando{display:inline-flex;gap:4px;padding:4px 2px}
.byte-digitando i{width:7px;height:7px;border-radius:50%;background:#9A9A9A;animation:byte-pula 1.1s infinite ease-in-out}
.byte-digitando i:nth-child(2){animation-delay:.15s}
.byte-digitando i:nth-child(3){animation-delay:.3s}
@keyframes byte-pula{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* cards de projetos e soluções */
.byte-cards{display:grid;gap:8px;align-self:stretch}
.byte-card{display:grid;grid-template-columns:76px 1fr;grid-template-rows:auto auto;column-gap:11px;align-items:center;padding:8px;border:1px solid var(--linha);border-radius:14px;background:var(--branco);transition:border-color .2s,box-shadow .2s,transform .2s}
.byte-card:hover{border-color:var(--linha2);box-shadow:0 8px 20px -12px rgba(0,0,0,.25);transform:translateY(-1px)}
.byte-card img{grid-row:1/3;width:76px;height:52px;object-fit:cover;object-position:top;border-radius:8px;background:#EEE}
.byte-card-t{font-weight:600;font-size:13.5px;line-height:1.3;align-self:end}
.byte-card-c{font-size:12px;color:var(--suave);line-height:1.35;align-self:start;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.byte-card--sol{grid-template-columns:1fr;padding:11px 13px;border-left:3px solid var(--verde2)}

/* resumo do atendimento */
.byte-brief{align-self:stretch;border:1px solid var(--linha2);border-radius:16px;padding:14px;background:linear-gradient(180deg,#F7FFFB,#fff 60%)}
.byte-brief-t{font-weight:600;font-size:14.5px;margin-bottom:8px}
.byte-brief dl{display:grid;gap:7px;font-size:13.5px}
.byte-brief dt{font-family:"Geist Mono",monospace;font-size:11px;letter-spacing:.03em;text-transform:uppercase;color:var(--suave)}
.byte-brief dd{margin:1px 0 0;line-height:1.45}
.byte-brief dd ul{display:grid;gap:2px}
.byte-brief dd li{position:relative;padding-left:12px}
.byte-brief dd li::before{content:"";position:absolute;left:1px;top:.6em;width:4px;height:4px;border-radius:50%;background:var(--verde)}
.byte-brief-acoes{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.byte-brief-wa{flex:1 1 auto;justify-content:center;gap:8px}
.byte-brief-wa svg{color:#25D366}
.byte-brief-cont{border:1px solid var(--linha2);background:var(--branco);border-radius:999px;padding:10px 14px;font-size:13.5px;cursor:pointer}
.byte-brief-cont:hover{border-color:var(--tinta)}
.byte-brief-nota{font-size:12px;color:var(--suave);margin-top:8px}

/* sugestões, campo e rodapé */
.byte-sugestoes{display:flex;flex-wrap:wrap;gap:6px;padding:4px 14px 10px}
.byte-sugestoes[hidden]{display:none}
.byte-sugestoes button{border:1px solid var(--linha2);background:var(--branco);border-radius:999px;padding:7px 12px;font-size:13px;cursor:pointer;transition:border-color .2s,background .2s}
.byte-sugestoes button:hover{border-color:var(--tinta);background:var(--fundo)}
.byte-restam{font-size:12px;color:var(--suave);text-align:center;padding:0 14px 6px}
.byte-form{display:flex;align-items:flex-end;gap:8px;margin:0 12px;padding:6px 6px 6px 14px;border:1px solid var(--linha2);border-radius:18px;background:var(--branco);transition:border-color .2s,box-shadow .2s}
.byte-form:focus-within{border-color:var(--tinta);box-shadow:0 0 0 3px rgba(0,184,99,.12)}
.byte-form textarea{flex:1;border:0;outline:0;resize:none;font:inherit;font-size:15px;line-height:1.45;padding:7px 0;max-height:120px;background:transparent;color:var(--tinta)}
.byte-enviar{width:38px;height:38px;border:0;border-radius:12px;background:var(--tinta);color:#fff;display:grid;place-items:center;cursor:pointer;flex:none;transition:background .2s,opacity .2s}
.byte-enviar:hover{background:#222}
.byte-enviar:disabled{opacity:.4;cursor:default}
.byte-enviar svg{width:17px;height:17px}
.byte-rodape{padding:8px 14px 12px;text-align:center}
.byte-rodape a{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;color:var(--suave)}
.byte-rodape a:hover{color:var(--tinta)}

/* com o painel aberto, o Byte do botão descansa (ele já está no painel) */
body.byte-aberto .zap-flut .zap-byte{opacity:0;transform:translateY(12px)}

@media (max-width:560px){
  /* tela cheia do tamanho da área visível (o byte.js desconta o teclado via visualViewport) */
  .byte{inset:auto;top:var(--byte-top,0px);left:0;right:0;bottom:auto;width:auto;height:100vh;height:var(--byte-alt,100dvh);transform:translateY(24px);transform-origin:50% 100%}
  .byte--visivel{transform:none}
  .byte-janela{border-radius:0;border:0;padding-bottom:env(safe-area-inset-bottom)}
  .byte-topo{padding-top:calc(12px + env(safe-area-inset-top))}
  html.byte-trava,body.byte-aberto{overflow:hidden;overscroll-behavior:none}
  /* 16px evita o zoom automático do iPhone ao tocar no campo */
  .byte-form textarea{font-size:16px}
  .byte-sugestoes{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:8px}
  .byte-sugestoes::-webkit-scrollbar{display:none}
  .byte-sugestoes button{flex:none}
  body.byte-aberto .zap-flut{opacity:0;pointer-events:none}
  .byte-msg{max-width:92%}
}
@media (prefers-reduced-motion:reduce){
  .byte,.byte-inicio-img,.byte-digitando i{transition:none;animation:none}
  .byte-msgs{scroll-behavior:auto}
}
