/* ==========================================================================
   GOOGLE REVIEWS WIDGET (.br-greviews)

   A rating header and review cards two to a row, in the
   familiar Google-review layout: light grey panels, gold stars, the round
   avatar with the small Google badge, and "Read more" through to Google.
   Markup is written by googleReviewsWidget() in scripts/build-site.mjs; the
   live version (api/google-reviews.js) uses the same classes.

   It sits inside .br-article__body, so the prose rules for p, a and img are
   put back to what the widget needs, scoped to .br-greviews.
   ========================================================================== */
.br-greviews {
  --_g-panel: var(--br-bg-band);
  --_g-blue: #1a73e8;
  --_g-blue-hover: #1765cc;
  --_g-link: #1557b0;
  --_g-star: #fbbc04;
  --_g-star-off: #dadce0;
  /* Both darkened from Google's own #70757a / #1a73e8 to pass WCAG AA (4.5:1)
     on the grey panel: 5.6:1 and 5.9:1 against #ededeb. */
  --_g-muted: #5f6368;
  margin-block: var(--br-space-4) var(--br-flow-lg);
  color: var(--br-text-heading);
}
.br-greviews p { margin: 0; }
.br-greviews a { text-decoration: none; box-shadow: none; }

/* ---- header ------------------------------------------------------------ */
.br-greviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--br-space-4);
  padding: var(--br-space-3) var(--br-space-6);
  background: var(--_g-panel);
  border-radius: var(--br-radius-lg);
}
.br-greviews__title {
  font-size: 1.25rem;
  font-weight: var(--br-weight-semibold);
  line-height: 1.2;
}
.br-greviews__word { font-weight: 500; letter-spacing: -0.01em; }
.br-greviews__score {
  display: flex;
  align-items: center;
  gap: var(--br-space-2);
  margin-top: var(--br-space-1);
}
.br-greviews__rating { font-size: 1.75rem; font-weight: var(--br-weight-semibold); line-height: 1; }
.br-greviews .br-greviews__count { font-size: 0.95rem; color: var(--_g-muted); }
.br-greviews .br-greviews__count:hover { text-decoration: underline; }
.br-greviews .br-greviews__cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: var(--br-radius-pill);
  background: var(--_g-blue);
  color: #fff;
  font-size: 0.875rem;
  font-weight: var(--br-weight-semibold);
  transition: background var(--br-dur) var(--br-ease);
}
.br-greviews .br-greviews__cta:hover { background: var(--_g-blue-hover); color: #fff; }
.br-greviews .br-greviews__cta:focus-visible { outline: 2px solid var(--br-focus); outline-offset: 2px; }

/* ---- stars: grey row, gold row clipped to the rating on top ------------- */
.br-greviews__stars {
  position: relative;
  display: inline-flex;
  flex: none;
  color: var(--_g-star-off);
}
.br-greviews__stars svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.br-greviews__stars-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: inline-flex;
  overflow: hidden;
  color: var(--_g-star);
}
.br-greviews__card .br-greviews__stars { align-self: flex-start; }  /* or it stretches and the gold overlay over-fills */
.br-greviews__card .br-greviews__stars svg { width: 18px; height: 18px; }

/* ---- the cards: two to a row, one on a phone ------------------------- */
.br-greviews__track {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--br-space-4);
  margin-top: var(--br-space-4);
}
@media (min-width: 560px) {
  .br-greviews__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.br-greviews__card {
  position: relative;  /* keeps the visually-hidden link text inside the card */
  display: flex;
  flex-direction: column;
  gap: var(--br-space-3);
  min-width: 0;
  padding: var(--br-space-5);
  background: var(--_g-panel);
  border-radius: var(--br-radius-lg);
}
.br-greviews__who { display: flex; align-items: center; gap: var(--br-space-3); }
.br-greviews__avatar-wrap { position: relative; flex: none; width: 48px; height: 48px; }
.br-greviews__avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: hsl(var(--av, 200) 62% 48%);
  color: #fff;
  font-size: 1.35rem;
  font-weight: var(--br-weight-semibold);
  line-height: 1;
}
.br-greviews .br-greviews__avatar { margin: 0; border-radius: 50%; }
.br-greviews__badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06);
}
.br-greviews__badge svg { width: 14px; height: 14px; }
.br-greviews__id { display: flex; flex-direction: column; min-width: 0; }
.br-greviews .br-greviews__name {
  font-weight: var(--br-weight-semibold);
  color: var(--br-text-heading);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.br-greviews a.br-greviews__name:hover { text-decoration: underline; }
.br-greviews__when { font-size: 0.875rem; color: var(--_g-muted); line-height: 1.3; }
.br-greviews__text {
  /* Shown in full at every width: these are short, and a review cut off
     mid-sentence reads worse than a taller card. */
  font-size: 1rem;
  line-height: 1.55;
  color: var(--br-text);
}
.br-greviews .br-greviews__more {
  margin-top: auto;
  color: var(--_g-link);
  font-weight: 500;
}
.br-greviews .br-greviews__more:hover { text-decoration: underline; }

@media (max-width: 559px) {
  .br-greviews__head { padding: var(--br-space-3) var(--br-space-5); }
}
