/* Google reviews slider (src/lib/google-reviews.mjs). Uses the site's colour and type tokens from styles.css.
   Wide screens: the summary on the left, three cards visible on the right. Tablets: summary above, two cards.
   Phones: one card with the next one peeking in, swipe or use the arrows. */

.greviews { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px); align-items: start; }

/* Summary */
.greviews-summary { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-top: 50px; }
.greviews-word { font-family: var(--display); font-size: 1.5rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.greviews-stars, .greview-stars { display: flex; gap: 2px; }
.greviews-stars svg, .greview-stars svg { fill: #f4b400; stroke: #a86f00; stroke-width: 1; stroke-linejoin: round; }
.greviews-stars svg { width: 30px; height: 30px; }
.greviews-based { font-size: .9375rem; color: var(--ink-soft); }
.greviews-based strong { color: var(--ink); font-weight: 600; }
.greviews-brand { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; color: var(--ink); text-decoration: none; border-radius: 4px; }
.greviews-brand img { display: block; height: 34px; width: auto; }
.greviews-brand .greviews-brand-g { width: 30px; height: 30px; }
.greviews-brand-text { font-family: var(--display); font-size: 1.75rem; font-weight: 500; letter-spacing: -.01em; }
.greviews-brand:hover .greviews-brand-text { text-decoration: underline; text-underline-offset: 4px; }
.greviews-brand:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

/* The row of cards */
.greviews-slider { position: relative; min-width: 0; }
.greviews-track { --gap: 20px; list-style: none; margin: 0; padding: 4px 2px 6px; display: flex; align-items: flex-start; gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-padding-left: 2px; }
.greviews-track:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 14px; }
.js .greviews-track { scrollbar-width: none; }
.js .greviews-track::-webkit-scrollbar { display: none; }
.greview { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 20px 20px; border-radius: 12px; background: #f4f5f6; }

.greview-head { display: flex; align-items: center; gap: 12px; }
.greview-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--av, var(--ink-soft)); color: #fff; font-weight: 600; font-size: 1.0625rem; }
.greview-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.greview-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.greview-date { font-size: .875rem; color: var(--ink-soft); }
.greview-g { flex: none; width: 20px; height: 20px; align-self: flex-start; }
.greview-stars svg { width: 20px; height: 20px; }
.greview-text { color: var(--ink); font-size: 1rem; line-height: 1.5; }

/* With JavaScript: five lines, then "Read more" (added by google-reviews.js when a review runs longer). Every card
   keeps room for five lines, so the row lines up; an opened card grows on its own. */
.js .greview-text { min-height: 7.5em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
/* Opened: the full review, scrolling inside the card past about 15 lines, so a long one doesn't stretch the row. */
.js .greview-text.is-open { display: block; -webkit-line-clamp: unset; line-clamp: none; max-height: 22.5em; overflow-y: auto;
  overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; }
.js .greview-text.is-open:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.greview-more { align-self: flex-start; margin-top: -4px; padding: 2px 0; border: 0; background: none; font: inherit; font-size: .9375rem;
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.greview-more:hover { color: var(--ink); }
.greview-more:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* Arrows */
.greviews-arrow { position: absolute; top: 136px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px;
  padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: 0 2px 8px -2px rgba(38, 40, 42, .25); transition: opacity .15s ease; }
.greviews-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.greviews-arrow[hidden] { display: none; }
.greviews-arrow:hover { border-color: var(--ink-soft); }
.greviews-arrow:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.greviews-arrow[aria-disabled="true"] { opacity: 0; pointer-events: none; }
.greviews-prev { left: -22px; }
.greviews-next { right: -22px; }

@media (max-width: 1000px) {
  .greviews { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .greviews-summary { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 0; }
  .greviews-word { font-size: 1.25rem; }
  .greviews-stars svg { width: 24px; height: 24px; }
  .greviews-brand { margin-top: 0; }
  .greviews-brand img { height: 28px; }
  .greviews-brand .greviews-brand-g { width: 24px; height: 24px; }
  .greviews-brand-text { font-size: 1.375rem; }
  .greview { flex-basis: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 640px) {
  .greviews-track { --gap: 14px; }
  .greview { flex-basis: 86%; padding: 16px 16px 18px; }
  .greviews-prev { left: -10px; }
  .greviews-next { right: -10px; }
  .greviews-arrow { width: 40px; height: 40px; margin-top: -20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .greviews-track { scroll-behavior: smooth; }
}

/* On a sky background (the home page's "Who you'll deal with"), the cards go white. */
.section--sky .greview { background: var(--paper); box-shadow: 0 1px 2px rgba(38, 40, 42, .05); }

/* 14 Oct 2026, 5:24pm (James: the home page brand pass): the strip now matches the site's other reviews. The rating
   word in normal case, not capitals; stars in the site's deep coral; white cards with a soft shadow on the pale blue
   section (were grey); each reviewer's initial in the orange sun ring, as in the hero and "Why choose SolarSave?" (the
   coloured circles came out). */
.greviews-word { text-transform: none; letter-spacing: -.01em; font-weight: 500; font-size: 1.75rem; }
.greviews-stars svg, .greview-stars svg { fill: var(--star); stroke: none; }
.greview { background: var(--paper); border-radius: 16px; box-shadow: 0 1px 2px rgba(38, 40, 42, .06), 0 14px 30px -20px rgba(38, 40, 42, .35); }
.greview-avatar { width: 38px; height: 38px; color: var(--ink); font-size: 1rem; border: 2px solid transparent;
  background: linear-gradient(var(--paper), var(--paper)) padding-box, linear-gradient(225deg, var(--sun-coral), var(--sun-amber)) border-box; }
