/* =========================================================
   Gerador AMLS — estilos dos blocos de análise
   Carregado automaticamente pelo plugin apenas nos posts
   gerados. Não é necessário adicionar nada ao tema.
   ========================================================= */

:root {
  --rg-accent: #2563eb;
  --rg-text: #0f172a;
  --rg-muted: #64748b;
  --rg-border: #e2e8f0;
  --rg-surface: #ffffff;
  --rg-surface-alt: #f8fafc;
  --rg-good: #16a34a;
  --rg-mid: #d97706;
  --rg-bad: #dc2626;
  --rg-radius: 12px;
  --rg-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  --rg-shadow-hover: 0 8px 22px rgba(0, 0, 0, .12);
}

/* Blocos do plugin — reset local, sem afetar o resto do tema */
[class^="rg-"],
[class*=" rg-"] {
  box-sizing: border-box;
}

.rg-method,
.rg-verdict,
.rg-criteria,
.rg-compare,
.rg-proscons,
.rg-sources,
.rg-product-card,
.rg-disclosure {
  font-family: inherit;
  color: var(--rg-text);
  max-width: 750px;
  margin: 28px auto;
  line-height: 1.6;
}

.rg-block-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--rg-text);
  line-height: 1.3;
}

.rg-block-intro {
  margin: 0 0 16px;
  color: var(--rg-muted);
  font-size: .95rem;
}

/* ================= AVISO DE AFILIADO ================= */
.rg-disclosure {
  background: var(--rg-surface-alt);
  border-left: 3px solid var(--rg-accent);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: .875rem;
  color: var(--rg-muted);
  margin: 0 auto 24px;
}

.rg-disclosure strong {
  color: var(--rg-text);
}

/* ================= COMO A ANÁLISE FOI FEITA ================= */
.rg-method {
  background: var(--rg-surface-alt);
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius);
  padding: 22px 26px;
}

.rg-method-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--rg-text);
}

.rg-method-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 14px;
  font-size: .92rem;
  color: #78350f;
}

.rg-method-list {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: .95rem;
}

.rg-method-list li {
  margin-bottom: 6px;
}

.rg-method-meta {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--rg-border);
  font-size: .875rem;
  color: var(--rg-muted);
}

/* ================= VEREDITO / NOTA ================= */
.rg-verdict {
  background: var(--rg-surface);
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius);
  box-shadow: var(--rg-shadow);
  padding: 24px 26px;
}

.rg-verdict-head {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.rg-score {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: #fff;
  padding-top: 26px;
}

.rg-score-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.rg-score-max {
  font-size: .8rem;
  opacity: .85;
  margin-left: 2px;
}

.rg-score-high { background: var(--rg-good); }
.rg-score-mid  { background: var(--rg-mid); }
.rg-score-low  { background: var(--rg-bad); }

.rg-verdict-head-text {
  flex: 1;
  min-width: 220px;
}

.rg-verdict-kicker {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rg-muted);
  margin-bottom: 4px;
}

.rg-verdict-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.3;
}

.rg-score-bar {
  display: block;
  height: 8px;
  background: var(--rg-border);
  border-radius: 99px;
  overflow: hidden;
}

.rg-score-bar > span {
  display: block;
  height: 100%;
  background: var(--rg-accent);
  border-radius: 99px;
}

.rg-verdict-summary {
  margin: 18px 0 0;
  font-size: 1rem;
}

.rg-verdict-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: .95rem;
}

.rg-verdict-label {
  flex-shrink: 0;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-top: 2px;
}

.rg-verdict-row > span:last-child {
  flex: 1;
  text-align: left;
}

.rg-verdict-good {
  background: #f0fdf4;
  color: #14532d;
}

.rg-verdict-bad {
  background: #fef2f2;
  color: #7f1d1d;
}

/* ================= TABELAS ================= */
.rg-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius);
}

.rg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  background: var(--rg-surface);
  margin: 0;
}

.rg-table th,
.rg-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rg-border);
  vertical-align: top;
}

.rg-table thead th {
  background: var(--rg-surface-alt);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--rg-muted);
  white-space: nowrap;
}

.rg-table tbody th {
  font-weight: 600;
  color: var(--rg-text);
}

.rg-table tbody tr:last-child td,
.rg-table tbody tr:last-child th {
  border-bottom: 1px solid var(--rg-border);
}

.rg-table tfoot th,
.rg-table tfoot td {
  background: var(--rg-surface-alt);
  border-bottom: none;
}

.rg-criteria-note {
  white-space: nowrap;
}

.rg-criteria-why {
  color: var(--rg-muted);
  min-width: 220px;
}

.rg-pill {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 99px;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
}

.rg-mini-bar {
  display: block;
  height: 5px;
  width: 60px;
  margin-top: 6px;
  background: var(--rg-border);
  border-radius: 99px;
  overflow: hidden;
}

.rg-mini-bar > span {
  display: block;
  height: 100%;
  background: var(--rg-accent);
}

.rg-compare-main {
  background: #eff6ff;
}

.rg-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--rg-accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* ================= PRÓS E CONTRAS ================= */
.rg-proscons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rg-pros,
.rg-cons {
  border-radius: var(--rg-radius);
  padding: 18px 20px;
  border: 1px solid var(--rg-border);
}

.rg-pros {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.rg-cons {
  background: #fef2f2;
  border-color: #fecaca;
}

.rg-pros h3,
.rg-cons h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.rg-pros h3 { color: #14532d; }
.rg-cons h3 { color: #7f1d1d; }

.rg-pros ul,
.rg-cons ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rg-pros li,
.rg-cons li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
  font-size: .94rem;
  line-height: 1.5;
}

.rg-pros li::before,
.rg-cons li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.rg-pros li::before {
  content: "+";
  color: var(--rg-good);
  font-size: 1.1rem;
  line-height: 1.35;
}

.rg-cons li::before {
  content: "−";
  color: var(--rg-bad);
  font-size: 1.1rem;
  line-height: 1.35;
}

/* ================= FONTES ================= */
.rg-sources {
  border-top: 1px solid var(--rg-border);
  padding-top: 20px;
  font-size: .9rem;
}

.rg-sources ul {
  margin: 0;
  padding-left: 20px;
  color: var(--rg-muted);
}

.rg-sources li {
  margin-bottom: 6px;
  word-break: break-word;
}

.rg-sources a {
  color: var(--rg-accent);
}

.rg-sources-date {
  margin: 12px 0 0;
  color: var(--rg-muted);
  font-size: .85rem;
}

/* =========================================================
   CARD DE PRODUTO
   ========================================================= */
.rg-product-card {
  background: var(--rg-surface);
  border: 1px solid var(--rg-border);
  border-radius: var(--rg-radius);
  box-shadow: var(--rg-shadow);
  padding: 20px 25px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.rg-product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rg-shadow-hover);
}

.rg-card-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 25px;
  flex-wrap: nowrap;
}

.rg-card-container figure {
  margin: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 180px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.rg-card-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.rg-card-info {
  flex: 1;
  min-width: 0;
}

.rg-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--rg-text);
  line-height: 1.4;
}

.rg-card-score {
  font-size: .9rem;
  color: var(--rg-muted);
  margin-bottom: 12px;
}

.rg-card-score strong {
  color: var(--rg-text);
}

.rg-card-selos {
  margin-bottom: 12px;
}

.rg-selo {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 6px 6px 0;
  border-radius: 99px;
  background: var(--rg-surface-alt);
  border: 1px solid var(--rg-border);
  color: var(--rg-muted);
  font-size: .75rem;
  font-weight: 600;
}

.rg-card-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}

.rg-btn {
  display: inline-block;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: .85rem;
  text-decoration: none;
  color: #fff;
  transition: opacity .2s ease;
}

.rg-btn:hover,
.rg-btn:focus {
  opacity: .9;
  color: #fff;
  text-decoration: none;
}

.rg-btn-amazon        { background: #ff9900; }
.rg-btn-mercado-livre { background: #ffdd00; color: #333; }
.rg-btn-shopee        { background: #ee4d2d; }

.rg-btn-mercado-livre:hover,
.rg-btn-mercado-livre:focus { color: #333; }

.rg-card-note {
  margin: 12px 0 0;
  font-size: .8rem;
  color: var(--rg-muted);
}

/* ================= RESPONSIVO ================= */
@media (max-width: 760px) {
  .rg-proscons-grid {
    grid-template-columns: 1fr;
  }

  .rg-verdict-head {
    gap: 16px;
  }

  .rg-score {
    width: 76px;
    height: 76px;
    padding-top: 21px;
  }

  .rg-score-value {
    font-size: 1.6rem;
  }
}

@media (max-width: 700px) {
  .rg-card-container {
    flex-direction: column;
    align-items: center;
  }

  .rg-card-container figure {
    width: 100%;
    height: auto;
    max-height: 240px;
  }

  .rg-card-buttons {
    max-width: 100%;
  }

  .rg-method,
  .rg-verdict,
  .rg-product-card {
    padding: 18px;
  }
}

/* ================= TEMA ESCURO ================= */
@media (prefers-color-scheme: dark) {
  body.rg-dark-auto {
    --rg-text: #e2e8f0;
    --rg-muted: #94a3b8;
    --rg-border: #334155;
    --rg-surface: #1e293b;
    --rg-surface-alt: #0f172a;
  }
}

/* ================= IMPRESSÃO ================= */
@media print {
  .rg-product-card,
  .rg-disclosure {
    box-shadow: none;
  }

  .rg-card-buttons {
    display: none;
  }
}
