/* =========================================================
   LOOT3D — Base visual compartilhada (loja + painel)
   Cores, fontes, botões, campos, selos, modal e avisos.
   ========================================================= */

:root {
  /* Cores oficiais (estimadas — confirmar com o designer) */
  --laranja: #FF5E01;
  --laranja-escuro: #C4380A;
  --laranja-claro: #FFF1E8;
  --roxo: #5B21B6;
  --roxo-medio: #7C4DDB;
  --roxo-escuro: #1A0B3D;
  --roxo-claro: #F3EEFC;

  /* Neutros */
  --texto: #1A0B3D;
  --texto-suave: #6B6585;
  --texto-fraco: #9B96AE;
  --linha: #ECE9F3;
  --fundo: #FFFFFF;
  --fundo-suave: #F8F7FB;

  /* Estados (separados das cores da marca) */
  --sucesso: #16A34A;
  --sucesso-claro: #E9F8EF;
  --alerta: #B45309;
  --alerta-claro: #FEF5E7;
  --erro: #DC2626;
  --erro-claro: #FDECEC;
  --whatsapp: #1FAF54;

  --raio: 16px;
  --raio-p: 10px;
  --sombra: 0 1px 2px rgba(26, 11, 61, .04), 0 8px 24px rgba(26, 11, 61, .06);
  --sombra-forte: 0 2px 4px rgba(26, 11, 61, .05), 0 18px 40px rgba(26, 11, 61, .12);
  --fonte-titulo: 'Russo One', 'Poppins', sans-serif;
  --fonte: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 15px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 600; }
p { margin: 0; }

.titulo-marca { font-family: var(--fonte-titulo); font-weight: 400; letter-spacing: .01em; }

/* Ícones */
.ic { width: 20px; height: 20px; flex-shrink: 0; }
.ic-p { width: 16px; height: 16px; }
.ic-g { width: 24px; height: 24px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-icone { width: 38px; height: 38px; }
.logo-texto {
  font-family: var(--fonte-titulo);
  font-size: 24px;
  letter-spacing: .02em;
  color: var(--roxo);
  line-height: 1;
}
.logo-texto b { color: var(--laranja); font-weight: 400; }
.logo.claro .logo-texto { color: #fff; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--laranja); color: #fff; box-shadow: 0 6px 16px rgba(255, 94, 1, .22); }
.btn-primario:hover { background: var(--laranja-escuro); }
.btn-roxo { background: var(--roxo); color: #fff; }
.btn-roxo:hover { background: #4A1A96; }
.btn-contorno { border-color: var(--linha); background: #fff; color: var(--texto); }
.btn-contorno:hover { border-color: var(--roxo); color: var(--roxo); }
.btn-fantasma { background: transparent; color: var(--roxo); padding: 0 12px; }
.btn-fantasma:hover { background: var(--roxo-claro); }
.btn-whats { background: var(--whatsapp); color: #fff; }
.btn-whats:hover { background: #17924A; }
.btn-p { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-g { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-bloco { width: 100%; }
.btn-icone { width: 38px; height: 38px; padding: 0; border-radius: 10px; }

/* ---------- Selos ---------- */
.selo {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.selo-laranja { background: var(--laranja); color: #fff; }
.selo-roxo { background: var(--roxo); color: #fff; }
.selo-claro { background: var(--roxo-claro); color: var(--roxo); }
.selo-laranja-claro { background: var(--laranja-claro); color: var(--laranja-escuro); }
.selo-sucesso { background: var(--sucesso-claro); color: var(--sucesso); }
.selo-alerta { background: var(--alerta-claro); color: var(--alerta); }
.selo-neutro { background: var(--fundo-suave); color: var(--texto-suave); border: 1px solid var(--linha); }
.selo .ponto { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Campos ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .rotulo { font-size: 13px; font-weight: 600; color: var(--texto); }
.campo .ajuda { font-size: 12px; color: var(--texto-suave); }
.entrada, .campo input:not([type=checkbox]):not([type=radio]):not([type=file]), .campo select, .campo textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1.5px solid var(--linha); border-radius: 10px; background: #fff;
  font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.campo textarea { min-height: 96px; resize: vertical; }
.entrada:focus, .campo input:focus, .campo select:focus, .campo textarea:focus {
  border-color: var(--roxo); box-shadow: 0 0 0 4px rgba(91, 33, 182, .1);
}
.prefixo { position: relative; }
.prefixo > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-suave); font-size: 14px; }
.prefixo input { padding-left: 40px !important; }

/* Interruptor */
.interruptor { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.interruptor input { position: absolute; opacity: 0; width: 0; height: 0; }
.interruptor .trilho { width: 40px; height: 22px; border-radius: 999px; background: #D9D5E4; position: relative; transition: background .2s; flex-shrink: 0; }
.interruptor .trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.interruptor input:checked + .trilho { background: var(--roxo); }
.interruptor input:checked + .trilho::after { transform: translateX(18px); }
.interruptor input:focus-visible + .trilho { box-shadow: 0 0 0 4px rgba(91, 33, 182, .2); }

/* ---------- Aviso flutuante (toast) ---------- */
.toast-area { position: fixed; right: 20px; bottom: 72px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--roxo-escuro); color: #fff;
  padding: 12px 16px; border-radius: 12px; box-shadow: var(--sombra-forte);
  font-size: 14px; max-width: 360px;
  animation: toast-entra .25s ease-out;
}
.toast .ic { color: var(--laranja); }
@keyframes toast-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-fundo {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 11, 61, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: toast-entra .2s ease-out;
}
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 480px;
  max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: var(--sombra-forte);
}
.modal-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--linha); }
.modal-topo h3 { font-size: 17px; }
.modal-corpo { padding: 20px 24px; }
.modal-rodape { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--linha); background: var(--fundo-suave); border-radius: 0 0 20px 20px; }

/* Prévia de mensagem do WhatsApp */
.whats-previa { background: #ECE5DD; border-radius: 14px; padding: 16px; }
.whats-balao {
  background: #DCF8C6; border-radius: 10px 10px 2px 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.55; white-space: pre-wrap; margin-left: 24px;
  box-shadow: 0 1px 1px rgba(0,0,0,.08); color: #111;
}

/* ---------- Navegador do protótipo ---------- */
.proto-nav { position: fixed; right: 16px; bottom: 16px; z-index: 150; font-size: 13px; }
.proto-nav > button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--roxo-escuro); color: #fff; border: 0;
  padding: 10px 14px; border-radius: 999px; box-shadow: var(--sombra-forte); font-weight: 500;
}
.proto-nav > button .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--laranja); }
.proto-menu {
  position: absolute; bottom: 52px; right: 0; width: 250px;
  background: #fff; border: 1px solid var(--linha); border-radius: 14px; box-shadow: var(--sombra-forte);
  padding: 8px; display: none;
}
.proto-nav.aberto .proto-menu { display: block; }
.proto-menu small { display: block; padding: 8px 10px 4px; color: var(--texto-fraco); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.proto-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--texto); }
.proto-menu a:hover { background: var(--roxo-claro); color: var(--roxo); }
.proto-menu a.atual { background: var(--roxo-claro); color: var(--roxo); font-weight: 600; }
.proto-menu a span.n { width: 20px; height: 20px; border-radius: 6px; background: var(--fundo-suave); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--texto-suave); }
.proto-menu a.atual span.n { background: var(--roxo); color: #fff; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Adições da versão funcional ---------- */
.btn-perigo { background: var(--erro); color: #fff; }
.btn-perigo:hover { background: #B91C1C; }
.aviso-config { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--alerta-claro); color: var(--alerta); font-size: 13px; margin-bottom: 14px; }
.aviso-config .ic { margin-top: 2px; }
.sem-foto { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--fundo-suave); color: var(--texto-fraco); font-size: 12px; width: 100%; height: 100%; }
