/* google-reviews.css — Google-style review block for mock-ups (pairs with mock-kit.js: data-stars, time[data-reltime],
   data-avatar, data-clamp). Real reviews only: names, ratings, dates, texts and counts copied from the client's Google
   Business Profile on a stated date. Google G = assets/google-g.svg (official mark, never re-drawn as text).
   Font: Roboto, loaded by the page (fonts.googleapis.com, Roboto 400;500). Rules: reference/details.md. */

.gr { --gr-ink: #202124; --gr-muted: #5f6368; --gr-link: #1a73e8; --gr-line: #dadce0; --gr-star: #fbbc04; --gr-star-off: #dadce0;
  --gr-bg: #fff; --gr-soft: #f8f9fa;
  font-family: Roboto, Arial, sans-serif; color: var(--gr-ink); -webkit-font-smoothing: antialiased; }
.gr *, .gr *::before, .gr *::after { box-sizing: border-box; }

/* summary: rating, stars, count, Google attribution, link to the real reviews */
.gr-summary { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding: 16px 20px; background: var(--gr-bg);
  border: 1px solid var(--gr-line); border-radius: 8px; }
.gr-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--gr-muted); }
.gr-brand img { width: 20px; height: 20px; display: block; }
.gr-score { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center; }
.gr-score b { font-size: 44px; line-height: 48px; font-weight: 400; grid-row: span 2; letter-spacing: -.5px; }
.gr-score .gr-stars { --gr-size: 18px; }
.gr-count { font-size: 14px; line-height: 20px; color: var(--gr-muted); }
.gr-count a { color: var(--gr-link); text-decoration: none; }
.gr-count a:hover { text-decoration: underline; }
.gr-all { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 1px solid var(--gr-line);
  border-radius: 18px; color: var(--gr-link); background: var(--gr-bg); font: 500 14px/1 Roboto, Arial, sans-serif; text-decoration: none;
  transition: background-color 120ms cubic-bezier(.2, 0, 0, 1), border-color 120ms; }
.gr-all:hover { background: #f6fafe; border-color: #d2e3fc; }
.gr-all img { width: 18px; height: 18px; }

/* optional distribution, only when the real per-star counts are known */
.gr-dist { display: grid; gap: 4px; min-width: 180px; }
.gr-dist div { display: grid; grid-template-columns: 10px 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--gr-muted); }
.gr-dist i { display: block; height: 8px; border-radius: 4px; background: #e8eaed; overflow: hidden; }
.gr-dist i::before { content: ""; display: block; height: 100%; width: 100%; background: var(--gr-star); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* stars: grey base, gold fill clipped per star, so 4,7 shows exactly 70% of the fifth star */
.gr-stars { --gr-size: 14px; display: inline-flex; gap: 1px; vertical-align: middle; line-height: 0; }
.gr-star { position: relative; display: inline-block; width: var(--gr-size); height: var(--gr-size); }
.gr-star svg { width: var(--gr-size); height: var(--gr-size); display: block; fill: var(--gr-star-off); }
.gr-star-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.gr-star-fill svg { fill: var(--gr-star); }

/* review cards */
.gr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.gr-card { background: var(--gr-bg); border: 1px solid var(--gr-line); border-radius: 8px; padding: 16px; display: grid; gap: 8px; align-content: start; }
.gr-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.gr-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: #fff;
  background: var(--gr-avatar, #5f6368); font-size: 18px; font-weight: 500; line-height: 1; }
.gr-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gr-name { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--gr-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-meta { font-size: 12px; line-height: 16px; color: var(--gr-muted); }
.gr-src { width: 18px; height: 18px; opacity: .9; }
.gr-rating { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--gr-muted); }
.gr-rating .gr-stars { --gr-size: 13px; }
.gr-text { margin: 0; font-size: 14px; line-height: 20px; color: var(--gr-ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.gr-text.is-open { display: block; -webkit-line-clamp: unset; }
.gr-more { justify-self: start; background: none; border: 0; padding: 4px 0; color: var(--gr-link); font: 500 14px/20px Roboto, Arial, sans-serif; cursor: pointer; }
.gr-more:hover { text-decoration: underline; }
.gr-reply { background: var(--gr-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 18px; color: var(--gr-ink); }
.gr-reply strong { display: block; font-weight: 500; margin-bottom: 2px; }
.gr-note { margin: 10px 0 0; font-size: 12px; line-height: 16px; color: var(--gr-muted); }

/* phones: horizontal swipe with snap, next card peeks */
@media (max-width: 640px) {
  .gr-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-padding: 0 16px; padding-bottom: 4px; overscroll-behavior-x: contain; scrollbar-width: none; }
  .gr-list::-webkit-scrollbar { display: none; }
  .gr-card { scroll-snap-align: start; }
  .gr-all { margin-left: 0; height: 44px; border-radius: 22px; }
  .gr-more { padding: 12px 0; }
}
