/* ============ CUSTOMWARE — RESET INTERNO ============
 * Neutraliza estilos do tema/WordPress que vazariam pra dentro de
 * #customware-root via cascata e seletores genéricos do tema
 * (.entry-content p, .site-content a, body { color }, etc.).
 *
 * Estratégia: prefixar todos os resets com #customware-root para que
 * (a) NÃO vazem pra fora do plugin, e (b) tenham especificidade ID
 * suficiente pra ganhar de seletores .class do tema.
 *
 * Cascata desejada DENTRO do plugin:
 *   reset (este arquivo) → vars → tokens → componentes específicos
 * ===================================================================== */

/* ── Box-sizing universal e zero margin/padding ──────────────────── */
#customware-root,
#customware-root *,
#customware-root *::before,
#customware-root *::after {
  box-sizing: border-box;
}

#customware-root *,
#customware-root *::before,
#customware-root *::after {
  margin: 0;
  padding: 0;
}

/* ── Tipografia/cor herdada — base do plugin (filhos herdam) ────── */
#customware-root {
  font-family: 'AmsiPro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #f0f4f8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Filhos herdam fonte/cor da raiz — neutraliza overrides do tema */
#customware-root *,
#customware-root *::before,
#customware-root *::after {
  font-family: inherit;
  color: inherit;
}

/* ── Headings — sem estilos do tema (margin, font-size) ─────────── */
#customware-root h1,
#customware-root h2,
#customware-root h3,
#customware-root h4,
#customware-root h5,
#customware-root h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0;
}

/* ── Parágrafos e blocos de texto ───────────────────────────────── */
#customware-root p,
#customware-root blockquote,
#customware-root figure,
#customware-root pre {
  margin: 0;
  padding: 0;
}

/* ── Links — sem sublinhado/cor do tema ─────────────────────────── */
#customware-root a {
  color: inherit;
  text-decoration: none;
  background: transparent;
}
#customware-root a:hover,
#customware-root a:focus,
#customware-root a:active { text-decoration: none; color: inherit; }

/* ── Listas — sem bullets/numeração default ─────────────────────── */
#customware-root ul,
#customware-root ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Botões e form controls — herdam fonte/cor, sem appearance default ── */
#customware-root button,
#customware-root input,
#customware-root select,
#customware-root textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
#customware-root button {
  cursor: pointer;
  padding: 0;
}
#customware-root input,
#customware-root textarea,
#customware-root select {
  width: auto;
  max-width: none;
  box-shadow: none;
}

/* ── Mídia — block + responsivo ─────────────────────────────────── */
/* Canvas NÃO entra aqui: ele tem width/height explícitos definidos via HTML
   attributes (resolução interna) E via inline style (escala via transform).
   max-width: 100% no canvas quebra o transform-based scaling usado em
   carrosseis/preview de criativos — cap a largura visual antes do scale().
   Para canvas, o aspect ratio é controlado pelas dimensões inline. */
#customware-root img,
#customware-root svg,
#customware-root video,
#customware-root iframe {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}
#customware-root canvas {
  display: block;
  border: 0;
}

/* ── Tabelas — colapso de bordas ────────────────────────────────── */
#customware-root table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ── Detalhes diversos ──────────────────────────────────────────── */
#customware-root hr {
  border: 0;
  height: 0;
}
#customware-root fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
