/* Header */

.ulasan-header-section {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .ulasan-header-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 3rem;
  }
}

.ulasan-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #8c6d53;
  margin-bottom: 0.375rem;
}

@media (min-width: 640px) {
  .ulasan-subtitle {
    font-size: 0.875rem;
  }
}

.dark .ulasan-subtitle {
  color: #b89b83;
}

.ulasan-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 1.875rem;
  font-weight: 700;
  color: #2d5332;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .ulasan-title {
    font-size: 3rem;
  }
}

.dark .ulasan-title {
  color: #8ab88a;
}

.ulasan-desc {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #4b5563;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .ulasan-desc {
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .ulasan-desc {
    font-size: 1rem;
  }
}

.dark .ulasan-desc {
  color: #d1d5db;
}

/* Filter Tabs */

.filter-tab {
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-tab:hover {
  transform: translateY(-1px);
}

.filter-tab:active {
  transform: scale(0.95);
}

.filter-tab.active {
  background-color: #5a7d5a !important;
  color: #ffffff !important;
  border-color: #5a7d5a !important;
  box-shadow: 0 4px 16px rgba(90, 125, 90, 0.3);
}

.filter-tab.active:hover {
  background-color: #486548 !important;
  color: #ffffff !important;
  border-color: #486548 !important;
}

.dark .filter-tab.active {
  background-color: #6b956b !important;
  color: #ffffff !important;
  border-color: #6b956b !important;
}

.dark .filter-tab.active:hover {
  background-color: #5a805a !important;
  color: #ffffff !important;
  border-color: #5a805a !important;
}

/* Rating Bintang */

.star-rating .star {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.star-rating .star svg {
  color: #d1d5db;
  fill: transparent;
  transition: color 0.2s ease, fill 0.2s ease;
}

.dark .star-rating .star svg {
  color: #4b5563;
  fill: transparent;
}

.star-rating .star:hover {
  transform: scale(1.25);
}

.star-rating .star.active svg {
  color: #f59e0b;
  fill: #f59e0b;
}

.star-rating .star.active-click {
  animation: starPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes starPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Ticker & Grid Ulasan */

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 120s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #f1efe9;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: background-color 0.3s ease,
              border-color 0.3s ease,
              transform 0.3s ease,
              box-shadow 0.3s ease;
}

.dark .ticker-item {
  background: #1c221e;
  border-color: #2b342e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ticker-item:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(90, 125, 90, 0.12);
}

.ticker-track.reviews-grid-mode {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  animation: none !important;
  transform: none !important;
}

@media (min-width: 640px) {
  .ticker-track.reviews-grid-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .ticker-track.reviews-grid-mode {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ticker-track.reviews-grid-mode .col-span-full {
  grid-column: 1 / -1;
}

.ticker-track.reviews-grid-mode .bg-amber-400 { background-color: #fbbf24; }
.ticker-track.reviews-grid-mode .tabular-nums { font-variant-numeric: tabular-nums; }
.ticker-track.reviews-grid-mode .min-w-\[180px\] { min-width: 180px; }
.ticker-track.reviews-grid-mode .h-1\.5 { height: 0.375rem; }
.ticker-track.reviews-grid-mode .items-end { align-items: flex-end; }
.ticker-track.reviews-grid-mode .opacity-40 { opacity: 0.4; }
.ticker-track.reviews-grid-mode .px-0\.5 { padding-left: 0.125rem; padding-right: 0.125rem; }

/* Thumbnail Ulasan */

.aspect-square {
  aspect-ratio: 1 / 1 !important;
}

.review-thumb-box {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  border-radius: 0.75rem !important;
  background-color: #161c17;
}

.review-thumb-box > img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

.review-upload-slot {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
}

.review-upload-slot > img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Lightbox Ulasan */

.review-lightbox-dialog {
  width: 100%;
  max-width: min(94vw, 560px);
  background-color: #b89b83;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(140, 109, 83, 0.45);
  display: flex;
  flex-direction: column;
  margin: auto;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 640px) {
  .review-lightbox-dialog {
    max-width: min(92vw, 680px);
    border-radius: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .review-lightbox-dialog {
    max-width: min(90vw, 800px);
  }
}

:is(.dark .review-lightbox-dialog) {
  background-color: #141916;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
}

.lightbox-header-el {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  background-color: #b89b83;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #ffffff;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 640px) {
  .lightbox-header-el {
    padding: 0.875rem 1.25rem;
  }
}

:is(.dark .lightbox-header-el) {
  background-color: rgba(19, 24, 21, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.lightbox-slider-box {
  position: relative;
  width: 100%;
  min-height: 240px;
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #ffffff 0%, #f6f1eb 100%);
  padding: 0.75rem;
  overflow: hidden;
  transition: background 0.25s ease;
}

:is(.dark .lightbox-slider-box) {
  background: radial-gradient(circle at center, rgba(32, 42, 36, 0.6) 0%, rgba(10, 14, 12, 0.96) 100%);
}

.lightbox-img-el {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0.5rem;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 10px 25px rgba(140, 109, 83, 0.25);
  transition: box-shadow 0.25s ease;
}

:is(.dark .lightbox-img-el) {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid #b89b83;
  color: #8c6d53;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(140, 109, 83, 0.28);
}

.lightbox-nav-btn:hover {
  background: #b89b83;
  color: #ffffff;
  border-color: #b89b83;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(140, 109, 83, 0.4);
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

:is(.dark .lightbox-nav-btn) {
  background: rgba(18, 24, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

:is(.dark .lightbox-nav-btn:hover) {
  background: rgba(45, 65, 48, 0.95);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.lightbox-nav-prev { left: 0.5rem; }
.lightbox-nav-next { right: 0.5rem; }

@media (min-width: 640px) {
  .lightbox-nav-btn { width: 2.75rem; height: 2.75rem; }
  .lightbox-nav-prev { left: 0.875rem; }
  .lightbox-nav-next { right: 0.875rem; }
}

.lightbox-dots-el {
  padding: 0.625rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #b89b83;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

:is(.dark .lightbox-dots-el) {
  background-color: rgba(19, 24, 21, 0.95);
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Skeleton */

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #eae5d8 0%,
    #f6f2e9 35%,
    #eae5d8 70%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite ease-in-out;
  border-radius: 0.5rem;
}

.dark .skeleton {
  background: linear-gradient(
    90deg,
    #1d241f 0%,
    #2a352d 35%,
    #1d241f 70%
  );
  background-size: 200% 100%;
}

.skeleton-text {
  height: 0.85rem;
  border-radius: 0.375rem;
}

.skeleton-avatar {
  border-radius: 9999px;
}
