/* Extra Chilli — reviews section: same card format, added rating + pagination. */

#comments.ecr-comments-area {
  background: var(--ec-surface, #fff);
  border: 1px solid var(--ec-line, #e3e6ec);
  border-radius: var(--ec-r, 8px);
  box-shadow: var(--ec-shadow, 0 1px 2px rgba(10,12,18,.05), 0 4px 14px rgba(10,12,18,.07));
  padding: 24px 32px 28px;
  margin: 20px 0 0;
}
#comments.ecr-comments-area .comments-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ec-ink, #1e222b);
  margin: 0 0 14px;
}
@media (max-width: 921px) {
  #comments.ecr-comments-area {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 14px 24px;
    margin: 0;
  }
  /* no dark gap between the article card and the reviews block */
  body.page #primary { padding-bottom: 0; }
  body.page .ast-plain-container .ast-article-single { padding-bottom: 8px; margin-bottom: 0; }
  body.page #comments { background: var(--ec-surface, #fff); }
}

/* aggregate summary */
.ecr-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  background: var(--ec-surface-2, #f5f6f9);
  border: 1px solid var(--ec-line, #e3e6ec);
  border-left: 3px solid var(--ec-gold, #f0a51f);
  border-radius: var(--ec-r, 8px);
  padding: 12px 16px;
  margin-bottom: 18px;
}
.ecr-summary .ecr-stars { font-size: 17px; }
.ecr-summary-value { font-weight: 700; font-size: 18px; color: var(--ec-ink, #1e222b); font-variant-numeric: tabular-nums; }
.ecr-summary-text { color: var(--ec-muted, #59616e); font-size: 14px; }

/* cards — symmetric grid: avatar + (name | date) row, then rating, then text.
   Astra's comment styles push the date right with a huge auto margin, indent the
   body by 70px and nudge the name by -7px; all three are neutralised here. */
.ecr-review-list { list-style: none; margin: 0; padding: 0; }
.ecr-review-list > li.ecr-review::before,
.ecr-review-list > li.ecr-review > article::before { content: none; }
.ecr-review .ast-comment { border: 0; padding: 0; margin: 0; }
.ecr-review-list > li.ecr-review {
  background: var(--ec-surface-2, #f5f6f9);
  border: 1px solid var(--ec-line, #e3e6ec);
  border-radius: var(--ec-r, 8px);
  padding: 16px 18px;
  margin: 0 0 12px;
  list-style: none;
}
#comments.ecr-comments-area .ecr-review .ast-comment-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
}
#comments.ecr-comments-area .ecr-review .ast-comment-avatar-wrap { flex-shrink: 0; margin: 0; padding: 0; }
.ecr-review .ast-comment-avatar-wrap img,
.ecr-review .ast-comment-avatar-wrap .ecr-avatar {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.ecr-review .ast-comment-avatar-wrap .ecr-avatar svg { display: block; width: 44px; height: 44px; }
/* name and date share one baseline row */
#comments.ecr-comments-area .ecr-review .ast-comment-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  border: 0;
}
#comments.ecr-comments-area .ecr-review .ast-comment-cite-wrap { margin: 0; padding: 0; min-width: 0; }
.ecr-review .ast-comment-cite-wrap cite { font-style: normal; }
.ecr-review .ast-comment-cite-wrap .fn { font-weight: 700; font-size: 15.5px; color: var(--ec-ink, #1e222b); }
#comments.ecr-comments-area .ecr-review .ast-comment-time {
  margin: 0;
  padding: 0;
  display: block;
  flex-shrink: 0;
}
.ecr-review .ast-comment-time time { color: var(--ec-muted, #59616e); font-size: 13px; white-space: nowrap; }
/* body aligned to the same left edge as the avatar */
#comments.ecr-comments-area .ecr-review .ast-comment-content {
  margin: 0;
  padding: 0;
  border: 0;
}
.ecr-review .ast-comment-content p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ec-ink, #1e222b); }
.ecr-rating { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.ecr-rating .ecr-stars { font-size: 14px; }
/* percentage-filled star bar (no half-star glyph needed) */
.ecr-stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 2px; white-space: nowrap; }
.ecr-stars .ecr-stars-bg { color: #d5d9e0; }
.ecr-stars .ecr-stars-fg {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: var(--ec-gold, #f0a51f);
}
.ecr-rating .ecr-rating-value { font-size: 13px; font-weight: 600; color: var(--ec-muted, #59616e); font-variant-numeric: tabular-nums; }

/* pagination */
.ecr-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 8px;
}
.ecr-pagination .ecr-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ec-line-strong, #cdd2db);
  border-radius: var(--ec-r-s, 6px);
  background: #fff;
  color: var(--ec-ink, #1e222b);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.entry-content .ecr-pagination a.ecr-page-link { text-decoration: none; color: var(--ec-ink, #1e222b); }
.ecr-pagination .ecr-page-link:hover { background: var(--ec-surface-2, #f5f6f9); border-color: var(--ec-muted, #59616e); }
.ecr-pagination .ecr-page-current {
  background: var(--ec-red, #c0331a);
  border-color: var(--ec-red, #c0331a);
  color: #fff;
}
.ecr-pagination .ecr-page-link:focus-visible { outline: 2px solid var(--ec-gold, #f0a51f); outline-offset: 2px; }

@media (max-width: 720px) {
  #comments.ecr-comments-area .comments-title { font-size: 19px; }
  .ecr-review-list > li.ecr-review { padding: 14px; }
  #comments.ecr-comments-area .ecr-review .ast-comment-meta { gap: 2px 10px; }
  .ecr-review .ast-comment-time time { font-size: 12.5px; }
  /* keep the last page links clear of the sticky mobile CTA */
  .ecr-pagination { margin-bottom: calc(78px + env(safe-area-inset-bottom)); }
}
