/*
 * HUUN modern review interface
 * - Fixes clipped/half fifth star caused by conflicting theme font sizes
 * - Uses the site's Outfit font for all review text
 * - Refreshes cards, images, spacing and modal presentation
 */
@font-face {
  font-family: "star";
  src: url("../fonts/star.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  --wcpr-huun-font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wcpr-huun-text: #17191c;
  --wcpr-huun-muted: #667085;
  --wcpr-huun-border: #e6e9ed;
  --wcpr-huun-star: #ff9800;
  --wcpr-huun-star-empty: #e3e6ea;
  --wcpr-huun-radius: 16px;
}

/* Typography: inherit Outfit without touching the plugin's icon fonts. */
.woocommerce-photo-reviews-shortcode,
.wcpr-grid,
.shortcode-wcpr-grid,
.wcpr-list,
.shortcode-wcpr-list,
.wcpr-modal-light-box,
.shortcode-wcpr-modal-light-box,
.wcpr-overall-rating-and-rating-count,
.shortcode-wcpr-overall-rating-and-rating-count,
.woocommerce-photo-reviews-rating-html-shortcode,
#reviews .commentlist {
  font-family: var(--wcpr-huun-font) !important;
  color: var(--wcpr-huun-text);
}

.woocommerce-photo-reviews-shortcode button,
.woocommerce-photo-reviews-shortcode input,
.woocommerce-photo-reviews-shortcode textarea,
.woocommerce-photo-reviews-shortcode select,
.wcpr-modal-light-box button,
.wcpr-modal-light-box input,
.wcpr-modal-light-box textarea,
.wcpr-modal-light-box select,
.shortcode-wcpr-modal-light-box button,
.shortcode-wcpr-modal-light-box input,
.shortcode-wcpr-modal-light-box textarea,
.shortcode-wcpr-modal-light-box select,
#reviews button,
#reviews input,
#reviews textarea,
#reviews select {
  font-family: var(--wcpr-huun-font) !important;
}

/* Review cards */
.wcpr-grid .wcpr-grid-item,
.shortcode-wcpr-grid .shortcode-wcpr-grid-item,
.wcpr-list .wcpr-list-style-item,
.shortcode-wcpr-list .shortcode-wcpr-list-style-item {
  background: #fff;
  border: 1px solid var(--wcpr-huun-border) !important;
  border-radius: var(--wcpr-huun-radius) !important;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08) !important;
  overflow: hidden;
  padding-bottom: 0 !important;
  transition: box-shadow 220ms ease, border-color 220ms ease !important;
}

.wcpr-grid .wcpr-grid-item:hover,
.shortcode-wcpr-grid .shortcode-wcpr-grid-item:hover,
.wcpr-list .wcpr-list-style-item:hover,
.shortcode-wcpr-list .shortcode-wcpr-list-style-item:hover {
  border-color: #d9dde3 !important;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.13) !important;
}

.wcpr-grid,
.shortcode-wcpr-grid {
  column-gap: 22px !important;
}

.wcpr-grid:not(.wcpr-grid-loadmore) .wcpr-grid-item,
.shortcode-wcpr-grid:not(.wcpr-grid-loadmore) .shortcode-wcpr-grid-item {
  margin-bottom: 22px !important;
}

/* Images */
.wcpr-grid .reviews-images,
.shortcode-wcpr-grid .shortcode-reviews-images {
  width: 100%;
  border-radius: var(--wcpr-huun-radius) var(--wcpr-huun-radius) 0 0 !important;
}

.wcpr-grid .reviews-images-wrap-right,
.shortcode-wcpr-grid .shortcode-reviews-images-wrap-right {
  background: #f3f4f6;
}

.wcpr-grid .images-qty,
.shortcode-wcpr-grid .shortcode-images-qty {
  width: auto !important;
  min-width: 32px;
  height: 32px !important;
  line-height: 32px !important;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px !important;
  background: rgba(17, 24, 39, 0.82) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--wcpr-huun-font) !important;
  font-size: 12px !important;
  font-weight: 600;
}

/* Card content */
.wcpr-grid .review-content-container,
.shortcode-wcpr-grid .shortcode-review-content-container {
  padding: 16px 18px 19px !important;
}

.wcpr-grid .review-content-container-top,
.shortcode-wcpr-grid .shortcode-review-content-container-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.wcpr-grid .review-content-container-top-left:empty,
.shortcode-wcpr-grid .shortcode-review-content-container-top-left:empty {
  display: none;
}

.wcpr-grid .review-content-container-top-right,
.shortcode-wcpr-grid .shortcode-review-content-container-top-right {
  width: 100%;
  min-width: 0;
}

.wcpr-grid .wcpr-comment-author,
.shortcode-wcpr-grid .shortcode-wcpr-comment-author,
.wcpr-list .wcpr-comment-author,
.shortcode-wcpr-list .shortcode-wcpr-comment-author {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
  padding: 0 !important;
  color: #111318 !important;
  font-family: var(--wcpr-huun-font) !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.wcpr-grid .wcpr-comment-author:not(.wcpr-comment-author-with-country):before,
.shortcode-wcpr-grid .shortcode-wcpr-comment-author:not(.shortcode-wcpr-comment-author-with-country):before {
  padding-right: 2px !important;
}

.wcpr-grid .wcpr-comment-author .wcpr-icon-badge,
.shortcode-wcpr-grid .shortcode-wcpr-comment-author .shortcode-wcpr-icon-badge,
.wcpr-grid .woocommerce-review__verified,
.shortcode-wcpr-grid .woocommerce-review__verified {
  color: #20c933 !important;
}

.wcpr-grid .wcpr-review-rating,
.shortcode-wcpr-grid .wcpr-review-rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 8px;
  line-height: 1;
}

.wcpr-grid .wcpr-review-date,
.shortcode-wcpr-grid .wcpr-review-date,
.wcpr-list .wcpr-review-date,
.shortcode-wcpr-list .wcpr-review-date {
  margin: 0 0 0 auto !important;
  color: var(--wcpr-huun-muted) !important;
  font-family: var(--wcpr-huun-font) !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
}

.wcpr-grid .wcpr-review-title,
.shortcode-wcpr-grid .shortcode-wcpr-review-title {
  margin: 12px 0 5px;
  color: var(--wcpr-huun-text);
  font-family: var(--wcpr-huun-font) !important;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.wcpr-grid .wcpr-review-content,
.shortcode-wcpr-grid .shortcode-wcpr-review-content,
.wcpr-list .wcpr-review-content,
.shortcode-wcpr-list .shortcode-wcpr-review-content {
  color: #343942 !important;
  font-family: var(--wcpr-huun-font) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.62 !important;
}

.wcpr-grid .wcpr-read-more,
.shortcode-wcpr-grid .shortcode-wcpr-read-more {
  margin-left: 4px;
  color: #111318;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/*
 * Star rendering fix.
 * The original stylesheet allows a theme to enlarge only the pseudo-elements,
 * while the parent keeps its old width. That clips the fifth star. These rules
 * lock the parent and both star layers to the same font size and metrics.
 */
.wcpr-grid .star-rating,
.shortcode-wcpr-grid .star-rating,
.wcpr-list .star-rating,
.shortcode-wcpr-list .star-rating,
.wcpr-modal-light-box .star-rating,
.shortcode-wcpr-modal-light-box .star-rating,
.wcpr-overall-rating-and-rating-count .star-rating,
.shortcode-wcpr-overall-rating-and-rating-count .star-rating,
.woocommerce-photo-reviews-rating-html-shortcode .star-rating,
#reviews .commentlist .star-rating {
  position: relative !important;
  display: block !important;
  float: none !important;
  direction: ltr !important;
  overflow: hidden !important;
  width: 5.32em !important;
  height: 1em !important;
  margin: 0 !important;
  padding: 0 !important;
  color: transparent !important;
  font-family: "star" !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.wcpr-grid .star-rating:before,
.shortcode-wcpr-grid .star-rating:before,
.wcpr-list .star-rating:before,
.shortcode-wcpr-list .star-rating:before,
.wcpr-modal-light-box .star-rating:before,
.shortcode-wcpr-modal-light-box .star-rating:before,
.wcpr-overall-rating-and-rating-count .star-rating:before,
.shortcode-wcpr-overall-rating-and-rating-count .star-rating:before,
.woocommerce-photo-reviews-rating-html-shortcode .star-rating:before,
#reviews .commentlist .star-rating:before,
.wcpr-grid .star-rating span:before,
.shortcode-wcpr-grid .star-rating span:before,
.wcpr-list .star-rating span:before,
.shortcode-wcpr-list .star-rating span:before,
.wcpr-modal-light-box .star-rating span:before,
.shortcode-wcpr-modal-light-box .star-rating span:before,
.wcpr-overall-rating-and-rating-count .star-rating span:before,
.shortcode-wcpr-overall-rating-and-rating-count .star-rating span:before,
.woocommerce-photo-reviews-rating-html-shortcode .star-rating span:before,
#reviews .commentlist .star-rating span:before {
  content: "SSSSS" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: "star" !important;
  font-size: 1em !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

.wcpr-grid .star-rating:before,
.shortcode-wcpr-grid .star-rating:before,
.wcpr-list .star-rating:before,
.shortcode-wcpr-list .star-rating:before,
.wcpr-modal-light-box .star-rating:before,
.shortcode-wcpr-modal-light-box .star-rating:before,
.wcpr-overall-rating-and-rating-count .star-rating:before,
.shortcode-wcpr-overall-rating-and-rating-count .star-rating:before,
.woocommerce-photo-reviews-rating-html-shortcode .star-rating:before,
#reviews .commentlist .star-rating:before {
  float: none !important;
  color: var(--wcpr-huun-star-empty) !important;
  opacity: 1 !important;
}

.wcpr-grid .star-rating span,
.shortcode-wcpr-grid .star-rating span,
.wcpr-list .star-rating span,
.shortcode-wcpr-list .star-rating span,
.wcpr-modal-light-box .star-rating span,
.shortcode-wcpr-modal-light-box .star-rating span,
.wcpr-overall-rating-and-rating-count .star-rating span,
.shortcode-wcpr-overall-rating-and-rating-count .star-rating span,
.woocommerce-photo-reviews-rating-html-shortcode .star-rating span,
#reviews .commentlist .star-rating span {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 1em !important;
  margin: 0 !important;
  padding: 1em 0 0 !important;
  overflow: hidden !important;
  font-family: "star" !important;
  font-size: 1em !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

.wcpr-grid .star-rating span:before,
.shortcode-wcpr-grid .star-rating span:before,
.wcpr-list .star-rating span:before,
.shortcode-wcpr-list .star-rating span:before,
.wcpr-modal-light-box .star-rating span:before,
.shortcode-wcpr-modal-light-box .star-rating span:before,
.wcpr-overall-rating-and-rating-count .star-rating span:before,
.shortcode-wcpr-overall-rating-and-rating-count .star-rating span:before,
.woocommerce-photo-reviews-rating-html-shortcode .star-rating span:before,
#reviews .commentlist .star-rating span:before {
  color: var(--wcpr-huun-star) !important;
  opacity: 1 !important;
}

/* Larger stars on the visual review cards, compact everywhere else. */
.wcpr-grid .wcpr-grid-item .star-rating,
.shortcode-wcpr-grid .shortcode-wcpr-grid-item .star-rating {
  font-size: 20px !important;
}

/* Modal */
.wcpr-modal-wrap,
.shortcode-wcpr-modal-wrap {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

#reviews-content-right,
#shortcode-reviews-content-right {
  font-family: var(--wcpr-huun-font) !important;
}

@media (max-width: 680px) {
  :root {
    --wcpr-huun-radius: 13px;
  }

  .wcpr-grid,
  .shortcode-wcpr-grid {
    column-gap: 14px !important;
  }

  .wcpr-grid:not(.wcpr-grid-loadmore) .wcpr-grid-item,
  .shortcode-wcpr-grid:not(.wcpr-grid-loadmore) .shortcode-wcpr-grid-item {
    margin-bottom: 14px !important;
  }

  .wcpr-grid .review-content-container,
  .shortcode-wcpr-grid .shortcode-review-content-container {
    padding: 14px 15px 16px !important;
  }

  .wcpr-grid .wcpr-comment-author,
  .shortcode-wcpr-grid .shortcode-wcpr-comment-author {
    font-size: 15px;
  }

  .wcpr-grid .star-rating,
  .shortcode-wcpr-grid .star-rating {
    font-size: 18px !important;
  }

  .wcpr-grid .wcpr-review-content,
  .shortcode-wcpr-grid .shortcode-wcpr-review-content {
    font-size: 14px !important;
  }
}


/*
 * Safari/WebKit stability fix.
 * CSS columns combined with translated/GPU-composited review cards can make
 * an image layer disappear while the pointer is over a card. Keep hover
 * feedback limited to border/shadow and force the image/card layers to remain
 * in the normal painting flow.
 */
.wcpr-grid,
.shortcode-wcpr-grid,
.wcpr-grid .wcpr-grid-item,
.shortcode-wcpr-grid .shortcode-wcpr-grid-item,
.wcpr-list .wcpr-list-style-item,
.shortcode-wcpr-list .shortcode-wcpr-list-style-item,
.wcpr-grid .reviews-images-wrap,
.shortcode-wcpr-grid .shortcode-reviews-images-wrap,
.wcpr-grid .reviews-images,
.shortcode-wcpr-grid .shortcode-reviews-images {
  -webkit-transform: none !important;
  transform: none !important;
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
  will-change: auto !important;
}

.wcpr-grid .wcpr-grid-item:hover,
.shortcode-wcpr-grid .shortcode-wcpr-grid-item:hover,
.wcpr-list .wcpr-list-style-item:hover,
.shortcode-wcpr-list .shortcode-wcpr-list-style-item:hover,
.wcpr-enable-box-shadow .wcpr-grid-item:hover,
.shortcode-wcpr-enable-box-shadow .shortcode-wcpr-grid-item:hover {
  -webkit-transform: none !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.wcpr-grid .reviews-images,
.shortcode-wcpr-grid .shortcode-reviews-images {
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-filter: none !important;
  filter: none !important;
}

/* Homepage image-only shortcode. */
.huun-image-reviews-home {
  width: 100%;
  max-width: 100%;
}

.huun-image-reviews-home .woocommerce-photo-reviews-shortcode {
  width: 100%;
  margin: 0;
}

@media (hover: none), (pointer: coarse) {
  .wcpr-grid .wcpr-grid-item:hover,
  .shortcode-wcpr-grid .shortcode-wcpr-grid-item:hover,
  .wcpr-list .wcpr-list-style-item:hover,
  .shortcode-wcpr-list .shortcode-wcpr-list-style-item:hover {
    border-color: var(--wcpr-huun-border) !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08) !important;
  }
}
