/* Container fixo (fechado por padrão) */
#sn-chat {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Botão flutuante */
.sn-chat__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

/* Janela */
.sn-chat__window {
  width: 320px;
  max-height: 60vh;
  display: none;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  overflow: hidden;
  margin-bottom: 10px;
}

/* Cabeçalho */
.sn-chat__header {
  padding: 12px 14px;
  font-weight: 600;
}

/* Lista de mensagens */
.sn-chat__body {
  background: #fff;
  padding: 12px;
  overflow-y: auto;
  gap: 8px;
  display: flex;
  flex-direction: column;
}

/* Bolhas */
.sn-msg {
  padding: 8px 10px;
  border-radius: 10px;
  max-width: 85%;
  line-height: 1.3;
  font-size: 14px;
  white-space: pre-wrap;
}
.sn-msg.user { margin-left: auto; }

/* Rodapé (input) */
.sn-chat__footer {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
}
.sn-chat__footer input {
  flex: 1;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.15);
  padding: 0 10px;
}
.sn-chat__footer button {
  height: 36px;
  border-radius: 8px;
  border: 0;
  padding: 0 14px;
  cursor: pointer;
}

/* Tema claro */
:root {
  --sn-accent: #0ea5e9;  /* azul agradável */
  --sn-bg: #f8fafc;
  --sn-text: #0f172a;
  --sn-user: #e2f2ff;
  --sn-bot: #f1f5f9;
  --sn-header: #e0f2fe;
}
.sn-chat__toggle { background: var(--sn-accent); color: white; }
.sn-chat__window { background: var(--sn-bg); border: 1px solid rgba(0,0,0,.06); }
.sn-chat__header { background: var(--sn-header); color: var(--sn-text); }
.sn-msg.user { background: var(--sn-user); color: var(--sn-text); }
.sn-msg.bot  { background: var(--sn-bot);  color: var(--sn-text); }
.sn-chat__footer button { background: var(--sn-accent); color: #fff; }

/* Mobile */
@media (max-width: 480px) {
  .sn-chat__window { width: calc(100vw - 24px); max-height: 70vh; right: 0; left: 12px; }
}
