.site-chat { position: fixed; z-index: 80; right: max(22px,env(safe-area-inset-right)); bottom: max(26px,env(safe-area-inset-bottom)); color: #2a1714; font-family: Onest, sans-serif; }
.site-chat-abrir { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 12px; border: 1px solid #8c201c; border-radius: 999px; color: #fffaf4; background: #b3261e; box-shadow: 0 9px 28px #2a17143d; font: 700 13px Onest,sans-serif; transition: transform .18s ease, box-shadow .18s ease; }
.site-chat-abrir:hover { transform: translateY(-2px); box-shadow: 0 13px 32px #2a17144a; }
.chat-bolha-icone { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: #8c201c; background: #fff3e6; font-size: 17px; }
.chat-status-online { width: 7px; height: 7px; margin-left: -5px; align-self: flex-start; margin-top: 12px; border: 1.5px solid #b3261e; border-radius: 50%; background: #9fcb69; }
.site-chat-painel { position: absolute; right: 0; bottom: 68px; width: min(360px,calc(100vw - 28px)); height: min(590px,calc(100dvh - 130px)); display: grid; grid-template-rows: auto minmax(90px,1fr) auto auto; overflow: hidden; border: 1px solid #ded2c6; border-radius: 18px 18px 8px 18px; background: #fffdf9; box-shadow: 0 22px 65px #2a17143b; animation: chat-entrada .2s ease-out both; }
.site-chat-painel[hidden] { display: none; }
.site-chat-topo { display: flex; align-items: center; gap: 10px; padding: 14px 15px; color: white; background: #8f211b; }
.chat-avatar-loja { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #ffffff70; border-radius: 50%; color: #81211a; background: #fff0dd; font: 800 12px Anybody,sans-serif; }
.site-chat-topo div { display: grid; gap: 3px; min-width: 0; }
.site-chat-topo strong { font: 700 14px Anybody,sans-serif; }
.site-chat-topo div span { color: #f4d7cc; font-size: 10px; }
.site-chat-topo > button { width: 31px; height: 31px; margin-left: auto; border: 0; border-radius: 50%; color: #fff; background: #ffffff18; font-size: 23px; line-height: 1; }
.site-chat-mensagens { display: flex; flex-direction: column; gap: 9px; overflow-y: auto; padding: 16px 13px 9px; background-color: #f6f0e7; background-image: radial-gradient(#c7b8a34d .65px,transparent .65px); background-size: 12px 12px; }
.chat-boas-vindas { max-width: 86%; margin: 0; padding: 10px 12px; border: 1px solid #eee3d6; border-radius: 4px 13px 13px; color: #4b3b32; background: #fffefa; font-size: 12px; line-height: 1.5; }
.chat-mensagem { max-width: 86%; align-self: flex-end; margin: 0; padding: 9px 11px 7px; border: 1px solid #edddbd; border-radius: 13px 4px 13px 13px; color: #39281e; background: #f7e9c9; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-mensagem.loja { align-self: flex-start; border-color: #eee3d6; border-radius: 4px 13px 13px; background: #fffefa; }
.chat-mensagem small { display: block; margin-top: 3px; color: #8d7a69; font-size: 9px; text-align: right; }
.chat-mensagem img { display: block; width: min(190px,100%); margin-bottom: 6px; border-radius: 8px; }
.site-chat-identificacao { display: grid; gap: 9px; padding: 12px 13px 10px; background: #fffdf9; }
.site-chat-identificacao label { display: grid; gap: 4px; color: #725d4e; font: 600 10px Onest,sans-serif; }
.site-chat-identificacao input,.site-chat-identificacao textarea,.site-chat-escrever textarea { width: 100%; border: 1px solid #e0d3c5; border-radius: 7px; color: #332821; background: #fff; font: 400 12px/1.45 Onest,sans-serif; }
.site-chat-identificacao input { min-height: 36px; padding: 7px 9px; }
.site-chat-identificacao textarea { min-height: 59px; resize: vertical; padding: 8px 9px; }
.site-chat-identificacao input:focus,.site-chat-identificacao textarea:focus,.site-chat-escrever textarea:focus { border-color: #b3261e; outline: 3px solid #b3261e24; }
.site-chat-identificacao button { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 7px; color: white; background: #b3261e; font: 700 12px Onest,sans-serif; }
.site-chat-escrever { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px; background: #fffdf9; }
.site-chat-escrever[hidden] { display: none; }
.site-chat-escrever textarea { min-height: 41px; max-height: 100px; padding: 10px 11px; resize: vertical; }
.site-chat-escrever button { width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 50%; color: white; background: #b3261e; font: 700 20px Onest,sans-serif; }
.site-chat-privacidade { padding: 5px 12px 11px; color: #9b8a79; background: #fffdf9; font: 400 9px Onest,sans-serif; text-align: center; }
@keyframes chat-entrada { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
  .site-chat { right: 14px; bottom: calc(75px + env(safe-area-inset-bottom)); }
  .site-chat-abrir { min-height: 48px; gap: 7px; padding: 0 12px 0 9px; font-size: 11px; }
  .chat-bolha-icone { width: 29px; height: 29px; }
  .site-chat-painel { position: fixed; right: 8px; bottom: calc(82px + env(safe-area-inset-bottom)); width: calc(100vw - 16px); height: min(620px,calc(100dvh - 100px)); border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) { .site-chat-painel { animation: none; } .site-chat-abrir { transition: none; } }
