/* ============================================================
   Story Flow — Formatos Validados de Stories
   base.css — reset, variáveis, tipografia, componentes comuns
   ============================================================ */

:root {
  --grad: linear-gradient(90deg, #FF6B35 0%, #E91E63 52%, #6A1B9A 100%);

  --c-vendas: #E91E63;
  --c-visualizacoes: #FF6B35;
  --c-interacao: #9C27B0;
  --c-autoridade: #6A1B9A;

  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --line: #E8E8E8;
  --line-forte: #D8D8D8;

  --tx: #16161A;
  --tx-medio: #4A4A52;
  --tx-fraco: #77777F;

  --copy-bg: #F4F1F7;
  --copy-line: #E0D9E8;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;

  --sh: 0 1px 2px rgba(20, 20, 30, .04), 0 2px 8px rgba(20, 20, 30, .05);
  --sh-alto: 0 2px 4px rgba(20, 20, 30, .05), 0 8px 24px rgba(20, 20, 30, .08);

  --max: 1240px;
  --fonte: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.14;
}

p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input {
  font-family: inherit;
  font-size: 16px; /* nunca menos: iOS dá zoom abaixo de 16 */
  color: inherit;
}

img { max-width: 100%; display: block; }

/* ---------- barra de topo com o gradiente da marca ---------- */

.grad-bar {
  height: 4px;
  background: var(--grad);
}

.topo {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topo-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
}

.marca {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.marca span { color: var(--tx-fraco); font-weight: 600; }

/* em tela estreita o complemento da marca sai pro topo não estourar */
@media (max-width: 470px) {
  .marca span { display: none; }
}

.topo-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-topo {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-forte);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.link-topo:active { background: #F2F2F4; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px 72px;
}

/* ---------- selos e etiquetas ---------- */

.selo {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.selo-cat { color: #fff; }
.selo-cat[data-cat="VENDAS"] { background: var(--c-vendas); }
.selo-cat[data-cat="VISUALIZACOES"] { background: var(--c-visualizacoes); }
.selo-cat[data-cat="INTERACAO"] { background: var(--c-interacao); }
.selo-cat[data-cat="AUTORIDADE"] { background: var(--c-autoridade); }

.selo-neutro {
  background: #F1F1F4;
  color: var(--tx-medio);
  border: 1px solid var(--line);
}

/* ---------- botão copiar ---------- */

.btn-copiar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 20px;
  border: 1.5px solid var(--tx);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: background .12s, color .12s, border-color .12s;
}
.btn-copiar:active { transform: translateY(1px); }
.btn-copiar.ok {
  background: #0F8A4A;
  border-color: #0F8A4A;
  color: #fff;
}

.btn-grad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  box-shadow: var(--sh-alto);
}
.btn-grad:active { transform: translateY(1px); }
.btn-grad.ok {
  background: #0F8A4A;
  box-shadow: none;
}

/* ---------- avisos ---------- */

.aviso {
  border: 1px solid #F0D9A8;
  background: #FDF7E8;
  border-radius: var(--r);
  padding: 14px 16px;
  font-size: 15px;
  color: #6B4E10;
}
.aviso a {
  color: #6B4E10;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vazio {
  padding: 40px 18px;
  text-align: center;
  color: var(--tx-fraco);
  font-size: 15px;
}

/* ---------- utilidades ---------- */

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
