/* ===================================================
   BASE CSS 2025 - CUSTOM PROPERTIES (DESIGN TOKENS)
   =================================================== */
:host {
  /* === COLORS === */
  /* Primary Colors */
  --color-primary: #1da149;
  --color-primary-hover: #178a3d;
  --color-secondary: #007bff;
  --color-secondary-hover: #0056b3;
  
  /* Star Colors & Images */
  --color-star-filled: #fdb022;
  --color-star-empty: #e1e1e1;
  --star-image-full: url("https://cdn.practicaldatacore.com/shopwildthings-reviews/mod_productReviews/pd-star-full.svg");
  --star-image-half: url("https://cdn.practicaldatacore.com/shopwildthings-reviews/mod_productReviews/pd-star-half.svg");
  --star-image-empty: url("https://cdn.practicaldatacore.com/shopwildthings-reviews/mod_productReviews/pd-star-empty.svg");
  
  /* Text Colors */
  --color-text-primary: #000;
  --color-text-secondary: #333;
  --color-text-muted: #666;
  --color-text-light: #777;
  --color-text-lighter: #7e7e7e;
  --color-text-lightest: #818181;
  
  /* Background Colors */
  --color-bg-white: #fff;
  --color-bg-light: #f9f9f9;
  --color-bg-lighter: #fcfcfc;
  --color-bg-gray: #f6f6f6;
  --color-bg-dark: #222;
  
  /* Border Colors */
  --color-border: #ddd;
  --color-border-light: #eee;
  --color-border-lighter: #eeeeee;
  --color-border-dark: #e1e1e1;
  
  /* Status Colors */
  --color-success: #28a745;
  --color-verified: #1da149;
  --color-error: #dc3545;
  --color-warning: #ffa500;
  
  /* Buyers Recommend Colors */
  --color-recommend-ring: #3e3e3e;
  --color-recommend-accent: #77d17c;
  --color-pill-bg: #222;
  --color-pill-text: #fff;
  --color-ring-track: #3a3a3a;
  
  /* === TYPOGRAPHY === */
  /* Base Font Sizes */
  --font-size-xs: 0.9rem;        /* 14.4px - minimum size */
  --font-size-sm: 0.9375rem;     /* 15px */
  --font-size-base: 1rem;        /* 16px */
  --font-size-md: 1.0625rem;     /* 17px */
  --font-size-lg: 1.125rem;      /* 18px */
  --font-size-xl: 1.625rem;      /* 26px */
  --font-size-2xl: 2.625rem;     /* 42px - rating score */

  /* Global scale knob (overridable from light DOM) */
  --pd-font-scale: 1;

  /* Scaled Font-Size Aliases */
  --fs-xs: calc(var(--font-size-xs) * var(--pd-font-scale));
  --fs-sm: calc(var(--font-size-sm) * var(--pd-font-scale));
  --fs-base: calc(var(--font-size-base) * var(--pd-font-scale));
  --fs-md: calc(var(--font-size-md) * var(--pd-font-scale));
  --fs-lg: calc(var(--font-size-lg) * var(--pd-font-scale));
  --fs-xl: calc(var(--font-size-xl) * var(--pd-font-scale));
  --fs-2xl: calc(var(--font-size-2xl) * var(--pd-font-scale));
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights */
  --line-height-tight: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  
  /* === SPACING === */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;
  
  /* === BORDERS === */
  --border-radius-sm: 4px;
  --border-radius-md: 6px;
  --border-radius-lg: 8px;
  --border-radius-xl: 12px;
  --border-radius-pill: 30px;
  --border-radius-circle: 50%;
  --border-radius-full: 9999px;
  
  --border-width: 1px;
  
  /* === SHADOWS === */
  --shadow-sm: 0 0 3px rgba(0,0,0,.05);
  --shadow-md: 0 0 5px rgba(0,0,0,.15);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.5);
  
  /* === TRANSITIONS === */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* === COMPONENT SPECIFIC === */
  /* Star Ratings */
  --star-size-sm: 14px;
  --star-size-md: 16px;
  --star-size-lg: 18px;
  --star-size-xl: 22px;
  --star-gap: 1px;
  --star-gap-lg: 4px;

  /* Scaled star sizes */
  --star-size-sm-scaled: calc(var(--star-size-sm) * var(--pd-font-scale));
  --star-size-md-scaled: calc(var(--star-size-md) * var(--pd-font-scale));
  --star-size-lg-scaled: calc(var(--star-size-lg) * var(--pd-font-scale));
  --star-size-xl-scaled: calc(var(--star-size-xl) * var(--pd-font-scale));
  
  /* Buttons */
  --button-padding: 14px 24px;
  --button-padding-sm: 12px 16px;
  --button-font-size: 1.125rem;
  --button-font-weight: var(--font-weight-semibold);
  --button-font-size-scaled: calc(var(--button-font-size) * var(--pd-font-scale));
  
  /* Review Images */
  --review-image-height: 70px;
  --review-image-height-sm: 60px;
  --gallery-image-height: 40px;
  --gallery-image-height-sm: 35px;
  
  /* Circular Progress */
  --circular-progress-size: 90px;
  --circular-progress-size-sm: 75px;
  --circular-progress-stroke: 8px;
  
  /* Snapshot Bars */
  --snapshot-bar-height: 0.9rem;
  --snapshot-bar-width: 100px;
  --snapshot-bar-width-md: 90px;
  --snapshot-bar-width-sm: 80px;
  --snapshot-bar-width-xs: 60px;
}

/* Base responsive styles */
* { box-sizing: border-box; }

.pdReviewsDisplay {
  font-size: var(--fs-base);
}

.helpful-btn, .report-btn {
  background: none;
  border: 1px solid #ddd;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--fs-xs);
}

.helpful-btn:hover {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.report-btn:hover {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.reviews-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.reviews-error {
  text-align: center;
  padding: 40px;
  color: #dc3545;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

/* ===================================================
   NO REVIEWS STATE
   =================================================== */

.pd-no-reviews-wrapper {
  text-align: center;
  padding: 10px 20px 30px 20px;
  margin: 20px 0;
  background: var(--color-bg-lighter);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-lg);
}

.pd-no-reviews-content {
  max-width: 500px;
  margin: 0 auto;
}

.pd-no-reviews-icon {
  margin-bottom: 12px;
  opacity: 0.5;
}

.pd-no-reviews-icon svg {
  width: 45px;
  height: 45px;
  margin: 0 auto;
  display: block;
}

.pd-no-reviews-title {
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0 0 8px 0;
}

.pd-no-reviews-message {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0 0 16px 0;
  line-height: var(--line-height-normal);
}

.pd-no-reviews-button {
  margin-top: 12px;
}

/* Override width constraints from .pd-reviews-summary-review-btn */
.pd-no-reviews-button.pd-reviews-summary-review-btn {
  max-width: none;
  width: auto;
  margin: 12px auto 0 auto;
}

.pd-no-reviews-button > a,
.pd-no-reviews-button > a:link,
.pd-no-reviews-button > a:active,
.pd-no-reviews-button > a:visited {
  display: inline-block;
  padding: var(--button-padding);
  color: #ffffff;
  background-color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius-md);
  font-size: var(--button-font-size-scaled);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pd-no-reviews-button > a:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Variant: When there's a summary but no individual reviews */
.pd-no-reviews-wrapper.pd-no-reviews-with-summary {
  padding: 30px 20px;
  margin: 20px 0;
  background: var(--color-bg-light);
}

.pd-no-reviews-wrapper.pd-no-reviews-with-summary .pd-no-reviews-message {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-text-light);
}

/* Mobile responsive */
@media (max-width: 599px) {
  .pd-no-reviews-wrapper {
    padding: 40px 15px;
    margin: 20px 0;
  }
  
  .pd-no-reviews-icon svg {
    width: 60px;
    height: 60px;
  }
  
  .pd-no-reviews-title {
    font-size: var(--fs-lg);
  }
  
  .pd-no-reviews-message {
    font-size: var(--fs-sm);
  }
  
  .pd-no-reviews-button > a {
    padding: var(--button-padding-sm);
    font-size: var(--fs-base);
  }
}

/* Callout No Reviews Display */
.pd-callout-no-reviews {
  margin: 10px 0;
}

.pd-callout-no-reviews-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.pd-callout-no-reviews-content .pdRatingStarsWrapper {
  --size: 1.4em;
}

.pd-callout-no-reviews-text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* Legacy support for old class names */
.no-reviews { 
  text-align: center; 
  padding: 40px; 
}

.reviews-none {
  text-align: center;
  padding: 40px;
  color: #666;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.no-reviews { text-align: center; padding: 40px; }

.write-review-btn {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 10px;
}

.load-more-section { text-align: center; margin-top: 30px; }

.load-more-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--fs-base);
}

.load-more-btn:hover { background: #0056b3; }

.pd-reviews-summary-title-wrapper {
  margin-bottom: 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pd-reviews-summary-title-item-img img { max-height: 80px; width: auto; }

.pd-reviews-summary-title { padding-top: 5px; }

.pd-reviews-summary-title-heading { font-size: var(--fs-sm); }

.pd-reviews-summary-title-item-name a {
  font-size: var(--fs-lg);
  text-decoration: none;
}

.pd-reviews-summary-wrapper { margin-bottom: 20px; }

.pd-reviews-summary-headline {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
  margin-bottom: 5px;
  padding-top: 5px;
}

.pd-reviews-summary-wrapper.pd-reviews-view-all-summary-wrapper {
  padding: 11px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #eeeeee;
  box-shadow: 0 0 5px rgb(0 0 0 / 15%);
}

.pd-rating-summary-wrapper {
  flex-grow: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pd-rating-summary-score-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.pd-rating-summary-score {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: #000;
}

.pd-rating-summary-out-of {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.pd-rating-summary-count { font-size: var(--fs-sm); }

.pd-rating-summary-stars { padding: 2px 0px 15px 0px; }

.pd-reviews-summary-review-btn { max-width: 300px; width: 75%; }

.pd-reviews-summary-review-btn > a,
.pd-reviews-summary-review-btn > a:link,
.pd-reviews-summary-review-btn > a:active,
.pd-reviews-summary-review-btn > a:visited,
.pd-reviews-summary-review-btn > input {
  padding: 14px 24px;
  color: #ffffff;
  background-color: #1da149;
  border: 1px solid #1da149;
  border-radius: 5px;
  font-size: var(--button-font-size-scaled);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  display: block;
  width: 100%;
  text-align: center;
  -webkit-appearance: none;
  transition: all 0.5s ease;
}

.pd-reviews-summary-review-btn > a:hover {
  background-color: #1da149;
  border: 1px solid #1da149;
}

.pd-reviews-summary-schema-tags { display: none; }

.pd-reviews-snapshot-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pd-reviews-snapshot-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-reviews-snapshot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-reviews-snapshot > div { display: block; }

.pd-reviews-snapshot-headline {
  text-align: center;
  font-size: calc(1.5rem * var(--pd-font-scale));
  font-weight: 700;
  padding-bottom: 6px;
  width: 100%;
}

.pd-reviews-summary-wrapper.pd-reviews-view-all-summary-wrapper .pd-reviews-snapshot-headline {
  display: none;
}

.pd-reviews-snapshot-title {
  font-size: var(--fs-sm);
  font-weight: 350;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.pd-reviews-snapshot-bar {
  position: relative;
  border-radius: 10px;
  width: 100px;
  height: 0.9rem;
  border: 1px solid #e1e1e1;
  background: #f6f6f6;
  box-sizing: border-box;
}

.pd-reviews-snapshot-bar:after {
  position: absolute;
  border-radius: 10px;
  content: '\A';
  background: var(--color-star-filled);
  top: 0;
  bottom: 0;
  left: 0;
  width: 0%;
}

/* ========================================
   DYNAMICALLY GENERATED STYLES
   ======================================== 
   The following rules are commented out because they are
   dynamically generated in the HTML based on actual review data.
   
   When the template is rendered, a <style> block is injected
   with the correct percentages for each star rating bar.
   
   These static values are only used in the preview HTML.
   ======================================== */

/* DYNAMICALLY GENERATED - See <style> block in HTML body
.pd-reviews-snapshot-bar.stars-5:after { width: 53.5%; }
.pd-reviews-snapshot-bar.stars-4:after { width: 25.2%; }
.pd-reviews-snapshot-bar.stars-3:after { width: 14.2%; }
.pd-reviews-snapshot-bar.stars-2:after { width: 4.7%; }
.pd-reviews-snapshot-bar.stars-1:after { width: 2.4%; }
*/

.pd-reviews-snapshot-percent {
  font-size: var(--fs-sm);
  font-weight: 350;
  color: var(--color-text-muted);
}

.pd-reviews-snapshot-percent > span { display: none; }

.pd-reviews-buyers-recommend-wrapper { flex-grow: 1; }

.pd-reviews-buyers-recommend {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.pd-reviews-circular-progress { position: relative; display: inline-block; }
.pd-reviews-circular-progress svg { transform: rotate(-10deg); }
.pd-reviews-circular-progress circle { stroke-width: 8px; }
.pd-reviews-circular-progress circle:nth-child(1) { fill: #fff; }
.pd-reviews-circular-progress circle:nth-child(2) {
  stroke: #3e3e3e;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - 100);
  stroke-linecap: round;
}

.pd-reviews-circular-progress-percent {
  position: absolute;
  top: 15px;
  left: 0; right: 0;
  text-align: center;
  font-weight: 700;
  font-size: calc(1.25rem * var(--pd-font-scale));
  line-height: 90px;
  box-sizing: border-box;
}

.pd-reviews-circular-progress-percent > span {
  font-weight: 500;
  font-size: var(--fs-sm);
  display: inline-block;
  vertical-align: top;
}

.pd-reviews-buyers-recommend-text { 
  display:flex !important;
  align-items: center;
  max-width: 120px;
  line-height: 1.3;
  font-size: var(--fs-base);
  font-weight: 700;
  position: relative;
  left: 5px;
  top: 7px;
}

.pd-reviews-customer-image-gallery-wrapper { margin-top: 25px; }

.pd-reviews-customer-image-gallery-title {
  text-align: center;
  margin-bottom: 10px;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
}

.pd-reviews-customer-image-gallery-flex {
  display: flex;
  gap: 11px;
  justify-content: center;
}

.pd-reviews-customer-image-gallery-flex img { height: 40px; width: auto; }

.pd-pr-wrapper { padding-top: 20px; padding-bottom: 10px; }

.pd-pr-stars-title-wrapper {
  margin-bottom: 5px;
  padding: 10px 0px;
  border-bottom: 1px solid #eeeeee;
}

.pd-pr-title {
  margin-top: 10px;
  font-weight: 600;
  font-size: var(--fs-md);
}

.pd-pr-reviewer-info-wrapper {
  display: flex;
  align-items: stretch;
  gap: 16px;
  font-size: var(--fs-sm);
  margin-bottom: 20px;
  margin-top: 12px;
  color: #7e7e7e;
  font-weight: 500;
}

.pd-pr-reviewer-info-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 42px;
}

.pd-pr-reviewer-info-inner > div { display: inline; font-style: italic; }

.pd-pr-title:first-letter { text-transform: uppercase; }

.pd-pr-reviewer-name,
.pd-pr-reviewer-location,
.pd-pr-reviewer-date { text-transform: capitalize; }

.pd-pr-reviewer-info-inner > .pd-pr-reviewer-date {
	display: block;
	margin-top: 2px;
}

.pd-pr-verified-buyer-badge,
.pd-pr-verfied-buyer-badge {
  margin-left: 15px;
  line-height: 14px;
  display: inline-flex !important;
  gap: 5px;
  align-items: center;
  vertical-align: middle;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
  background: #1da149;
  white-space: nowrap;
  padding: 3px 9px 3px 4px;
  border-radius: 30px;
}

.pd-pr-reviewer-info-wrapper > .pd-pr-verified-buyer-badge,
.pd-pr-reviewer-info-wrapper > .pd-pr-verfied-buyer-badge {
  margin-left: 10px;
  min-height: 42px;
  align-self: center;
}

.pd-pr-verified-buyer-badge img,
.pd-pr-verfied-buyer-badge img {
  height: 14px;
  width: 14px;
  margin-top: -2px;
}

.pd-pr-review-description { padding-bottom: 28px; }
.pd-pr-review-description:first-letter { text-transform: uppercase; }

.pd-pr-syndicated-note {
  margin: 8px 0 16px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

.pd-pr-syndicated-inline {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-style: italic;
  text-align: right;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.pd-pr-merchant-response-wrapper {
  border: 1px solid #eeeeee;
  box-shadow: 0px 0px 3px rgba(0,0,0,.05);
  background: #fcfcfc;
  padding: 18px;
  border-radius: 6px;
  margin-bottom: 28px;
}

.pd-pr-merchant-response-title { font-weight: 700; margin-bottom: 5px; }

.pd-pr-data-points-wrapper {
  display: flex;
  gap: 30px;
  margin-bottom: 28px;
}

.pd-pr-data-points-wrapper ul,
.pd-pr-data-points ul { list-style-type: none; margin: 0; padding: 0; }

.pd-pr-data-points-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #eeeeee;
  text-align: left;
}

.pd-pr-data-points li {
  padding: 3px 0px 3px 15px;
  font-size: var(--fs-sm);
  position: relative;
}

.pd-pr-data-points li:before {
  position: absolute;
  left: 0;
  content: '\2713';
}

.pd-pr-data-points.pd-pr-cons li:before { content: '\2717'; }
.pd-pr-data-points.pd-pr-best-uses li:before { content: '\2729'; }
.pd-pr-data-points li:first-letter { text-transform: uppercase; }

@media (min-width: 986px) {
  .pd-pr-data-points-wrapper { display: inline-flex; gap: 20px; }
  .pd-pr-data-points { flex-basis: 250px; }
  .pd-pr-syndicated-inline {
    flex: 0 0 290px;
    max-width: 290px;
    white-space: normal;
    line-height: 1.35;
  }
}

.pd-pr-review-images { margin: 0px 0px 26px 0px; }

.pd-pr-review-images-title {
  display: none;
  margin-bottom: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.pd-pr-review-images ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
}

.pd-pr-review-images a { display: inline-block; text-decoration: none; }
.pd-pr-review-images img { width: auto; height: 70px; }

.pd-pr-scroll-container {
  clear: both;
  position: relative;
  box-sizing: border-box;
  text-align: center;
  padding: 0;
}

.pd-pr-scroll {
  padding: 15px 10px;
  overflow-y: hidden;
  overflow-x: hidden;
  width: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-appearance: none;
}

.pd-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: var(--fs-base);
  transition: opacity var(--transition-fast);
}

.pd-gallery-nav:hover { opacity: 0.85; }
.pd-gallery-nav-prev { left: 4px; }
.pd-gallery-nav-next { right: 4px; }

.pd-pr-scroll.horz { overflow-x: auto; overflow-y: scroll; }

.pd-pr-scroll::-webkit-scrollbar { -webkit-appearance: none; width: 8px; height: 8px; margin-left: 20px; }
.pd-pr-scroll::-webkit-scrollbar-track { border-radius: 8px; background: #f9f9f9; }
.pd-pr-scroll::-webkit-scrollbar-thumb { border-radius: 10px; background: #c1c1c1; }

.pd-pr-scroll.disabled { opacity: .5; }

.pd-stars-container {
  display: flex;
  gap: 7px;
  align-items: center;
  cursor: pointer;
}

.pd-rating-summary-stars .pd-stars-container,
.pd-stars-container.pd-center { justify-content: center; }

.pd-stars { display: flex; gap: 1px; }
.pd-rating-summary-stars .pd-stars { gap: 4px; }

.pd-stars div {
  background: var(--star-image-empty) no-repeat;
  background-size: cover;
  display: block;
  position: relative;
}

.pd-stars div:before {
  content: '';
  display: block;
  background-size: cover;
}

/* Default category size */
.pd-stars div,
.pd-stars div:before {
  height: var(--star-size-sm-scaled);
  width:  var(--star-size-sm-scaled);
}

/* Category size (explicit) */
.pd-stars.pd-category div,
.pd-stars.pd-category div:before {
  height: var(--star-size-sm-scaled);
  width:  var(--star-size-sm-scaled);
}

/* Product size */
.pd-stars.pd-product div,
.pd-stars.pd-product div:before {
  height: var(--star-size-md-scaled);
  width:  var(--star-size-md-scaled);
}

/* Rating summary (largest) */
.pd-rating-summary-stars .pd-stars div,
.pd-rating-summary-stars .pd-stars div:before {
  height: var(--star-size-xl-scaled);
  width:  var(--star-size-xl-scaled);
}

.pd-stars.pd-rating-05 div:nth-child(1):before { background: var(--star-image-half) no-repeat; }
.pd-stars.pd-rating-1 div:nth-child(1):before,
.pd-stars.pd-rating-15 div:nth-child(1):before { background: var(--star-image-full) no-repeat; }
.pd-stars.pd-rating-15 div:nth-child(2):before { background: var(--star-image-half) no-repeat; }

.pd-stars.pd-rating-2 div:nth-child(1):before, .pd-stars.pd-rating-2 div:nth-child(2):before,
.pd-stars.pd-rating-25 div:nth-child(1):before, .pd-stars.pd-rating-25 div:nth-child(2):before { background: var(--star-image-full) no-repeat; }

.pd-stars.pd-rating-25 div:nth-child(3):before { background: var(--star-image-half) no-repeat; }

.pd-stars.pd-rating-3 div:nth-child(1):before, .pd-stars.pd-rating-3 div:nth-child(2):before, .pd-stars.pd-rating-3 div:nth-child(3):before,
.pd-stars.pd-rating-35 div:nth-child(1):before, .pd-stars.pd-rating-35 div:nth-child(2):before, .pd-stars.pd-rating-35 div:nth-child(3):before { background: var(--star-image-full) no-repeat; }

.pd-stars.pd-rating-35 div:nth-child(4):before { background: var(--star-image-half) no-repeat; }

.pd-stars.pd-rating-4 div:nth-child(1):before, .pd-stars.pd-rating-4 div:nth-child(2):before, .pd-stars.pd-rating-4 div:nth-child(3):before, .pd-stars.pd-rating-4 div:nth-child(4):before,
.pd-stars.pd-rating-45 div:nth-child(1):before, .pd-stars.pd-rating-45 div:nth-child(2):before, .pd-stars.pd-rating-45 div:nth-child(3):before, .pd-stars.pd-rating-45 div:nth-child(4):before { background: var(--star-image-full) no-repeat; }

.pd-stars.pd-rating-45 div:nth-child(5):before { background: var(--star-image-half) no-repeat; }
.pd-stars.pd-rating-5 div { background: var(--star-image-full) no-repeat; }

.pd-stars-rating-count {
  font-weight: initial;
  font-size: var(--fs-sm);
  color: #777777;
  white-space: nowrap;
}

/* Review source breakout (native vs syndicated) */
.pd-review-sources-box {
  margin-top: 8px;
  text-align: center;
  font-size: var(--fs-sm);
  line-height: 1.3;
}
.pd-review-source-row {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  column-gap: 0.35rem;
  align-items: baseline;
  margin: 2px auto;
}
.pd-review-source-label,
.pd-review-source-separator,
.pd-review-source-value { white-space: nowrap; }
.pd-review-source-separator {
  text-align: center;
  width: 0.7rem;
  display: inline-block;
}

.pd-stars-rating-count > div { display: inline; }

.pd-stars-container.pd-category .pd-stars-rating-count {
  font-family: Arial;
  font-size: var(--fs-sm);
  color: #777777;
}

.pd-stars-container.pd-category .pd-stars-rating-count > div { display: none; }

/* ========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Mobile-first: Base styles for small screens */
@media (max-width: 599px) {
  /* Add padding to main container on mobile */
  #pd-product-reviews-2025 { padding: 10px; }
  
  /* Summary wrapper - reduce padding on mobile */
  .pd-reviews-summary-wrapper { margin-bottom: 15px; }
  
  .pd-reviews-summary-wrapper.pd-reviews-view-all-summary-wrapper { padding: 8px; }
  
  /* Reduce star size on mobile */
  .pd-rating-summary-stars .pd-stars div,
  .pd-rating-summary-stars .pd-stars div:before {
    height: var(--star-size-lg-scaled);
    width:  var(--star-size-lg-scaled);
  }
  
  /* Make snapshot bars responsive */
  .pd-reviews-snapshot-bar { width: 80px; min-width: 60px; }
  
  /* Snapshot table layout */
  .pd-reviews-snapshot-wrapper { display: block !important; width: 100%; }
  .pd-reviews-snapshot-inner { max-width: 300px; margin: 0 auto; }
  .pd-reviews-snapshot {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
  }
  .pd-reviews-snapshot > div { display: block !important; }
  .pd-reviews-snapshot-title { flex: 0 0 50px; }
  .pd-reviews-snapshot-bar-wrapper { flex: 1; min-width: 0; }
  .pd-reviews-snapshot-bar { width: 100%; max-width: 100%; }
  .pd-reviews-snapshot-percent { flex: 0 0 45px; text-align: right; }
  
  /* Stack data points vertically on mobile */
  .pd-pr-data-points-wrapper { flex-direction: column; gap: 15px; }
  
  /* Reviewer info - wrap on mobile */
  .pd-pr-reviewer-info-wrapper { flex-wrap: wrap; gap: 8px; font-size: var(--fs-sm); }
  .pd-pr-reviewer-info-inner { order: 1; flex: 1 1 100%; min-height: auto; }
  .pd-pr-syndicated-inline {
    order: 2;
    flex: 1 1 100%;
    margin-left: 0;
    min-height: auto;
    display: block;
    text-align: left;
  }
  
  .pd-pr-verified-buyer-badge,
  .pd-pr-verfied-buyer-badge {
    order: 3;
    margin-left: 0;
    margin-top: 5px;
  }
  
  /* Review wrapper - reduce padding */
  .pd-pr-wrapper { padding-top: 15px; padding-bottom: 8px; }
  
  /* Review title - smaller on mobile */
  .pd-pr-title { font-size: var(--fs-sm); }
  
  /* Review description - better spacing */
  .pd-pr-review-description {
    padding-bottom: 20px;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  /* Images - make them responsive */
  .pd-pr-review-images img { height: 60px; }
  .pd-reviews-customer-image-gallery-flex img { height: 35px; }
  
  /* Circular progress - smaller on mobile */
  .pd-reviews-circular-progress svg { width: 75px; height: 75px; }
  .pd-reviews-circular-progress-percent {
    top: 1px;
    font-size: var(--fs-lg);
    line-height: 75px;
  }
  
  /* Button - constrained width on mobile */
  .pd-reviews-summary-review-btn { max-width: 350px; margin: 0 auto; }
  .pd-reviews-summary-review-btn > a,
  .pd-reviews-summary-review-btn > input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: var(--fs-sm);
  }
  
  /* Merchant response - reduce padding */
  .pd-pr-merchant-response-wrapper { padding: 12px; }
  
  /* Text readability */
  body { font-size: var(--fs-sm); }
  .pd-pr-data-points li { font-size: var(--fs-sm); }
  
  /* Better handling of long text */
  .pd-pr-reviewer-location,
  .pd-pr-reviewer-name {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}

/* Desktop and Tablet: 600px and up */
@media (min-width: 600px) {
  /* Summary title adjustments */
  .pd-reviews-summary-title-item-img img { max-height: 100px; }

  .pd-reviews-summary-title-heading { font-size: var(--fs-sm); }

  .pd-reviews-summary-title-item-name a { font-size: var(--fs-xl); }
  
  /* Review stars and title layout */
  .pd-pr-stars-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .pd-pr-title { margin-top: 0; }
}

/* Tablet only: 600px - 985px */
@media (min-width: 600px) and (max-width: 985px) {
  /* Snapshot bars - medium size */
  .pd-reviews-snapshot-bar { width: 90px; }
  
  /* Data points - allow wrapping on tablet */
  .pd-pr-data-points-wrapper { flex-wrap: wrap; gap: 20px; }
  
  .pd-pr-data-points { flex: 1 1 45%; min-width: 200px; }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
  .helpful-btn, .report-btn {
    padding: 8px 16px;
    font-size: var(--fs-sm);
    min-height: 44px;
  }
  
  .load-more-btn {
    padding: 14px 28px;
    font-size: var(--fs-base);
    min-height: 48px;
  }
  
  .write-review-btn { padding: 12px 24px; min-height: 48px; }
}

/* Optimize summary layout for very small screens */
@media (max-width: 374px) {
  .pd-reviews-summary-review-btn > a,
  .pd-reviews-summary-review-btn > input {
    font-size: var(--fs-xs);
    padding: 10px 14px;
  }
}

/* Ensure images don't overflow on small screens */
img { max-width: 100%; height: auto; }
.pd-reviews-summary-title-item-img img { max-width: 100%; }

/* Improve horizontal scrolling on mobile */
.pd-pr-scroll { -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }

.pd-pr-verfied-buyer-badge {
  margin-left: 15px;
  line-height: 14px;
  display: inline-flex !important;
  gap: 5px;
  align-items: center;
  vertical-align: middle;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #fff;
  background: #1da149;
  /* background: rgba(0,0,0,.05); */
  white-space: nowrap;
  padding: 3px 9px 3px 4px;
  border-radius: 30px;
}

/* ========== MANUAL CSS OVERRIDES ========== */
/* inside the shadow root stylesheet */
:host {
  box-sizing: border-box;
  display: block;
  max-width: 100%;
}

/* safety */
img, svg { max-width: 100%; height: auto; }
.pd-pr-review-description { overflow-wrap: anywhere; }

/* Always push Customer Images to the next line / full row */
.pd-reviews-customer-image-gallery-wrapper{
  display:block;       /* defeat inline/inline-block layouts */
  width:100%;
  max-width:100%;

  /* if parent uses floats */
  clear: both;

  /* if parent is flex */
  flex: 0 0 100%;

  /* if parent is grid */
  grid-column: 1 / -1;
}

/* container query on this block */
.pd-reviews-summary-wrapper { container-type: inline-size; }

/* Mobile: 1 column, all items stacked */
.pd-reviews-summary-inner {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: stretch;
}

/* allow items to shrink without overflow */
.pd-rating-summary-wrapper,
.pd-reviews-snapshot-wrapper,
.pd-reviews-buyers-recommend-wrapper { 
  min-width: 0;
  width: 100%;
}

/* Tablet: 2 columns with recommend circle centered on second row */
@container (min-width: 640px) {
  .pd-reviews-summary-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  
  /* Make recommend circle span both columns and center it */
  .pd-reviews-buyers-recommend-wrapper {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 400px;
  }
}

/* Desktop: 3 columns, all items in one row */
@container (min-width: 960px) {
  .pd-reviews-summary-inner {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
  }
  
  /* Reset recommend circle to normal column */
  .pd-reviews-buyers-recommend-wrapper {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
  }
}

/* Buyers Recommend - Circle Progress */
.pd-reviews-buyers-recommend-wrapper{
  --ring-track:#3a3a3a;
  --ring-accent:#77d17c;
}

.pd-reviews-buyers-recommend{
  display:flex;
  align-items:center;
  gap:15px;
}

/* Default: Large circle for desktop with text below */
.pd-reviews-circular-progress svg { width: 120px; height: 120px; }

.pd-reviews-circular-progress-percent {
  top: 0;
  font-size: var(--fs-xl);
  line-height: 120px;
}

.pd-reviews-circular-progress circle:nth-child(2){
  stroke-dasharray:100 100;
  stroke-dashoffset: calc(100 - var(--p));
  transition: stroke-dashoffset .3s ease;
}

/* Desktop: Stack circle and text vertically */
@media (min-width: 600px) {
  .pd-reviews-buyers-recommend { flex-direction: column; gap: 10px; }
  .pd-reviews-buyers-recommend-text {
    text-align: center;
    max-width: 150px;
    left: 0;
    top: 0;
  }
}

/* Mobile: Smaller circle with text to the right */
@media (max-width: 599px) {
  .pd-reviews-circular-progress svg { width: 75px; height: 75px; }
  .pd-reviews-circular-progress-percent {
    font-size: var(--fs-lg);
    line-height: 75px;
  }
  .pd-reviews-buyers-recommend { flex-direction: row; }
}

/* Rating stars (data-URI strip version) */
.pdRatingStarsWrapper {
  /* Controls */
  --size: 1.1em; /* star size */
  --product-stars-size: 1.2em;
  --max: 5; /* number of stars */
  --gap: 2px; /* space between stars */

  /* Colors */
  --text-color: #374151; /* count/link text */
  /* To recolor stars, override these two data-URIs per theme */
  --bg-star-empty: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon fill='%23e5e7eb' stroke='%23cbd5e1' stroke-width='1' stroke-linejoin='round' points='12 1.5 15.09 8.26 22.5 9.27 17 14.14 18.18 21.45 12 17.77 5.82 21.45 7 14.14 1.5 9.27 8.91 8.26'/></svg>");
  --bg-star-fill: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon fill='%23f59e0b' points='12 1.5 15.09 8.26 22.5 9.27 17 14.14 18.18 21.45 12 17.77 5.82 21.45 7 14.14 1.5 9.27 8.91 8.26'/></svg>");

  /* Layout */
  display: inline-flex; align-items: center; gap: .5em; color: var(--text-color);
}

.pdRatingStarsWrapper .pdStars {
  --tile: calc(var(--size) + var(--gap)); /* one star cell width */
  width: calc(var(--max) * var(--tile));
  height: var(--size);
  position: relative; display: inline-block; flex: 0 0 auto;
  background-image: var(--bg-star-empty);
  background-repeat: repeat-x;
  background-size: var(--tile) var(--size);
  background-position: 0 0;
}

.pdRatingStarsWrapper .pdStars::after {
  content: ""; position: absolute; inset: 0 auto 0 0; pointer-events: none;
  width: calc((var(--rating, 0) / var(--max)) * 100%); /* fractional fill */
  background-image: var(--bg-star-fill);
  background-repeat: repeat-x; background-size: var(--tile) var(--size); background-position: 0 0;
}

.pdRatingStarsWrapper .pdCount { font-size: var(--fs-xs); color: var(--text-color); text-decoration: none; }
.pdRatingStarsWrapper .pdCount:hover { text-decoration: underline; }
.sr-only { position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }






