/* Frontend Styles for Webbed GMB Reviews */

/* Common Styles */
.webbed-gmb-badge,
.webbed-gmb-slider-wrapper,
.webbed-gmb-grid {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

/* Badge Styles */
.webbed-gmb-badge {
  display: inline-block;
  max-width: 250px;
}

.gmb-badge-container {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gmb-badge-header {
  margin-bottom: 15px;
}

.gmb-google-logo {
  height: 24px;
  width: auto;
}

.gmb-badge-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.gmb-rating-number {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
}

.gmb-badge-reviews {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 10px;
}

.gmb-badge-business {
  font-size: 12px;
  color: #80868b;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
}

/* Stars */
.gmb-stars {
  display: inline-flex;
  gap: 2px;
}

.gmb-star {
  font-size: 20px;
  line-height: 1;
}

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

.gmb-star-half {
  background: linear-gradient(90deg, #fbbc04 50%, #e0e0e0 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gmb-star-empty {
  color: #e0e0e0;
}

/* Review Card Common */
.gmb-review-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gmb-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

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

.gmb-review-author {
  flex: 1;
}

.gmb-review-name {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 15px;
  margin-bottom: 4px;
}

.gmb-review-stars {
  display: flex;
  gap: 2px;
}

.gmb-review-stars .gmb-star {
  font-size: 16px;
}

.gmb-review-text {
  color: #3c4043;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.gmb-review-date {
  font-size: 12px;
  color: #80868b;
}

/* Slider Styles */
.webbed-gmb-slider-wrapper {
  position: relative;
  max-width: 100%;
  margin: 40px auto;
}

.webbed-gmb-slider {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.webbed-gmb-slider-track {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.gmb-review-slide {
  flex: 0 0 auto;
  width: 100%; /* Default to 1 slide (mobile) - JS will override */
  padding: 0 10px;
  box-sizing: border-box;
}

/* Remove old active class logic */
.gmb-review-slide.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gmb-slider-prev,
.gmb-slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
}

.gmb-slider-prev:hover,
.gmb-slider-next:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gmb-slider-prev {
  left: -20px;
}

.gmb-slider-next {
  right: -20px;
}

.gmb-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.gmb-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0e0e0;
  cursor: pointer;
  transition: all 0.3s;
}

.gmb-slider-dot.active {
  background: #1a73e8;
  width: 24px;
  border-radius: 5px;
}

/* Grid Styles */
.webbed-gmb-grid {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.webbed-gmb-grid[data-columns='2'] {
  grid-template-columns: repeat(2, 1fr);
}

.webbed-gmb-grid[data-columns='3'] {
  grid-template-columns: repeat(3, 1fr);
}

.webbed-gmb-grid[data-columns='4'] {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive Grid */
@media (max-width: 1024px) {
  .webbed-gmb-grid[data-columns='4'] {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .webbed-gmb-grid[data-columns='3'],
  .webbed-gmb-grid[data-columns='4'] {
    grid-template-columns: repeat(2, 1fr);
  }

  .gmb-slider-prev {
    left: 10px;
  }

  .gmb-slider-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .webbed-gmb-grid {
    grid-template-columns: 1fr;
  }

  .gmb-review-card {
    padding: 15px;
  }

  .gmb-review-text {
    font-size: 13px;
  }
}

/* Translation Button */
.gmb-translate-btn {
  background: none;
  border: none;
  padding: 0;
  color: #1a73e8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-family: inherit;
}

.gmb-translate-btn:hover {
  text-decoration: underline;
}
