/* Port of ReviewsSection.astro + ReviewCard.astro scoped styles */

.reviews-section {
  position: relative;
  overflow: visible;
}

.google-badge-wrap {
  position: relative;
  padding-top: 0;
  padding-bottom: 14px;
}

.bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(27, 84, 216, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(212, 160, 18, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.google-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 10px 20px;
  background: var(--glass-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.12));
  border-radius: 9999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .google-badge {
    flex-direction: column;
    gap: 4px;
    border-radius: 14px;
    padding: 8px 16px;
  }
}

.google-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.badge-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 480px) {
  .badge-info {
    flex-direction: column;
    gap: 2px;
    align-items: center;
  }
}

.badge-rating {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent, #D4A012);
}

.badge-count {
  font-size: 0.75rem;
  color: var(--text-muted, var(--text));
  opacity: 0.8;
}

/* ─── Carousel ─────────────────────────────────────────────── */
.reviews-carousel-wrapper {
  position: relative;
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
}

.reviews-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  padding: 12px 4px;
  margin: -12px -4px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.reviews-carousel-track::-webkit-scrollbar {
  display: none;
}

/* ─── Dots ─────────────────────────────────────────────────── */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glass-border, rgba(255, 255, 255, 0.15));
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot:hover {
  background: rgba(27, 84, 216, 0.5);
  transform: scale(1.2);
}

.carousel-dot--active {
  background: var(--primary, #1B54D8);
  width: 24px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(27, 84, 216, 0.4);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--primary, #1B54D8);
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  .carousel-dot:nth-child(n+8) { display: none; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .carousel-dot:nth-child(n+9) { display: none; }
}

@media (max-width: 767px) {
  .carousel-dot:nth-child(n+10) { display: none; }
}

/* ─── Review Card ──────────────────────────────────────────── */
.review-card-wrapper {
  flex: 0 0 88%;
  scroll-snap-align: center;
  min-width: 0;
}

@media (min-width: 768px) {
  .review-card-wrapper {
    flex: 0 0 calc(50% - 10px);
  }
}

@media (min-width: 1024px) {
  .review-card-wrapper {
    flex: 0 0 calc(33.333% - 13.33px);
  }
}

.review-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px !important;
}

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

.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #1B54D8), rgba(27, 84, 216, 0.6));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.reviewer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reviewer-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading);
}

.reviewer-location {
  font-size: 0.78rem;
  color: var(--text-muted, var(--text));
  opacity: 0.7;
}

.stars {
  display: flex;
  gap: 3px;
}

.star {
  width: 18px;
  height: 18px;
}

.star--filled {
  fill: var(--color-accent, #D4A012);
  stroke: var(--color-accent, #D4A012);
}

.star--empty {
  fill: none;
  stroke: var(--text-muted, #aaa);
  opacity: 0.4;
}

.review-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.review-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-content-wrapper--expanded .review-text {
  display: block;
  -webkit-line-clamp: unset;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 6px;
}

.review-content-wrapper--expanded .review-text::-webkit-scrollbar {
  width: 4px;
}

.review-content-wrapper--expanded .review-text::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.review-content-wrapper--expanded .review-text::-webkit-scrollbar-thumb {
  background: var(--primary, #1B54D8);
  border-radius: 4px;
}

.see-more-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--primary, #1B54D8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.see-more-btn:hover {
  color: var(--color-accent, #D4A012);
  text-decoration: underline;
}

.review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border, rgba(255,255,255,0.08));
}

.review-date {
  font-size: 0.78rem;
  color: var(--text-muted, var(--text));
  opacity: 0.6;
}

.google-mini {
  width: 18px;
  height: 18px;
}
