/* Google Reviews Widget Styles */
.gr-widget {
  font-family: 'Poppins', sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Summary bar */
.gr-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: #f8f8f8;
  border-radius: 8px;
}

.gr-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gr-summary-left svg {
  flex-shrink: 0;
}

.gr-summary-text {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.gr-summary-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gr-overall-rating {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.gr-total-reviews {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.gr-summary-right {
  flex-shrink: 0;
}

.gr-write-review-btn {
  display: inline-block;
  padding: 8px 20px;
  background: #ed1c24;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.gr-write-review-btn:hover {
  background: #c41019;
  color: #fff !important;
  text-decoration: none !important;
}

/* Stars */
.gr-stars {
  display: inline-flex;
  gap: 1px;
  margin-bottom: 8px;
}

.gr-star {
  font-size: 18px;
  line-height: 1;
}

.gr-star-full {
  color: #fbbc04;
}

.gr-star-half {
  color: #fbbc04;
  opacity: 0.6;
}

.gr-star-empty {
  color: #dadce0;
}

.gr-summary .gr-stars {
  margin-bottom: 0;
}

.gr-summary .gr-star {
  font-size: 20px;
}

/* Review cards — grid (default, no carousel) */
.gr-reviews-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.gr-review-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s;
}

.gr-review-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Carousel mode */
.gr-carousel-viewport {
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.gr-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.gr-carousel-slide {
  flex-shrink: 0;
  display: grid;
  gap: 20px;
  padding: 0 2px;
  box-sizing: border-box;
}

.gr-carousel-slide[data-cols="1"] {
  width: 100%;
  grid-template-columns: 1fr;
}

.gr-carousel-slide[data-cols="2"] {
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
}

.gr-carousel-slide[data-cols="3"] {
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
}

.gr-carousel-slide[data-cols="6"] {
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
}

.gr-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.gr-carousel-btn {
  background: none;
  border: 2px solid #ed1c24;
  color: #ed1c24;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding: 0;
  line-height: 1;
}

.gr-carousel-btn:hover {
  background: #ed1c24;
  color: #fff;
}

.gr-carousel-dots {
  display: flex;
  gap: 8px;
}

.gr-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.gr-carousel-dot.active {
  background: #ed1c24;
}

/* Review header with avatar */
.gr-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

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

.gr-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #20409a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.gr-author-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gr-author-name {
  font-weight: 600;
  font-size: 14px;
  color: #333 !important;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gr-review-time {
  font-size: 12px;
  color: #999;
}

/* Review text */
.gr-review-text {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin: 0;
}

.gr-read-more {
  color: #1a73e8 !important;
  text-decoration: none !important;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-family: inherit;
}

.gr-read-more:hover {
  text-decoration: underline !important;
}

/* Review popover / modal */
.gr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gr-modal-overlay.visible {
  opacity: 1;
}

.gr-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.gr-modal-overlay.visible .gr-modal {
  transform: translateY(0);
}

.gr-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 4px;
}

.gr-modal-close:hover {
  color: #333;
}

.gr-modal .gr-review-header {
  margin-bottom: 12px;
}

.gr-modal .gr-stars {
  margin-bottom: 16px;
}

.gr-modal .gr-review-text {
  font-size: 15px;
  line-height: 1.7;
}

.gr-modal .gr-modal-google-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: #1a73e8 !important;
  text-decoration: none !important;
}

.gr-modal .gr-modal-google-link:hover {
  text-decoration: underline !important;
}

/* ── Compact mode (data-compact on the widget div) ── */
.gr-widget-compact .gr-summary {
  padding: 10px 16px;
  margin-bottom: 16px;
  gap: 12px;
}

.gr-widget-compact .gr-summary-text {
  font-size: 14px;
}

.gr-widget-compact .gr-overall-rating {
  font-size: 18px;
}

.gr-widget-compact .gr-summary .gr-star {
  font-size: 16px;
}

.gr-widget-compact .gr-total-reviews {
  font-size: 12px;
}

.gr-widget-compact .gr-write-review-btn {
  padding: 5px 14px;
  font-size: 12px;
}

.gr-widget-compact .gr-review-card {
  padding: 14px 16px;
}

.gr-widget-compact .gr-avatar-placeholder {
  width: 32px;
  height: 32px;
  font-size: 15px;
}

.gr-widget-compact .gr-review-header {
  gap: 10px;
  margin-bottom: 6px;
}

.gr-widget-compact .gr-author-name {
  font-size: 13px;
}

.gr-widget-compact .gr-review-time {
  font-size: 11px;
}

.gr-widget-compact .gr-stars {
  margin-bottom: 4px;
}

.gr-widget-compact .gr-star {
  font-size: 14px;
}

.gr-widget-compact .gr-review-text {
  font-size: 13px;
  line-height: 1.5;
}

.gr-widget-compact .gr-carousel-btn {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.gr-widget-compact .gr-carousel-dot {
  width: 8px;
  height: 8px;
}

.gr-widget-compact .gr-carousel-nav {
  margin-bottom: 8px;
  gap: 12px;
}

.gr-widget-compact .gr-attribution {
  padding-top: 10px;
}

.gr-widget-compact .gr-attr-btn {
  padding: 6px 18px;
  font-size: 12px;
}

/* Attribution — side-by-side button pair */
.gr-attribution {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 10px;
  flex-wrap: wrap;
}

.gr-attr-btn {
  display: inline-block;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 500;
  color: #ed1c24 !important;
  background: transparent;
  border: 2px solid #ed1c24;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
}

.gr-attr-btn:hover {
  background: #ed1c24;
  color: #fff !important;
  text-decoration: none !important;
}

/* Legacy fallback for any non-btn attribution links */
.gr-attribution a:not(.gr-attr-btn) {
  font-size: 13px;
  color: #1a73e8 !important;
  text-decoration: none !important;
}

.gr-attribution a:not(.gr-attr-btn):hover {
  text-decoration: underline !important;
}

/* ── Dark banner variant (.gr-banner wrapper) ── */
.gr-banner {
  background: #aaaaaa;
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}
.gr-banner .gr-summary { background: rgba(255,255,255,0.45); }
.gr-banner .gr-summary-text, .gr-banner .gr-overall-rating { color: #222; }
.gr-banner .gr-total-reviews { color: #555; }
.gr-banner .gr-review-card { background: #fff; }
.gr-banner .gr-attr-btn { color: #ed1c24 !important; border-color: #ed1c24; }
.gr-banner .gr-carousel-btn { border-color: rgba(0,0,0,0.35); color: rgba(0,0,0,0.5); }
.gr-banner .gr-carousel-btn:hover { background: #ed1c24; border-color: #ed1c24; color: #fff; }
.gr-banner .gr-carousel-dot { background: rgba(0,0,0,0.2); }
.gr-banner .gr-carousel-dot.active { background: #ed1c24; }
.gr-banner .gr-widget-compact .gr-attr-btn { color: #ed1c24 !important; border-color: #ed1c24; }

/* Responsive */
@media (max-width: 768px) {
  .gr-summary {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .gr-reviews-track {
    grid-template-columns: 1fr;
  }

  .gr-modal {
    padding: 20px;
    max-height: 90vh;
  }
}
