/* G2Reviews (/kit/reviews.css): the badge, the stars and the panel for the googleReviews blocks.
 * Classes only: the CSP has no 'unsafe-inline'. A site themes it by setting these custom properties
 * on any ancestor:
 *   --g2-gr-accent (the stars), --g2-gr-text, --g2-gr-muted, --g2-gr-border, --g2-gr-surface,
 *   --g2-gr-radius, --g2-gr-star-off
 * Google's display rules apply: never hide .g2-gr-source or .g2-gr-note, or the authors. This file
 * styles them and does not remove them. */
.g2-gr,
.g2-gr-badge,
.g2-gr-rating,
.g2-gr-panel {
  --g2g-accent: var(--g2-gr-accent, #f5a623);
  --g2g-star-off: var(--g2-gr-star-off, #d5d9e0);
  --g2g-text: var(--g2-gr-text, #1d2433);
  --g2g-muted: var(--g2-gr-muted, #5b6474);
  --g2g-border: var(--g2-gr-border, #d5d9e0);
  --g2g-surface: var(--g2-gr-surface, #ffffff);
  --g2g-radius: var(--g2-gr-radius, 12px);
}

.g2-gr-stars { display: inline-flex; gap: 1px; line-height: 1; vertical-align: middle; }
.g2-gr-star { font-size: 1em; }
.g2-gr-star--on { color: var(--g2g-accent); }
.g2-gr-star--off { color: var(--g2g-star-off); }
/* A half star is the filled glyph over the empty colour, cut at the middle. */
.g2-gr-star--half {
  background: linear-gradient(90deg, var(--g2g-accent) 50%, var(--g2g-star-off) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.g2-gr-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.35em 0.9em;
  border: 1px solid var(--g2g-border);
  border-radius: 999px;
  background: var(--g2g-surface);
  color: var(--g2g-text);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}
.g2-gr-badge:hover { border-color: var(--g2g-muted); }
.g2-gr-badge:focus-visible { outline: 3px solid var(--g2g-accent); outline-offset: 2px; }
.g2-gr-badge .g2-gr-source { color: var(--g2g-muted); font-size: 0.8em; }
.g2-gr-badge .g2-gr-score { font-weight: 700; }
.g2-gr-badge .g2-gr-count { color: var(--g2g-muted); }

.g2-gr { color: var(--g2g-text); }
.g2-gr-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em; margin: 0 0 1rem; }
.g2-gr-score { font-weight: 700; }
.g2-gr-count,
.g2-gr-source,
.g2-gr-time,
.g2-gr-note { color: var(--g2g-muted); }
.g2-gr-source { font-size: 0.9em; }
.g2-gr-list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.g2-gr-review {
  padding: 0.9rem 1rem;
  border: 1px solid var(--g2g-border);
  border-radius: var(--g2g-radius);
  background: var(--g2g-surface);
}
.g2-gr-author { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.g2-gr-name { color: inherit; text-decoration: none; }
.g2-gr-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.g2-gr-photo--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--g2g-border);
  color: var(--g2g-text);
  font-weight: 700;
}
.g2-gr-meta { margin: 0.35rem 0; font-size: 0.85rem; }
.g2-gr-text { margin: 0.4rem 0; white-space: pre-line; overflow-wrap: anywhere; }
.g2-gr-view { margin: 0.4rem 0 0; font-size: 0.85rem; }
.g2-gr-note { margin: 1rem 0 0; font-size: 0.8rem; }
.g2-gr-cta { margin: 0.75rem 0 0; }

/* The panel: a native <dialog>, so the browser handles focus trapping, Escape and the backdrop. */
.g2-gr-panel {
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--g2g-radius);
  background: var(--g2g-surface);
  color: var(--g2g-text);
  overflow: hidden;
}
.g2-gr-panel::backdrop { background: rgba(0, 0, 0, 0.55); }
.g2-gr-panel__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--g2g-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.g2-gr-panel__close:focus-visible { outline: 3px solid var(--g2g-accent); }
.g2-gr-panel__body { max-height: calc(100vh - 2rem); padding: 3rem 1rem 1rem; overflow-y: auto; }
