/* cs-google-reviews — live Google reviews via Elfsight, reskinned to match the
   cs-testimonials stacked-card design (peach backdrop + off-white card).
   All rem values follow BB Theme's html { font-size: 10px } base — 1.8rem = 18px.

   The Elfsight widget renders client-side into open DOM (no shadow root / no
   iframe) with stable `es-*` utility classes; its dashboard-configured looks
   arrive as INLINE styles, so overrides of those need !important. */

.cs-google-reviews {
  padding-block: var(--cs-space-2xl);
  font-family: var(--cs-font-body);
  color: var(--cs-ink);
}

.cs-google-reviews__inner {
  max-width: var(--cs-container);
  margin: 0 auto;
  padding-inline: var(--cs-gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cs-space-lg);
}

/* Heading — doubled-up so it survives BB Global Styles' h2 rules. */
.cs-google-reviews .cs-google-reviews__heading {
  margin: 0;
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 3vw + 1rem, 4rem); /* 32px → 40px */
  font-style: normal;
  line-height: 1.5;
  letter-spacing: var(--cs-tracking-tight);
  color: var(--cs-blue-dark);
  text-align: center;
  text-wrap: balance;
}

/* ---------- Stage: peach backdrop + the widget as the "card" ---------- */
.cs-google-reviews__stage {
  position: relative;
  width: 100%;
  max-width: 99.2rem; /* 992px */
  padding: 4rem 0 4rem 4rem;
  isolation: isolate;
}

.cs-google-reviews__backdrop {
  position: absolute;
  inset: 0;
  border-radius: 4.2rem;
  background: rgba(240, 183, 164, 0.3);
  z-index: 0;
}

/* The widget's own outer band plays the role of the off-white card,
   nudged up-left so the backdrop peeks bottom-right. */
.cs-google-reviews__widget {
  position: relative;
  z-index: 1;
  transform: translate(-2.5rem, -1.5rem);
  /* Reserve space so the band doesn't collapse before the lazy widget mounts. */
  min-height: 30rem;
}

/* ---------- Elfsight reskin ---------- */
/* Root width: dashboard pins it at 800px inline — let it fill the stage. */
.cs-google-reviews .es-embed-root {
  max-width: 100% !important;
}

/* Outer band: dark grey + 24px radius inline → off-white card. */
.cs-google-reviews .es-background-base {
  background-color: #F2F1F0 !important;
}

.cs-google-reviews .es-background-container,
.cs-google-reviews .es-widget-background-container {
  border-radius: 4.9rem !important;
}

.cs-google-reviews .es-widget-background-wrapper {
  padding: 3.6rem 4rem 2.4rem !important;
}

/* Inner per-review card: the outer band is the card now, so flatten it. */
.cs-google-reviews .es-review-background-container {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Quote text — mirror cs-testimonials__quote. */
.cs-google-reviews .es-review-content-text-container,
.cs-google-reviews .es-review-content-text-container * {
  font-family: var(--cs-font-display) !important;
  font-weight: 500 !important;
  font-size: clamp(1.8rem, 1.5vw + 1rem, 2.4rem) !important; /* 18px → 24px */
  line-height: 1.5 !important;
  color: var(--cs-blue-dark) !important;
}

/* "Read more" toggle stays visually distinct from the quote. */
.cs-google-reviews .es-text-shortener-control {
  font-family: var(--cs-font-display) !important;
  font-weight: 700 !important;
  font-size: 1.8rem !important;
  color: var(--cs-blue) !important;
}

/* Author line — mirror cs-testimonials__author. */
.cs-google-reviews .es-review-author-block-container,
.cs-google-reviews .es-review-author-block-container * {
  font-family: var(--cs-font-display) !important;
  color: var(--cs-blue-dark) !important;
}

/* Carousel arrows — mirror cs-testimonials__arrow (ink icon, pale hover ring). */
.cs-google-reviews .es-carousel-arrow-control {
  background: transparent !important;
  color: var(--cs-ink) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  transition: background 200ms ease, color 200ms ease;
}

.cs-google-reviews .es-carousel-arrow-control:hover,
.cs-google-reviews .es-carousel-arrow-control:focus-visible {
  background: var(--cs-blue-pale) !important;
  color: var(--cs-blue-dark) !important;
}

/* Elfsight paints the arrow SVG white via its own stylesheet — follow our ink. */
.cs-google-reviews .es-carousel-arrow-control-icon svg {
  fill: currentColor !important;
}

/* ---------- Footer CTA (orange pill, same as cs-testimonials) ---------- */
.cs-google-reviews__cta-row {
  display: flex;
  justify-content: center;
  margin-top: var(--cs-space-lg);
}

.cs-google-reviews .cs-google-reviews__cta,
.cs-google-reviews .cs-google-reviews__cta:link,
.cs-google-reviews .cs-google-reviews__cta:visited {
  display: inline-block;
  background: var(--cs-orange);
  color: var(--cs-white);
  font-family: var(--cs-font-display);
  font-weight: 700;
  font-size: 1.8rem; /* 18px */
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-align: center;
  min-width: min(33rem, 100%);
  padding: 1rem 3.2rem;
  border-radius: var(--cs-radius-pill);
  transition: background 250ms ease-in-out, color 250ms ease-in-out, box-shadow 250ms ease-in-out, filter 250ms ease-in-out, transform 250ms ease-in-out;
}

.cs-google-reviews .cs-google-reviews__cta.cs-google-reviews__cta:hover,
.cs-google-reviews .cs-google-reviews__cta.cs-google-reviews__cta:focus-visible {
  background: var(--cs-orange);
  color: var(--cs-white);
  filter: brightness(1.08);
  box-shadow: 0 0.8rem 2rem -0.8rem rgba(180, 79, 45, 0.6);
  transform: scale(1.02);
  text-decoration: none;
}

/* ---------- Responsive (mirrors cs-testimonials breakpoints) ---------- */
@media (max-width: 900px) {
  .cs-google-reviews {
    padding-block: var(--cs-space-section-sm);
  }
  .cs-google-reviews__stage {
    padding: 3rem 0 3rem 3rem;
  }
  .cs-google-reviews__widget {
    transform: translate(-2rem, -1rem);
  }
  .cs-google-reviews .es-background-container,
  .cs-google-reviews .es-widget-background-container {
    border-radius: 3.6rem !important;
  }
  .cs-google-reviews .es-widget-background-wrapper {
    padding: 2.8rem 2.4rem 2rem !important;
  }
  .cs-google-reviews__backdrop {
    border-radius: 3.2rem;
  }
}

@media (max-width: 640px) {
  .cs-google-reviews__stage {
    padding: 2rem 0 2rem 2rem;
  }
  .cs-google-reviews__widget {
    transform: translate(-1.2rem, -0.8rem);
  }
}

@media (max-width: 768px) {
  .cs-google-reviews .cs-google-reviews__cta {
    width: 100%;
    min-width: 0;
  }
}

/* ---------- Featured review card (change request 2026-09-13 T6.6) ----------
   White card, orange accent rule + stars, attribution row — the site's
   classic-content quote recipe scaled up for a standalone testimonial. */
.cs-google-reviews__featured {
  max-width: 86rem;
  margin: 0 auto var(--cs-space-lg);
  padding: var(--cs-space-lg);
  background: var(--cs-white);
  border-left: 3px solid var(--cs-orange);
  border-radius: 0 2.4rem 2.4rem 0;
  box-shadow: 0 1.2rem 3.2rem rgba(27, 83, 134, 0.08);
  display: flex;
  flex-direction: column;
  gap: var(--cs-space-sm);
}

.cs-google-reviews__featured-stars {
  color: var(--cs-orange);
  font-size: 2rem; /* 20px */
  letter-spacing: 0.3em;
  line-height: 1;
}

/* Doubled class + resets so the theme's default blockquote bar loses. */
.cs-google-reviews .cs-google-reviews__featured-quote {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--cs-font-display);
  font-weight: 500;
  font-style: italic;
  font-size: 1.8rem; /* 18px */
  line-height: 1.6;
  color: var(--cs-ink);
}

.cs-google-reviews__featured-quote p {
  margin: 0 0 var(--cs-space-sm);
}
.cs-google-reviews__featured-quote p:last-child {
  margin-bottom: 0;
}

.cs-google-reviews__featured-attribution {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  font-size: 1.8rem;
}

.cs-google-reviews__featured-author {
  font-family: var(--cs-font-display);
  font-weight: 700;
  color: var(--cs-blue-dark);
}

.cs-google-reviews__featured-source {
  color: var(--cs-ink-soft);
}

@media (max-width: 640px) {
  .cs-google-reviews__featured {
    padding: var(--cs-space-md);
  }
}
