/* =============================================
   Google Reviews Display — Stylesheet v2
   ============================================= */

.grd-wrapper {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #333;
  margin: 0 auto;
  padding: 20px 0;
}

.grd-wrapper.grd-no-pad-top {
  padding-top: 0;
}

.grd-wrapper.grd-no-pad-bottom {
  padding-bottom: 0;
}

/* ── Header ── */
.grd-header {
  text-align: center;
  margin-bottom: 28px;
}

.grd-business-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.grd-location-label {
  font-size: 1rem;
  color: #666;
  margin: 0 0 8px;
}

.grd-overall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.grd-overall-score {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}

.grd-total-count {
  font-size: 0.9rem;
  color: #666;
}

.grd-google-logo svg {
  display: block;
  height: 25px;
}

/* ── Stars ── */
.grd-stars {
  display: inline-flex;
  gap: 1px;
  line-height: 1;
}

.grd-star svg {
  width: 20px;
  height: 20px;
}

.grd-star-full {
  color: #fbbc07;
}
.grd-star-half {
  color: #fbbc07;
}
.grd-star-empty {
  color: #dadce0;
}

/* ── Grid Layout ── */
.grd-layout-grid .grd-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── List Layout ── */
.grd-layout-list .grd-reviews-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Review Card ── */
.grd-review-card {
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 5px;
  padding: 20px 16px;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  box-sizing: border-box;
}

/* ── Reviewer Info ── */
.grd-reviewer-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
}

.grd-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.grd-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #4285f4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  text-transform: uppercase;
}

.grd-reviewer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.grd-name-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
}

.grd-reviewer-name {
  font-family: regulator-nova;
  font-feature-settings: 'salt';
  font-weight: 500;
  line-height: 1.2;
  font-size: 0.95rem;
  color: #692d73;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.grd-reviewer-name:hover {
  color: #4285f4;
  text-decoration: underline;
}

/* ── Verified badge ── */
.grd-verified-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
  cursor: default;
}

.grd-verified-badge svg {
  width: 14px;
  height: 14px;
}

/* Tooltip bubble — opens downward to stay within the slider overflow boundary */
.grd-verified-badge::after {
  content: 'Geverifieerde klant';
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #fff;
  font-size: 0.72rem;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  white-space: nowrap;
  padding: 4px 6px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 1;
  transition: all 0.15s ease;
  box-shadow: rgba(0, 0, 0, 0.3) 0 4px 12px;
  z-index: 10;
  opacity: 0;
}

.grd-verified-badge:hover::after {
  opacity: 1;
  top: calc(100% + 5px);
}

.grd-review-date {
  font-size: 0.78rem;
  color: #888;
}

.grd-review-location {
  font-size: 0.78rem;
  color: #888;
}

/* ── Review Stars (card) ── */
.grd-review-stars {
  margin-bottom: 8px;
}

.grd-review-stars .grd-star {
  font-size: 1.2rem;
}

/* ── Review Text ── */
.grd-review-text-wrap {
  position: relative;
}

.grd-review-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
  margin: 0;
  overflow: hidden;
  line-clamp: 5;
  -webkit-line-clamp: 5;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

/* Expanded state — must override display:-webkit-box and unset the clamp */
.grd-review-text.grd-text-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
  max-height: none;
}

/* Lees meer / Lees minder button */
.grd-read-more-btn {
  display: block; /* visible by default; JS hides it when text is short */
  margin-top: 6px;
  padding: 0;
  background: none;
  border: none;
  color: #b4b4b4;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
}

.grd-read-more-btn:hover {
  text-decoration: underline;
}

/* ── Swiper Slider Overrides ── */

.grd-slider-wrapper {
  position: relative;
}

/* Space for nav arrows and pagination dots */
.grd-layout-slider .grd-swiper {
  padding-bottom: 44px !important;
  padding-left: 4px;
  padding-right: 4px;
}

/* Cards inside slides fill the full slide height */
.grd-layout-slider .swiper-slide {
  height: auto;
}

.grd-layout-slider .swiper-slide .grd-review-card {
  height: 100%;
  box-sizing: border-box;
}

.swiper .swiper-pagination-bullets {
  position: relative;
  top: 0 !important;
  bottom: 0 !important;
  line-height: 27px;
  text-align: center;
  margin-top: 20px;
}

.swiper .swiper-pagination-bullets .swiper-pagination-bullet {
  border: 2px solid #6e6e6e;
  opacity: 1;
  transition: 0.25s ease-in-out;
  background-color: #fff;
  transform: none !important;
}

.swiper .swiper-pagination-bullets .swiper-pagination-bullet:hover {
  background-color: #dfdfdf;
}

.swiper .swiper-pagination-bullets .swiper-pagination-bullet-active {
  background-color: #666;
}

.grd-layout-slider .swiper-button-next,
.grd-layout-slider .swiper-button-prev {
  color: #692d73;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  background-color: #fff;
}

.grd-layout-slider .swiper-button-next:after,
.grd-layout-slider .swiper-button-prev:after {
  display: none;
}

.grd-layout-slider .swiper-button-next svg,
.grd-layout-slider .swiper-button-prev svg {
  font-size: 18px;
  height: 18px;
}

.grd-layout-slider .swiper-button-next {
  position: absolute;
  right: -60px;
}

.grd-layout-slider .swiper-button-prev {
  position: absolute;
  left: -60px;
}

/* ── Error / Empty States ── */
.grd-error {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 12px 16px;
  color: #856404;
}

.grd-no-reviews {
  color: #666;
  font-style: italic;
}

.review-google-logo {
  margin-top: 10px;
  width: 60px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .grd-layout-grid .grd-reviews-grid {
    grid-template-columns: 1fr;
  }
  .grd-overall-score {
    font-size: 1.8rem;
  }
}
