/* ============================================================
   LIVE GOOGLE REVIEWS WIDGET — reusable premium component. An
   aggregate rating summary plus a horizontally-scrolling strip of
   individual review cards, styled to read as a live external feed.
   Structural CSS below travels unmodified between templates;
   only the variables in the --greview-* block should be re-skinned
   per site (colours, fonts, sizing).

   NOTE: this is a static visual mock — no real Google Places API
   call sits behind it here. Wiring a real site up to the live API
   is a separate, site-specific job; this reference build only
   needs to look convincing.
   ============================================================ */

.greviews {
  --greview-bg: transparent;
  --greview-card-bg: #232733;
  --greview-card-border: rgba(237, 235, 229, 0.1);
  --greview-text: #edebe5;
  --greview-muted: rgba(237, 235, 229, 0.6);
  --greview-accent: #c9a35c;
  --greview-star-color: rgba(237, 235, 229, 0.28);
  --greview-badge-bg: rgba(237, 235, 229, 0.06);
  --greview-badge-text: rgba(237, 235, 229, 0.75);
  --greview-avatar-1: #3fab98;
  --greview-avatar-2: #d9a441;
  --greview-avatar-3: #a35ec4;
  --greview-avatar-4: #4a90d9;
  --greview-avatar-5: #d96a4a;
  --greview-avatar-6: #6fae4a;
  --greview-font-display: 'Syne', sans-serif;
  --greview-font-body: 'Figtree', system-ui, sans-serif;
  --greview-card-w: 300px;
  --greview-avatar-size: 44px;
  --greview-gap: 18px;
  --greview-radius: 18px;

  position: relative;
  padding: 3.5rem 0;
  background: var(--greview-bg);
  color: var(--greview-text);
  font-family: var(--greview-font-body);
}

.greviews__heading {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.greviews__heading h2 {
  font-family: var(--greview-font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin: 0 0 0.6rem;
  line-height: 1.15;
}

.greviews__heading p {
  color: var(--greview-muted);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.greviews__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  padding: 1.1rem 1.6rem;
  background: var(--greview-card-bg);
  border: 1px solid var(--greview-card-border);
  border-radius: var(--greview-radius);
}

.greviews__summary-score {
  font-family: var(--greview-font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--greview-text);
}

.greviews__summary-mid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.greviews__summary-stars {
  display: inline-flex;
  gap: 4px;
}

.greviews__summary-stars .greview-star {
  width: 18px;
  height: 18px;
}

.greviews__summary-count {
  font-size: 0.86rem;
  color: var(--greview-muted);
}

.greviews__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--greview-badge-bg);
  border: 1px solid var(--greview-card-border);
  font-size: 0.76rem;
  color: var(--greview-badge-text);
  white-space: nowrap;
}

.greview-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--greview-accent);
  color: #0b0d10;
  font-family: var(--greview-font-display);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  flex: none;
}

.greviews__viewport {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.greviews__track {
  display: flex;
  gap: var(--greview-gap);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 1.5rem;
  -webkit-overflow-scrolling: touch;
  padding: 6px 1.5rem 14px 0;
  margin: 0 -1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--greview-accent) transparent;
}

.greviews__track::-webkit-scrollbar { height: 6px; }
.greviews__track::-webkit-scrollbar-track { background: transparent; }
.greviews__track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.greview {
  flex: none;
  width: var(--greview-card-w);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  background: var(--greview-card-bg);
  border: 1px solid var(--greview-card-border);
  border-radius: var(--greview-radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.greview__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.greview__avatar {
  flex: none;
  width: var(--greview-avatar-size);
  height: var(--greview-avatar-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--greview-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #0b0d10;
}

.greview__avatar--1 { background: var(--greview-avatar-1); }
.greview__avatar--2 { background: var(--greview-avatar-2); }
.greview__avatar--3 { background: var(--greview-avatar-3); }
.greview__avatar--4 { background: var(--greview-avatar-4); }
.greview__avatar--5 { background: var(--greview-avatar-5); }
.greview__avatar--6 { background: var(--greview-avatar-6); }

.greview__who {
  min-width: 0;
  flex: 1;
}

.greview__name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--greview-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.greview__date {
  display: block;
  font-size: 0.76rem;
  color: var(--greview-muted);
  margin-top: 1px;
}

.greview__stars {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 10px;
}

.greview-star {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
}

.greview-star svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.greview-star__outline {
  fill: none;
  stroke: var(--greview-star-color);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.greview-star__fill {
  fill: var(--greview-accent);
  clip-path: inset(0 calc(100% - var(--greview-star-fill, 0%)) 0 0);
}

.greview__text {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--greview-text);
  flex: 1;
}

.greview__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.greview__via {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--greview-muted);
}

.greviews__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 13, 16, 0.85);
  color: var(--greview-text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.greviews__nav:hover {
  background: var(--greview-accent);
  border-color: var(--greview-accent);
  color: #0b0d10;
}

.greviews__nav--prev { left: -8px; }
.greviews__nav--next { right: -8px; }

@media (max-width: 900px) {
  .greviews__nav { display: none; }
}

@media (max-width: 640px) {
  .greviews {
    --greview-card-w: 250px;
    --greview-gap: 14px;
    --greview-avatar-size: 38px;
  }
  .greviews__summary {
    flex-direction: column;
    text-align: center;
    padding: 1.4rem 1.4rem 1.6rem;
  }
  .greviews__badge { margin-left: 0; }
  .greview { padding: 16px 16px 14px; }
  .greview__text { font-size: 0.85rem; }
}
