/* Google reviews section.
   Everything is scoped under #google-reviews so it cannot collide with the
   rest of the site. Retheme by overriding the four --gr-* tokens below. */

#google-reviews {
  --gr-bg: transparent;
  --gr-card: #ffffff;
  --gr-border: #e3e6ea;
  --gr-ink: #14181d;
  --gr-muted: #5b636d;
  --gr-star: #f4b400;
  --gr-accent: #1a73e8;
  --gr-radius: 14px;

  background: var(--gr-bg);
  color: var(--gr-ink);
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem;
}

@media (prefers-color-scheme: dark) {
  #google-reviews {
    --gr-card: #16191d;
    --gr-border: #2a2f36;
    --gr-ink: #eceff3;
    --gr-muted: #9aa3ae;
    --gr-accent: #8ab4f8;
  }
}

#google-reviews * {
  box-sizing: border-box;
}

/* ---------- header ---------- */

.gr-header {
  max-width: 68rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.gr-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.gr-g-wrap {
  display: inline-flex;
  line-height: 0;
}

.gr-g {
  width: 1.35em;
  height: 1.35em;
}

.gr-title {
  margin: 0;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.gr-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0;
}

.gr-score {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gr-count {
  color: var(--gr-muted);
  font-size: 0.9rem;
}

.gr-notice {
  margin: 0.9rem auto 0;
  max-width: 44rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--gr-muted);
}

/* ---------- stars ---------- */

.gr-stars {
  display: inline-flex;
  gap: 0.05em;
  font-size: 0.95rem;
  line-height: 1;
}

.gr-star {
  color: var(--gr-border);
}

.gr-star.is-on {
  color: var(--gr-star);
}

/* ---------- list ---------- */

.gr-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 68rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.gr-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--gr-card);
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius);
  padding: 1.15rem 1.25rem 1rem;
}

.gr-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gr-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gr-border);
}

.gr-avatar--fallback {
  display: grid;
  place-items: center;
  font-weight: 650;
  color: var(--gr-muted);
  font-size: 1rem;
}

.gr-who {
  min-width: 0;
}

.gr-author {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.gr-author:hover,
a.gr-author:focus-visible {
  text-decoration: underline;
}

.gr-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.gr-when {
  font-size: 0.8125rem;
  color: var(--gr-muted);
}

.gr-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  /* Long reviews are clamped, but the full text is one click away on Google. */
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gr-card-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.25rem;
  font-size: 0.8125rem;
}

.gr-translated {
  color: var(--gr-muted);
}

.gr-source {
  color: var(--gr-accent);
  text-decoration: none;
  font-weight: 550;
}

.gr-source:hover,
.gr-source:focus-visible {
  text-decoration: underline;
}

/* ---------- footer CTAs ---------- */

.gr-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem auto 0;
}

.gr-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--gr-accent);
  background: var(--gr-accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .gr-cta {
    color: #10131a;
  }
}

.gr-cta--ghost {
  background: transparent;
  color: var(--gr-accent);
}

.gr-cta:hover,
.gr-cta:focus-visible {
  filter: brightness(0.94);
}

.gr-cta:focus-visible,
.gr-source:focus-visible,
a.gr-author:focus-visible {
  outline: 2px solid var(--gr-accent);
  outline-offset: 2px;
}
