/* SIZA, a assistente inteligente (siza-painel.js): botão com o rosto dela e a janela de conversa. Sem desfoque; transições curtas.
   Identidade de 2026-10-19 (siza neutra.png): azul #1a74e9, violeta #936bd9, grafite #333034, lavanda #ced9f7, marinho #0e1c30. */
#siza-botao { position: fixed; margin: 0; min-width: 0; min-height: 0; right: 20px; bottom: 20px; z-index: 900; width: 64px; height: 64px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: #dfe7fb; box-shadow: 0 0 0 3px #1a74e9, 0 10px 28px rgba(14, 28, 48, .32); cursor: pointer; overflow: hidden; transition: box-shadow .18s ease-out; }
/* Passar o mouse: o aro azul vira azul + violeta e ganha um brilho leve (escolha do dono, 2026-10-19). */
#siza-botao:hover, #siza-botao:focus-visible { box-shadow: 0 0 0 3px #1a74e9, 0 0 0 6px rgba(147, 107, 217, .75), 0 0 22px 6px rgba(26, 116, 233, .38), 0 10px 28px rgba(14, 28, 48, .32); }
/* Formato dos botões do painel: quadrado com cantos arredondados (escolha do dono, 2026-10-19). */
body button#siza-botao { border-radius: 16px !important; }
#siza-botao img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; object-position: 50% 30%; }
#siza-botao[hidden], #siza-janela[hidden] { display: none; }
/* enquanto a tela de carregamento (logo com o brilho) cobre o painel, a SIZA não aparece por cima dela (dono, 2026-10-19) */
body:has(#sessao-carregando:not([hidden])) #siza-botao, body:has(#sessao-carregando:not([hidden])) #siza-janela { display: none; }
#siza-botao.siza-respira { animation: siza-respira 5s ease-in-out infinite; }

#siza-janela { position: fixed; right: 20px; bottom: 96px; z-index: 901; display: flex; flex-direction: column; width: 390px; height: min(620px, calc(100vh - 120px)); border: 1px solid #dfe5f5; border-radius: 22px; background: #fff; box-shadow: 0 24px 60px rgba(14, 28, 48, .28); overflow: hidden; opacity: 0; transform: translateY(12px); transition: opacity .16s, transform .16s; }
#siza-janela.aberta { opacity: 1; transform: none; }
#siza-janela.fechando { transition-duration: .12s; }
.siza-topo { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(120deg, #0e1c30, #1e3a8a 55%, #2257bb); border-bottom: 0; }
.siza-rosto { flex: none; width: 54px; height: 54px; border: 2px solid #fff; border-radius: 50%; background: #dfe7fb; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); overflow: hidden; }
.siza-rosto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: opacity .16s; }
.siza-rosto.trocando img { opacity: 0; }
.siza-rosto.pensando { animation: siza-pensa 1.6s ease-in-out infinite; }
.siza-rosto.pulando { animation: siza-pulo .45s ease-out 1; }
.siza-rosto.balanca { animation: siza-balanca .5s ease-in-out 1; }
.siza-titulo { flex: 1; min-width: 0; }
.siza-titulo strong { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 17px; line-height: 1.2; letter-spacing: .02em; }
/* Símbolo de IA ao lado do nome dela, sempre (dono, 2026-10-19). */
.siza-titulo .siza-ia { width: 23px; height: 23px; color: #8fd0ff; }
.siza-titulo span { display: inline-flex; align-items: center; gap: 6px; color: #8fd0ff; font-size: 13px; }
.siza-titulo span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34d27b; box-shadow: 0 0 0 2px rgba(52, 210, 123, .25); }
#siza-janela .siza-fechar { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
#siza-janela .siza-fechar:hover { background: rgba(255, 255, 255, .26); }

.siza-conversa { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: #f5f7fd; }
.siza-msg { display: flex; gap: 8px; margin-bottom: 12px; }
.siza-msg.usuario { justify-content: flex-end; }
.siza-msg .siza-mini { flex: none; width: 28px; height: 28px; margin-top: 2px; border-radius: 50%; background: #dfe7fb; overflow: hidden; }
.siza-msg .siza-mini img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.siza-balao-msg { max-width: 82%; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid #e3e8f6; color: #333034; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.siza-msg.usuario .siza-balao-msg { border: 0; border-radius: 16px 16px 4px 16px; background: #1a74e9; color: #fff; }
.siza-balao-msg ul { margin: 4px 0; padding-left: 18px; }
.siza-balao-msg li { margin: 2px 0; }
.siza-balao-msg strong { color: inherit; }
.siza-consultou { margin-top: 6px; color: #7d86a3; font-size: 12px; }
.siza-boasvindas { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: end; margin-bottom: 14px; }
.siza-boasvindas img { width: 96px; border-radius: 14px; }
.siza-digitando { display: inline-flex; gap: 4px; padding: 4px 2px; }
.siza-digitando i { width: 7px; height: 7px; border-radius: 50%; background: #936bd9; animation: siza-ponto 1s ease-in-out infinite; }
.siza-digitando i:nth-child(2) { animation-delay: .15s; }
.siza-digitando i:nth-child(3) { animation-delay: .3s; }

.siza-sugestoes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: #f5f7fd; }
#siza-janela .siza-sugestoes button { min-height: 34px; padding: 6px 12px; border: 1px solid #ced9f7; border-radius: 999px; background: #fff; color: #1e3a8a; font-size: 13px; font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer; }
#siza-janela .siza-sugestoes button:hover { background: #eef2fd; border-color: #1a74e9; }
#siza-janela .siza-rodape { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px; border-top: 1px solid #e3e8f6; background: #fff; }
#siza-janela .siza-rodape textarea { flex: 1; min-height: 42px; max-height: 120px; padding: 10px 12px; border: 1px solid #ced9f7; border-radius: 14px; font-size: 14px; line-height: 1.4; resize: none; }
.siza-rodape textarea:focus { outline: 2px solid #ced9f7; outline-offset: 0; border-color: #1a74e9; }
#siza-janela .siza-enviar { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #1a74e9, #936bd9); color: #fff; cursor: pointer; }
.siza-enviar:disabled { opacity: .5; cursor: default; }
.siza-enviar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.siza-aviso { padding: 0 14px 10px; background: #fff; color: #7d86a3; font-size: 11.5px; text-align: center; }

/* O painel tem estilos gerais para button, form e textarea: aqui tudo volta ao desenho da SIZA. */
#siza-janela button, #siza-janela textarea, #siza-janela form { margin: 0; min-width: 0; box-shadow: none; text-transform: none; letter-spacing: normal; font-family: inherit; }
#siza-janela form.siza-rodape { width: auto; max-width: none; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
#siza-janela .siza-fechar { display: grid; place-items: center; padding: 0; font-weight: 400; }
#siza-janela #siza-janela .siza-sugestoes button { width: auto; height: auto; font-size: 13px; font-weight: 500; line-height: 1.3; color: #1e3a8a; }
#siza-janela .siza-rodape textarea { width: auto; height: 42px; min-height: 42px; margin: 0; font-size: 14px; line-height: 1.4; background: #fff; color: #2a2f4a; }
#siza-janela .siza-enviar { display: grid; place-items: center; padding: 0; min-height: 0; }
#siza-janela .siza-aviso { margin: 0; padding-top: 0; }

@keyframes siza-respira { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes siza-pensa { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes siza-pulo { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }
@keyframes siza-balanca { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes siza-ponto { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 600px) {
  #siza-botao { right: 14px; bottom: 14px; width: 56px; height: 56px; }
  #siza-janela { right: 0; bottom: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #siza-botao.siza-respira, .siza-rosto.pensando, .siza-rosto.pulando, .siza-rosto.balanca, .siza-digitando i { animation: none; }
  #siza-janela, .siza-rosto img { transition: none; }
}
/* Moderação (central_siza): aviso ou bloqueio por mensagem imprópria. */
#siza-janela .siza-ouvir { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 28px; min-height: 0; min-width: 0; margin: 2px 0 0; padding: 0 10px 0 8px;
  border: 1px solid #dfe3f2; border-radius: 999px !important; background: #fff; color: #5b4bc4; font-family: inherit; font-weight: 600; font-size: 12px; line-height: 1; cursor: pointer; box-shadow: none; }
#siza-janela .siza-ouvir svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#siza-janela .siza-ouvir svg path:first-child { fill: currentColor; stroke: none; }
#siza-janela .siza-ouvir:hover { background: #f1eefe; }
#siza-janela .siza-ouvir.tocando { background: #5b4bc4; border-color: #5b4bc4; color: #fff; }
#siza-janela .siza-ouvir.tocando .onda { animation: siza-onda 0.9s ease-in-out infinite; }
#siza-janela .siza-ouvir.carregando { opacity: .55; cursor: progress; }
@keyframes siza-onda { 50% { opacity: .25; } }
.siza-franquia { margin-top: 8px; padding: 8px 10px; border: 1px solid #d8d0f5; border-radius: 10px; background: #f6f3ff; color: #3e3478; font-size: 13px; line-height: 1.45; display: grid; gap: 6px; }
.siza-franquia.esgotada { border-color: #f1d3a6; background: #fff8ec; color: #7a4a06; }
.siza-franquia small { color: inherit; opacity: .8; font-size: 12px; }
#siza-janela .siza-pacote { justify-self: stretch; line-height: 1.3; min-height: 32px; padding: 6px 12px; border: 0; border-radius: 10px !important; background: #5b4bc4; color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
#siza-janela .siza-pacote:disabled { opacity: .6; cursor: progress; }
.siza-moderacao { margin-top: 8px; padding: 8px 10px; border: 1px solid #f3c7c7; border-radius: 10px; background: #fff3f3; color: #9b1c1c; font-size: 13px; line-height: 1.45; }

