/**
 * Review Styles
 * File: orvix-core/modules/review-archive/reviews.css
 */

/* -- Archive list (Bricks Code Block) ---------------------------------------- */
.review-archive-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.review-archive__header {
  margin-bottom: 32px;
}
.review-archive__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.review-archive__count {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}
.review-archive__empty {
  text-align: center;
  color: #6b7280;
  padding: 64px 0;
}
.review-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* -- Card -------------------------------------------------------------------- */
.review-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* -- Header ------------------------------------------------------------------ */
.rc-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rc-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}
.rc-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.rc-avatar__fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
}
.rc-meta {
  flex: 1;
  min-width: 0;
  line-height: normal;
}
.rc-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rc-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}
.rc-source-icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
  color: inherit;
}
.rc-date {
  display: block;
  font-size: 1.25rem;
  color: #6b7280;
}
.rc-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
  color: #22c55e;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: normal;
  white-space: nowrap;
}

/* -- Booking ----------------------------------------------------------------- */
.rc-info {
  font-size: 1.5rem;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px;
}
.rc-info__booked, .rc-info__departure {
    display: flex;
    align-items: center;
}

@media (max-width: 767px) {
    .rc-info__booked {
        display: block;
    }
    .rc-info {
        font-size: 1.25rem;
    }
}
.rc-booked__label {
  color: #6b7280;
  flex-shrink: 0;
  font-weight: 500;
  margin-right: 5px;
}
.rc-booked__tour {
  text-decoration: none;
  color: #6b7280;
  transition: .25s;
}
.rc-booked__tour svg {
  position: relative;
  top: 3px;
}
.rc-booked__tour:hover {
  text-decoration: underline;
}
.rc-departure__label {
  color: #6b7280;
  flex-shrink: 0;
  font-weight: 500;
  margin-right: 5px;
}
.rc-departure__city {
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* -- Content + Read More ----------------------------------------------------- */
.rc-content {
    position: relative;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}

@media (max-width: 478px) {
    .rc-content {
      font-size: 13px;
    }
}
.rc-content p {
  margin: 0 0 0.5em;
}
.rc-content p:last-child {
  margin-bottom: 0;
}

.rc-content--clamped p:first-child {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rc-readmore {
  background: none;
  border: none;
  padding: 0;
  color: #555;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: .25s;
}

@media (max-width: 478px) {
    .rc-readmore {
  background: none;
      font-size: 13px;
    }
}
.rc-readmore:hover {
  color: #22c55e;
}

/* -- Gallery ----------------------------------------------------------------- */
.rc-gallery {
  margin-top: 4px;
}

/* -- Disclaimer -------------------------------------------------------------- */
.rc-disclaimer {
  display: block;
  margin-bottom: -5px;
  line-height: normal;
  font-size: 1.25rem;
  color: #9ca3af;
}

@media (max-width: 478px) {
    .rc-disclaimer {
        margin-bottom: 0;
        font-size: 13px;
    }
}

.rc-disclaimer a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: relative;
  top: 4px;
  margin-left: 5px;
  text-decoration: none;
  color: #9ca3af;
}
.rc-disclaimer a:hover {
  color: #6b7280;
  text-decoration: underline;
}

/* -- Load More button -------------------------------------------------------- */
.review-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.review-loadmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px;
  border: 1.5px solid #AE2126;
  border-radius: 30px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #AE2126;
  cursor: pointer;
  transition: .25s;
}
.review-loadmore-btn:hover:not(:disabled) {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
  background: #AE2126;
  color: #FFF;
}
.review-loadmore-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.rlb-count {
  color: #6b7280;
  font-weight: 400;
  transition: .25s;
}
.review-loadmore-btn:hover:not(:disabled) .rlb-count {
  color: #FFF;
}
.rlb-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ea580c;
  border-top-color: transparent;
  border-radius: 50%;
  animation: rlb-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.review-loadmore-btn.is-loading .rlb-text {
  opacity: 0.5;
}
.review-loadmore-btn.is-loading .rlb-spinner {
  display: block;
}
@keyframes rlb-spin {
  to {
    transform: rotate(360deg);
  }
}

/* -- Tour Reviews Section ---------------------------------------------------- */
.tour-reviews-section {
  padding: 0 0 45px 0;
}

/* -- Skeleton ---------------------------------------------------------------- */
.rl-skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rl-skeleton {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rl-skeleton__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.rl-skeleton__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: rl-shimmer 1.5s infinite;
  flex-shrink: 0;
}
.rl-skeleton__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rl-skeleton__rating {
  width: 60px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: rl-shimmer 1.5s infinite;
}
.rl-skeleton__line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: rl-shimmer 1.5s infinite;
}
.rl-skeleton__line--name {
  width: 40%;
}
.rl-skeleton__line--date {
  width: 25%;
}
.rl-skeleton__line--text {
  width: 100%;
}
.rl-skeleton__line--short {
  width: 70%;
}
@keyframes rl-shimmer {
  to {
    background-position: -200% 0;
  }
}

.rl-no-reviews {
  color: #6b7280;
  font-size: 0.9rem;
  padding: 24px 0;
  text-align: center;
}

/* -- Rating Summary (rts) ---------------------------------------------------- */
.rts-wrap {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.rts-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 100px;
}
.rts-stars {
  display: flex;
  gap: 2px;
  color: #22c55e;
}

@media (max-width: 767px) {
    .rts-star {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 478px) {
    .rts-stars {
        gap: 0;
    }
    .rts-star {
        width: 20px;
        height: 20px;
    }
}

.rts-avg {
  font-size: 5rem;
  font-weight: 600;
  color: #22c55e;
  line-height: 1;
}

@media (max-width: 478px) {
    .rts-avg {
      font-size: 3rem;
    }
}

.rts-total {
  font-size: 1.5rem;
  color: #6b7280;
  text-align: center;
}
.rts-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0px;
  min-width: 200px;
}

@media (min-width: 768px) {
    .rts-bars {
      max-width: 60%;
      gap: 6px;
    }
}

.rts-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rts-bar-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  font-size: 1.5rem;
  color: #374151;
  min-width: 35px;
}
.rts-bar-track {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.rts-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.rts-bar-count {
  font-size: 1.5rem;
  color: #6b7280;
  min-width: 15px;
  text-align: right;
}

/* -- Traveller Gallery (rtg) ------------------------------------------------- */
.rtg-wrap {
  margin-bottom: 32px;
}
.rtg-grid {
  display: grid;
  gap: 6px;
  border-radius: 10px;
  overflow: hidden;
}

/* Grid layouts by count */
.rtg-grid--1 {
  grid-template-columns: 1fr;
}
.rtg-grid--2 {
  grid-template-columns: 1fr 1fr;
}
.rtg-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.rtg-grid--4 {
  grid-template-columns: 1fr 1fr;
}
.rtg-grid--5 {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.rtg-grid--5 .rtg-item:first-child {
  grid-row: span 2;
}

.rtg-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #e5e7eb;
  aspect-ratio: 4/3;
}
.rtg-grid--1 .rtg-item {
  aspect-ratio: 16/7;
}
.rtg-grid--5 .rtg-item:first-child {
  aspect-ratio: unset;
}

.rtg-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}
.rtg-item:hover .rtg-img {
  transform: scale(1.04);
}
.rg-blur {
  filter: blur(8px);
  transform: scale(1.05);
  transition: filter 0.3s, transform 0.3s;
}
.rg-loaded {
  filter: none;
  transform: scale(1);
}

.rtg-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
}
.rtg-more-overlay svg {
  opacity: 0.9;
}

/* -- Responsive -------------------------------------------------------------- */
@media (max-width: 600px) {
  .review-archive-wrap {
    padding: 32px 16px 60px;
  }
  .review-card {
    padding: 18px 16px;
  }
  .rts-wrap {
    gap: 20px;
  }
  .rtg-grid--5 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .rtg-grid--5 .rtg-item:first-child {
    grid-row: unset;
    grid-column: span 2;
  }
}

/* -- Bricks Code Block: Archive list ---------------------------------------- */
/* Layout/spacing is controlled by Bricks - the plugin only handles the list */
.review-archive-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rl-empty {
  text-align: center;
  color: #6b7280;
  padding: 64px 0;
}
