/*
 * ANMA Loja, Avaliações: o resumo (as estrelas perto do botão de compra) e a seção das páginas de produto. Veio do
 * snippet 33567 do WPCode, sem as regras do formulário antigo do site (o botão "Escrever avaliação", o formulário, as
 * estrelas de escolher a nota, o campo escondido contra robôs) e do resumo sem avaliação: os dois saíram em 21/10/2026.
 */

/* ============================================================
   ANMA - Reviews: Estilos Apple
   Escopo: classes .anma-review* e #anma-reviews-section
   ============================================================ */

.anma-review-compact,
#anma-reviews-section {
  --anma-text: #1d1d1f;
  --anma-text-2: #6e6e73;
  --anma-bg: #ffffff;
  --anma-bg-2: #fbfbfd;
  --anma-line: #d2d2d7;
  --anma-star-on: #1d1d1f;
  --anma-star-off: #d2d2d7;
  --anma-accent: #0071e3;
  --anma-accent-hover: #0077ed;
  --anma-font: system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-family: var(--anma-font);
  color: var(--anma-text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Regra global das estrelas ---------- */
.anma-review-compact .anma-star,
.anma-reviews-summary .anma-stars-big .anma-star,
.anma-review-rating .anma-star,
.anma-stars-mini .anma-star { color: var(--anma-star-on); }

.anma-review-compact .anma-star.off,
.anma-reviews-summary .anma-stars-big .anma-star.off,
.anma-review-rating .anma-star.off,
.anma-stars-mini .anma-star.off { color: var(--anma-star-off); }

/* ---------- PONTO 1: Resumo compacto ---------- */
.anma-review-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0 0;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 0;
  text-decoration: none;
  color: var(--anma-text);
  transition: opacity .2s ease;
}
.anma-review-compact:hover { opacity: .7; }
.anma-review-compact .anma-stars-mini { display: inline-flex; gap: 1px; font-size: 15px; line-height: 1; }
.anma-review-compact .anma-avg { font-weight: 500; }
.anma-review-compact .anma-sep { color: var(--anma-text-2); margin: 0 2px; }
.anma-review-compact .anma-count { color: var(--anma-text); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.anma-review-compact:hover .anma-count { border-bottom-color: var(--anma-text-2); }
.anma-review-compact .anma-arrow { color: var(--anma-text-2); font-size: 13px; transform: translateX(0); transition: transform .2s ease; }
.anma-review-compact:hover .anma-arrow { transform: translateX(2px); }

/* ---------- PONTO 2: Seção completa ---------- */
#anma-reviews-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 64px 24px;
  border-top: 1px solid var(--anma-line);
  background: var(--anma-bg);
  scroll-margin-top: 80px;
}
#anma-reviews-section h2.anma-reviews-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 32px 0;
  color: var(--anma-text);
}

.anma-reviews-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--anma-line);
  margin-bottom: 32px;
}
.anma-reviews-summary .anma-avg-big { font-size: 56px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.anma-reviews-summary .anma-stars-big { display: inline-flex; gap: 2px; font-size: 24px; line-height: 1; }
.anma-reviews-summary .anma-based-on { font-size: 14px; color: var(--anma-text-2); }

/* Pontos por avaliação (29/10/2026, pedido do João): o aviso abaixo do resumo, com o link do regulamento */
.anma-reviews-summary .anma-reviews-pontos { margin: 4px 0 0; max-width: 560px; font-size: 13px; line-height: 1.5; color: var(--anma-text-2); }
.anma-reviews-summary .anma-reviews-pontos a { color: var(--anma-accent); text-decoration: none; }
.anma-reviews-summary .anma-reviews-pontos a:hover { text-decoration: underline; }

.anma-reviews-empty { padding: 24px 0 32px; color: var(--anma-text-2); font-size: 16px; }

.anma-reviews-list { list-style: none; margin: 0; padding: 0; }
.anma-review-card { padding: 24px 0; border-bottom: 1px solid var(--anma-line); }
.anma-review-card:last-child { border-bottom: 0; }
.anma-review-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.anma-review-author { display: inline-flex; align-items: center; gap: 8px; }
.anma-review-name { font-weight: 600; font-size: 16px; }
.anma-review-date { font-size: 14px; color: var(--anma-text-2); }
.anma-review-rating { display: inline-flex; gap: 1px; font-size: 16px; line-height: 1; margin-bottom: 8px; }
.anma-review-body { font-size: 16px; line-height: 1.5; color: var(--anma-text); white-space: pre-wrap; word-wrap: break-word; }

/* ============================================================
   Badge "Compra verificada" (Tarefa B)
   Exibida em reviews com meta anma_verified = 1
   ============================================================ */
.anma-review-verified-badge {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  margin: 0 6px;
  background: rgba(0, 135, 90, 0.10);
  color: #00875a;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.anma-review-verified-badge.is-visible {
  display: inline-flex;
}

.anma-verified-icon {
  flex-shrink: 0;
  color: #00875a;
}

/* Paginação */
.anma-reviews-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.anma-reviews-pagination a,
.anma-reviews-pagination span {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border-radius: 980px;
  font-size: 14px; font-weight: 500;
  color: var(--anma-text); text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease;
}
.anma-reviews-pagination a:hover { background: var(--anma-bg-2); }
.anma-reviews-pagination a.is-current { background: var(--anma-text); color: #fff; }

/* Mobile */
@media (max-width: 768px) {
  #anma-reviews-section { padding: 48px 16px; }
  #anma-reviews-section h2.anma-reviews-title { font-size: 26px; }
  .anma-reviews-summary .anma-avg-big { font-size: 44px; }
  .anma-reviews-summary .anma-stars-big { font-size: 20px; }
  .anma-review-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .anma-reviews-pagination a, .anma-reviews-pagination span { min-width: 44px; min-height: 44px; }
}

/* Resposta da Equipe ANMA embaixo da avaliação (29/10, aprovado pelo João; WPCode 33571) */
.anma-review-reply {
    margin-top: 4px;
    padding: 14px 18px;
    background: #f5f5f7;
    border-radius: 14px;
}
.anma-review-reply-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-bottom: 4px;
}
.anma-review-reply-name {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #1d1d1f;
}
.anma-review-reply-date {
    font-size: 13px;
    line-height: 20px;
    color: #6e6e73;
}
.anma-review-reply-body {
    font-size: 15px;
    line-height: 22px;
    color: #1d1d1f;
}
.anma-review-reply-body p {
    margin: 0;
}
.anma-review-reply-body p + p {
    margin-top: 8px;
}
