/**
 * Reviews Carousel Styles
 * 
 * Mobile-first responsive styling for the reviews carousel widget
 */

/* ==========================================================================
   Base Styles & Container
   ========================================================================== */

.jcd-reviews-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   Google Rating Badge
   ========================================================================== */

.jcd-google-badge-link {
  width: 100%;
  display: inline-block;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  background: #FFF;
  border-radius: 20px;
  overflow: hidden;
}

.jcd-google-badge {
  display: flex;
  width: 100%;
  padding: 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  border: 1px solid #DEC8C8;
  background: conic-gradient(from 16deg at -60.71% 221.15%, rgba(227, 54, 41, 0.10) 45deg, #FFF 360deg);
  backdrop-filter: blur(10.899999618530273px);
}

.jcd-badge-content {
  display: flex;
  width: 100%;
  padding: 4px 6px;
  justify-content: space-between;
  align-items: center;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.50);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.40) 0%, rgba(251, 251, 251, 0.20) 100%);
}

.jcd-badge-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.jcd-badge-text {
  display: flex;
  flex-direction: column;
  color: #0A0000;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.28px;
  margin-bottom: -3px;
}

.jcd-badge-rating span,
.jcd-badge-count span {
  font-weight: 700;
}

.jcd-badge-stars {
  display: flex;
  gap: 0;
  align-items: center;
  flex-shrink: 0;
}

.jcd-badge-stars .jcd-star-icon {
  color: #F17C69;
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Swiper Container
   ========================================================================== */

.jcd-reviews-swiper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* ==========================================================================
   Review Card
   ========================================================================== */

.jcd-review-card {
  position: relative;
  width: 100%;
  min-height: 400px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.jcd-review-card picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.jcd-review-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jcd-review-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 36.48%, #3B302D 73.77%);
  z-index: 1;
}

.jcd-review-content {
  position: relative;
  z-index: 2;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  margin-top: auto;
}

/* ==========================================================================
   Star Rating
   ========================================================================== */

.jcd-review-rating {
  display: flex;
}

.jcd-star-icon {
  color: #ffd700;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Mobile: Hide desktop rating, show mobile rating */
.jcd-desktop-rating {
  display: none;
}

.jcd-mobile-rating {
  display: flex;
}

/* ==========================================================================
   Review Text
   ========================================================================== */
.jcd-review-text {
  color: #FFF;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.28px;
  margin-bottom: 8px;
}

/* ==========================================================================
   Review Footer
   ========================================================================== */

.jcd-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #555;
  padding-top: 8px;
}

.jcd-reviewer-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

img.jcd-reviewer-photo {
  width: 32px;
  height: 32px;
  aspect-ratio: 1/1;
  border-radius: 32px;
}

.jcd-reviewer-name {
  color: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: 0.36px;
}

/* ==========================================================================
   Navigation Buttons (Desktop Only)
   ========================================================================== */

.jcd-carousel-navigation {
  display: none;
  /* Hidden on mobile by default */
}

.jcd-nav-button {
  position: absolute;
  top: auto;
  bottom: 24px;
  z-index: 10;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.jcd-nav-button:hover {
  transform: scale(1.05);
}

.jcd-nav-button svg {
  color: #333333;
}

.swiper-button-prev.jcd-nav-button {
  right: 44px;
  left: auto;
}

.swiper-button-next.jcd-nav-button {
  right: 16px;
  left: auto;
}

.jcd-nav-button.swiper-button-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.jcd-nav-button.swiper-button-disabled:hover {
  transform: scale(1);
}

/* Remove default Swiper button styles */
.jcd-nav-button::after {
  display: none;
}

/* Hide default Swiper arrow backgrounds */
.jcd-nav-button,
.swiper-button-next,
.swiper-button-prev {
  background-image: none !important;
}

/* ==========================================================================
   Pagination Dots (Mobile Only)
   ========================================================================== */

.jcd-carousel-pagination {
  position: relative !important;
  bottom: 0 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 0 0;
}

.jcd-carousel-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background-color: #D9D9D9;
  opacity: 1;
  margin: 0 !important;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.jcd-carousel-pagination .swiper-pagination-bullet-active {
  background-color: #DC2E14;
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   Responsive Styles - Desktop (768px+)
   ========================================================================== */

@media (min-width: 768px) {

  /* Google Badge */
  .jcd-google-badge {
    margin: 0;
    padding: 6px 7px;
  }

  .jcd-badge-content {
    padding: 8px 12px;
  }

  .jcd-badge-text {
    display: block;
  }

  /* Review Card */
  .jcd-review-card {
    min-height: 500px;
  }

  .jcd-review-content {
    padding: 16px;
    height: min-content;
  }

  /* Star Rating - Desktop */
  .jcd-desktop-rating {
    display: flex;
    margin-bottom: 8px;
  }

  .jcd-mobile-rating {
    display: none;
  }

  /* Review Footer */
  .jcd-reviewer-info {
    gap: 14px;
  }

  img.jcd-reviewer-photo {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 40px;
  }

  /* Navigation - Show on Desktop */
  .jcd-carousel-navigation {
    display: block;
  }

  /* Pagination - Hide on Desktop */
  .jcd-carousel-pagination {
    display: none !important;
  }

}


/* ==========================================================================
   Animations & Transitions
   ========================================================================== */

.jcd-review-card {
  transition: transform 0.3s ease;
}

.swiper-slide-active .jcd-review-content {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.jcd-reviews-carousel-wrapper:not(.swiper-initialized) {
  opacity: 0;
}

.jcd-reviews-carousel-wrapper.swiper-initialized {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.jcd-nav-button:focus,
.swiper-pagination-bullet:focus {
  outline: 2px solid #ff6b7a;
  outline-offset: 2px;
}