/* Product Reviews only. Keep YayReviews' form, lightbox, replies and pagination DOM. */
@media (min-width: 768px) {
  body.single-product #tab-reviews {
    box-sizing: border-box;
    width: min(1366px, calc(100vw - 48px));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

body.single-product #tab-reviews #reviews.yayrev-reviews {
  display: block;
  min-width: 0;
  width: 100%;
  font-size: 15px;
}

body.single-product #tab-reviews #reviews #comments {
  min-width: 0;
  width: 100%;
}

/* YayReviews hides #comments when its list and filter are empty. */
body.single-product #tab-reviews #reviews #comments:has(.ujc-review-overview--empty) {
  display: block;
}

body.single-product #tab-reviews #reviews:has(.ujc-review-overview--empty) {
  min-height: 0;
}

/* UJC Product Layout can add a title before YayReviews' #reviews wrapper. */
body.single-product #tab-reviews .ujc-review-panel-title {
  display: none !important;
}

/* The empty overview already contains this notice; keep the access check itself. */
body.single-product #tab-reviews #reviews:has(.ujc-review-overview--empty) > .woocommerce-verification-required {
  display: none !important;
}

body.single-product #tab-reviews #reviews .woocommerce-Reviews-title,
body.single-product #tab-reviews #reviews .yayrev-reviews-list-title,
body.single-product #tab-reviews #reviews .yayrev-rating-summary,
body.single-product #tab-reviews #reviews .yayrev-filter-bar,
body.single-product #tab-reviews #reviews .yayrev-product-media {
  display: none !important;
}

body.single-product #tab-reviews .ujc-review-overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}

body.single-product #tab-reviews .ujc-review-overview--empty {
  display: block;
  margin: 0;
}

body.single-product #tab-reviews .ujc-review-empty {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
  color: #302b27;
  text-align: center;
}

body.single-product #tab-reviews .ujc-review-empty__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

body.single-product #tab-reviews .ujc-review-empty__message {
  margin: 0;
  color: #69635e;
  font-size: 14px;
  line-height: 1.5;
}

body.single-product #tab-reviews #reviews #comments .ujc-review-overview--empty ~ .yayrev-empty-state {
  display: none !important;
}

body.single-product #tab-reviews .ujc-review-overview__rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #201d1b;
  line-height: 1.2;
}

body.single-product #tab-reviews .ujc-review-overview__score {
  font-size: 32px;
  font-weight: 600;
}

body.single-product #tab-reviews .ujc-review-overview__stars {
  position: relative;
  display: inline-block;
  color: #dedbd6;
  font-size: 27px;
  letter-spacing: 2px;
  line-height: 1;
  white-space: nowrap;
  font-variant-emoji: text;
}

body.single-product #tab-reviews .ujc-review-overview__stars::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--ujc-rating-percent);
  overflow: hidden;
  color: #c38b43;
  content: '★★★★★';
  white-space: nowrap;
}

body.single-product #tab-reviews .ujc-review-overview__count {
  padding-left: 15px;
  border-left: 1px solid #d8d5d1;
  font-size: 16px;
  white-space: nowrap;
}

body.single-product #tab-reviews .ujc-review-overview__sort-label {
  flex: 0 0 auto;
  margin: 0 0 3px;
}

body.single-product #tab-reviews .ujc-review-overview__sort {
  box-sizing: border-box;
  min-width: 180px;
  min-height: 43px;
  margin: 0;
  padding: 8px 38px 8px 15px;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  background-color: #fff;
  color: #282522;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  box-shadow: none;
}

body.single-product #tab-reviews #reviews ol.commentlist {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single-product #tab-reviews #reviews #comments ol.commentlist > li,
body.single-product #tab-reviews #reviews #comments ol.commentlist > li:last-child {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 20px 22px;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

body.single-product #tab-reviews #reviews .comment_container {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  column-gap: 24px;
  row-gap: 8px;
  min-width: 0;
}

@media (min-width: 768px) {
  body.single-product #tab-reviews #reviews .comment_container.ujc-card--has-media {
    grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
  }
}

body.single-product #tab-reviews #reviews .comment-header {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
  padding-right: 0;
}

body.single-product #tab-reviews #reviews .comment-header__start {
  flex: 0 0 48px;
}

body.single-product #tab-reviews #reviews .comment-header__start img.avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #eae7e3;
}

body.single-product #tab-reviews #reviews .comment-header__end {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
}

body.single-product #tab-reviews #reviews .comment-header__end .meta {
  display: flex;
  align-items: center;
  flex: none;
  flex-wrap: wrap;
  gap: 4px 11px;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

body.single-product #tab-reviews #reviews .comment-header__end .meta .woocommerce-review__author {
  color: #25211e;
  font-weight: 500;
}

body.single-product #tab-reviews #reviews .comment-header__end .meta .woocommerce-review__dash,
body.single-product #tab-reviews #reviews .comment-header__end .meta .woocommerce-review__verified,
body.single-product #tab-reviews #reviews .comment-header__end .meta .yayrev-copy-link {
  display: none;
}

body.single-product #tab-reviews #reviews .comment-header__end .meta .woocommerce-review__published-date {
  position: absolute;
  top: -17px;
  right: 0;
  z-index: 2;
  color: #76716d;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

body.single-product #tab-reviews #reviews .comment-header__end .meta .yayrev-verified-badge {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}

body.single-product #tab-reviews #reviews .yayrev-rating-row {
  width: auto;
  margin: 0;
  gap: 8px;
}

body.single-product #tab-reviews #reviews .yayrev-rating--stars {
  color: #c38b43;
  font-size: 20px;
  line-height: 1;
}

body.single-product #tab-reviews #reviews .yayrev-rating--stars .yayrev-rating-icon {
  font-size: 0;
}

body.single-product #tab-reviews #reviews .yayrev-rating--stars .yayrev-rating-icon::before {
  content: '★';
  font-family: Arial, sans-serif;
  font-size: 20px;
}

body.single-product #tab-reviews #reviews .yayrev-rating--stars .yayrev-rating-icon--empty::before {
  color: #dedbd6;
}

body.single-product #tab-reviews #reviews .yayrev-review-variation-attributes {
  margin: 0;
  color: #4d4742;
  font-size: 14px;
}

body.single-product #tab-reviews #reviews .comment-body {
  display: contents;
}

body.single-product #tab-reviews #reviews .comment-body > .description,
body.single-product #tab-reviews #reviews .comment-body > .yayrev-review-title,
body.single-product #tab-reviews #reviews .comment-body > .yayrev-store-reply {
  grid-column: 1;
  min-width: 0;
  margin: 0 0 0 61px;
  overflow-wrap: anywhere;
}

body.single-product #tab-reviews #reviews .comment-body > .description p {
  margin: 0 0 8px;
  color: #302b27;
  font-size: 14px;
  line-height: 1.55;
}

body.single-product #tab-reviews #reviews .comment-body > .description p:last-child {
  margin-bottom: 0;
}

body.single-product #tab-reviews #reviews .comment-body > .yayrev-review-media {
  grid-column: 1;
  min-width: 0;
  margin: 10px 0 0;
}

@media (min-width: 768px) {
  body.single-product #tab-reviews #reviews .ujc-card--has-media .comment-body > .yayrev-review-media {
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: start;
    margin: 0;
  }
}

body.single-product #tab-reviews #reviews .yayrev-media-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  min-width: 0;
}

body.single-product #tab-reviews #reviews .yayrev-media-thumbnails > .yayrev-media-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 9px;
  outline: none;
  background: #f5f3f0;
  overflow: hidden;
}

body.single-product #tab-reviews #reviews .yayrev-media-thumbnails > .yayrev-media-thumb.ujc-card__extra-media {
  display: none;
}

body.single-product #tab-reviews #reviews .yayrev-media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.single-product #tab-reviews #reviews .yayrev-media-thumb > .ujc-card__more-button {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  border-radius: 0;
  background: rgba(29, 27, 25, .72);
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

body.single-product #tab-reviews #reviews .yayrev-media-thumb:focus-visible,
body.single-product #tab-reviews .ujc-review-overview__sort:focus-visible {
  outline: 2px solid #8a6a43;
  outline-offset: 3px;
}

@media (max-width: 767px) {
  body.single-product #tab-reviews {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  body.single-product #tab-reviews .ujc-review-overview {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  body.single-product #tab-reviews .ujc-review-overview__rating {
    gap: 6px 10px;
  }

  body.single-product #tab-reviews .ujc-review-overview__score {
    font-size: 26px;
  }

  body.single-product #tab-reviews .ujc-review-overview__stars {
    font-size: 20px;
    letter-spacing: 1px;
  }

  body.single-product #tab-reviews .ujc-review-overview__count {
    padding-left: 10px;
    font-size: 13px;
  }

  body.single-product #tab-reviews .ujc-review-overview__sort-label {
    width: 100%;
  }

  body.single-product #tab-reviews .ujc-review-overview__sort {
    width: 100%;
    min-height: 42px;
  }

  body.single-product #tab-reviews #reviews #comments ol.commentlist > li,
  body.single-product #tab-reviews #reviews #comments ol.commentlist > li:last-child {
    padding: 16px;
  }

  body.single-product #tab-reviews #reviews .comment-header {
    padding-top: 19px;
  }

  body.single-product #tab-reviews #reviews .comment-header__end .meta .woocommerce-review__published-date {
    top: 0;
  }

  body.single-product #tab-reviews #reviews .comment-body > .description,
  body.single-product #tab-reviews #reviews .comment-body > .yayrev-review-title,
  body.single-product #tab-reviews #reviews .comment-body > .yayrev-store-reply {
    margin-left: 0;
  }

  body.single-product #tab-reviews #reviews .comment-body > .yayrev-review-media {
    margin-top: 6px;
  }

  body.single-product #tab-reviews #reviews .yayrev-media-thumbnails {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
}
