/**
 * Styles for the server-side rating badges (product cards + product-page summary).
 *
 * Star colour is driven by a single CSS variable (--wcra-star) so it is consistent
 * everywhere and easy to override (theme or the `wcra_reviews_star_color` filter).
 *
 * This stylesheet also acts as the universal gold-star fix: the star glyphs are plain
 * text whose colour is inherited unless a rule reaches them. We target every wcra star
 * class (including those rendered by the original review plugin) so stars are gold in all
 * contexts — product cards, the product-page top badge, and the reviews summary header —
 * regardless of which page loaded which stylesheet. This is pure CSS and never affects
 * any pixel/measurement.
 */

:root {
  --wcra-star: #f5a623;        /* warm gold, matches the product-title badge */
  --wcra-star-empty: #d8d8d8;  /* light grey for the outline star glyph */
}

/* ---- Universal: any wcra star glyph is gold, in every context ---- */
.wcra-stars,
.wcra-stars--large,
.wcra-top-rating-badge__stars,
.wcra-card-review-summary .wcra-stars,
.wcra-shortcode-wall__rating-line .wcra-stars,
.wcra-shortcode-card .wcra-stars {
  color: var(--wcra-star) !important;
  letter-spacing: 1px;
  line-height: 1;
}

/* ---- Product card badge (shop / archive loops) ---- */
.wcra-card-review-summary-row {
  margin: 0.35rem 0;
}

.wcra-card-review-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  line-height: 1;
}

.wcra-card-review-summary .wcra-card-average {
  font-weight: 600;
}

.wcra-card-review-summary .wcra-card-count {
  opacity: 0.6;
}

/* ---- Product-page top summary badge ---- */
.wcra-top-rating-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 99px;
  background: rgba(245, 166, 35, 0.1);
  font-size: 0.92rem;
  line-height: 1.2;
}

.wcra-top-rating-badge__stars {
  font-size: 1rem;
}

.wcra-top-rating-badge__count {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: inherit;
  opacity: 0.85;
}

.wcra-top-rating-badge__count:hover {
  opacity: 1;
}

.wcra-top-rating-badge__quality {
  font-weight: 600;
  color: #b8780a;
}

.wcra-top-rating-fallback[hidden] {
  display: none;
}
