/* Container */
.gre-container {
  max-width: 100%;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
    sans-serif;
  line-height: 1.4;
  color: #333;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Theme: Dark */
.gre-theme-dark {
  background-color: rgba(34, 34, 34, 0.5);
  color: #eee;
}

/* Header */
.gre-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.gre-theme-dark .gre-header {
  border-bottom-color: #444;
}

.gre-business-name {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 600;
}

.gre-business-address {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.gre-theme-dark .gre-business-address {
  color: #aaa;
}

.gre-business-rating {
  display: flex;
  align-items: center;
}

.gre-stars {
  display: flex;
  margin-right: 5px;
}

.gre-star {
  width: 18px;
  height: 18px;
  margin-right: 2px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.gre-star-full {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23FFC107"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>');
}

.gre-star-half {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23FFC107"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/><path d="M12 17.27V2" stroke="%23FFC107" stroke-width="2"/></svg>');
}

.gre-star-empty {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23FFC107" stroke-width="1"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>');
}

.gre-rating-value {
  font-size: 14px;
  font-weight: 600;
}

.gre-powered-by {
  font-size: 12px;
}

.gre-powered-by a {
  color: #1a73e8;
  text-decoration: none;
}

.gre-theme-dark .gre-powered-by a {
  color: #8ab4f8;
}

.gre-powered-by-link {
  color: #1a73e8;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.gre-powered-by-link:hover {
  text-decoration: underline;
}

.gre-theme-dark .gre-powered-by-link {
  color: #8ab4f8;
}

/* Reviews Container */
.gre-reviews {
  padding: 15px;
}

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

/* List Layout */
.gre-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Slider Layout */
.gre-reviews-slider {
  position: relative;
}

.gre-slider-nav {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
}

.gre-slider-prev,
.gre-slider-next {
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gre-theme-dark .gre-slider-prev,
.gre-theme-dark .gre-slider-next {
  background-color: #333;
  border-color: #444;
  color: #eee;
}

.gre-slider-prev:disabled,
.gre-slider-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Review */
.gre-review {
  display: flex;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 4px;
  background-color: #fafafa;
}

.gre-theme-dark .gre-review {
  border-color: #444;
  background-color: #333;
}

.gre-review-avatar {
  margin-right: 15px;
  flex-shrink: 0;
}

.gre-review-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.gre-avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gre-theme-dark .gre-avatar-placeholder {
  background-color: #444;
}

.gre-review-content {
  flex-grow: 1;
}

.gre-review-author {
  font-weight: 600;
  margin-bottom: 2px;
}

.gre-review-date {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.gre-theme-dark .gre-review-date {
  color: #aaa;
}

.gre-review-rating {
  display: flex;
  margin-bottom: 5px;
}

.gre-review-text {
  font-size: 14px;
  line-height: 1.5;
}

.gre-read-more {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 600;
}

.gre-theme-dark .gre-read-more {
  color: #8ab4f8;
}

/* Load More Button */
.gre-load-more-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border-top: 1px solid #eee;
  background-color: #f9f9f9;
  text-align: center;
}

.gre-theme-dark .gre-load-more-container {
  border-top-color: #444;
  background-color: #2a2a2a;
}

.gre-load-more-button {
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 10px;
}

.gre-load-more-button:hover {
  background-color: #1557b0;
}

.gre-theme-dark .gre-load-more-button {
  background-color: #8ab4f8;
  color: #222;
}

.gre-theme-dark .gre-load-more-button:hover {
  background-color: #6b9ef5;
}

.gre-reviews-count {
  font-size: 13px;
  color: #666;
}

.gre-theme-dark .gre-reviews-count {
  color: #aaa;
}

/* Footer */
.gre-footer {
  padding: 10px 15px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.gre-theme-dark .gre-footer {
  border-top-color: #444;
}

.gre-google-logo {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 600;
}

.gre-theme-dark .gre-google-logo {
  color: #8ab4f8;
}

.gre-powered-by-link {
  color: #1a73e8;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.gre-powered-by-link:hover {
  text-decoration: underline;
}

.gre-theme-dark .gre-powered-by-link {
  color: #8ab4f8;
}

.gre-last-updated {
  color: #666;
  font-size: 11px;
  font-style: italic;
}

.gre-theme-dark .gre-last-updated {
  color: #aaa;
}

/* No Reviews */
.gre-no-reviews {
  padding: 30px;
  text-align: center;
  color: #666;
}

.gre-theme-dark .gre-no-reviews {
  color: #aaa;
}

/* Error */
.gre-error {
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin-bottom: 15px;
}

.gre-theme-dark .gre-error {
  background-color: #2d1a1c;
  color: #f8d7da;
  border-color: #5c2a2f;
}

/* Responsive */
@media (max-width: 768px) {
  .gre-reviews-grid {
    grid-template-columns: 1fr;
  }

  .gre-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gre-powered-by {
    margin-top: 10px;
  }
}

/* For smaller screens, adjust the pagination */
@media (max-width: 480px) {
  .gre-pagination {
    flex-direction: column;
    gap: 10px;
  }

  .gre-page-info {
    order: -1;
    margin-bottom: 5px;
  }

  .gre-footer {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
}

/* Carousel Layout */
.gre-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  margin: 20px 0;
  overflow: hidden;
}

.gre-carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
}

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

.gre-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 0 10px;
}

.gre-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid #ddd;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gre-carousel-arrow:hover {
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gre-carousel-arrow:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

.gre-carousel-prev {
  left: 0;
}

.gre-carousel-next {
  right: 0;
}

.gre-arrow-icon {
  font-size: 18px;
  line-height: 1;
}

.gre-carousel-indicators {
  display: flex;
  justify-content: center;
  margin: 15px 0;
  gap: 8px;
}

.gre-carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ddd;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.gre-carousel-indicator.active {
  background-color: #1a73e8;
  transform: scale(1.2);
}

.gre-carousel-indicator:hover {
  background-color: #bbb;
}

.gre-carousel-indicator:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Dark theme for carousel */
.gre-theme-dark .gre-carousel-arrow {
  background-color: rgba(50, 50, 50, 0.8);
  border-color: #444;
  color: #eee;
}

.gre-theme-dark .gre-carousel-arrow:hover {
  background-color: rgba(60, 60, 60, 1);
}

.gre-theme-dark .gre-carousel-indicator {
  background-color: #555;
}

.gre-theme-dark .gre-carousel-indicator.active {
  background-color: #8ab4f8;
}

.gre-theme-dark .gre-carousel-indicator:hover {
  background-color: #777;
}

/* Responsive carousel */
@media (max-width: 768px) {
  .gre-carousel-container {
    padding: 0 30px;
  }

  .gre-carousel-arrow {
    width: 30px;
    height: 30px;
  }

  .gre-arrow-icon {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .gre-carousel-container {
    padding: 0 25px;
  }

  .gre-carousel-arrow {
    width: 25px;
    height: 25px;
  }

  .gre-arrow-icon {
    font-size: 12px;
  }

  .gre-carousel-indicator {
    width: 8px;
    height: 8px;
  }
}

/* Add A Review Button */
.gre-add-review-container {
  text-align: center;
  margin: 20px auto;
  width: 100%;
  display: flex;
  justify-content: center;
}

.gre-add-review-button {
  display: inline-block;
  background-color: #1a73e8;
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  line-height: 1.5;
  text-align: center;
}

.gre-add-review-button:hover,
.gre-add-review-button:focus {
  background-color: #1557b0;
  text-decoration: none;
  color: white;
}

/* Add A Review Button - with !important flags for theme compatibility */
.gre-add-review-container {
  text-align: center !important;
  margin: 20px auto !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  padding: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 100 !important;
}

.gre-add-review-button {
  display: inline-block !important;
  background-color: #1a73e8 !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  transition: background-color 0.3s ease, transform 0.2s ease !important;
  font-size: 16px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  border: none !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
  text-align: center !important;
  margin: 0 auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 101 !important;
}

.gre-add-review-button:hover,
.gre-add-review-button:focus {
  background-color: #1557b0 !important;
  text-decoration: none !important;
  color: white !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-2px) !important;
}

.gre-add-review-button:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.gre-theme-dark .gre-add-review-button {
  background-color: #8ab4f8 !important;
  color: #222 !important;
}

.gre-theme-dark .gre-add-review-button:hover,
.gre-theme-dark .gre-add-review-button:focus {
  background-color: #6b9ef5 !important;
  color: #222 !important;
}

/* Hide the last updated timestamp */
.gre-footer-right {
  display: none !important;
}

