
#ysr-customer-reviews {
  margin:32px 0;
  color:#252525;
}
#ysr-customer-reviews .ysr-intro {
  color:#666;
  font-size:15px;
  margin-bottom:20px;
}
#ysr-customer-reviews .tbm-card {
  background:#fff;
  border:1px solid #dedede;
  border-radius:10px;
  padding:18px;
  margin:0 0 14px;
  text-align:left;
}
#ysr-customer-reviews .tbm-meta {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:6px;
}
#ysr-customer-reviews .tbm-stars {
  color:#b8860b;
  font-size:21px;
  letter-spacing:2px;
}
#ysr-customer-reviews .tbm-verified {
  color:#287745;
  font-size:12px;
  font-weight:700;
}
#ysr-customer-reviews .tbm-byline {
  color:#666;
  font-size:13px;
  margin:6px 0;
}
#ysr-customer-reviews .tbm-card h3 {
  font-size:18px;
  line-height:1.4;
  margin:8px 0;
}
#ysr-customer-reviews .tbm-text {
  font-size:15px;
  line-height:1.65;
  white-space:pre-line;
  margin:8px 0;
}
#ysr-customer-reviews .ysr-review-button {
  display:block;
  margin:20px auto;
  padding:12px 22px;
  border:1px solid #333;
  border-radius:6px;
  background:#fff;
  color:#222;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
#ysr-customer-reviews .tbm-more {
  border:0;
  background:none;
  color:#245e96;
  cursor:pointer;
  padding:0;
  font:inherit;
  text-decoration:underline;
}
#ysr-customer-reviews dialog {
  width: min(720px, 90vw);
  max-height:85vh;
  padding:20px;
  border:0;
  border-radius:12px;
  overflow:auto;
  background:#fafafa;
}
#ysr-customer-reviews dialog::backdrop {
  background:rgba(0,0,0,.65);
}
#ysr-customer-reviews .ysr-dialog-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}
#ysr-customer-reviews .ysr-close {
  background:none;
  border:0;
  font-size:30px;
  cursor:pointer;
}
#ysr-customer-reviews [hidden] {
  display:none!important;
}
@media(max-width:767px) {
  #ysr-customer-reviews .tbm-card {padding:14px;}
  #ysr-customer-reviews dialog {padding:14px;}
}

/* YSR popup close fix */
#ysr-customer-reviews dialog {
  position:fixed!important;
  inset:0!important;
  margin:auto!important;
  box-sizing:border-box!important;
}
#ysr-customer-reviews .ysr-dialog-header {
  position:sticky!important;
  top:-20px;
  background:#fafafa;
  z-index:100;
  padding:10px 0;
}
#ysr-customer-reviews .ysr-close {
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  flex-shrink:0;
  color:#222!important;
  background:#eee!important;
  border-radius:50%;
  font-size:28px!important;
  line-height:1!important;
  padding:0!important;
  cursor:pointer;
}
@media(max-width:767px){
  #ysr-customer-reviews .ysr-dialog-header {
    top:-14px;
  }
}

/* YSR popup close V2 */
#ysr-customer-reviews .ysr-close {
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  min-height:46px!important;
  background:#222!important;
  color:#fff!important;
  font-size:34px!important;
  font-weight:700!important;
  border-radius:50%!important;
  border:0!important;
  cursor:pointer!important;
}
#ysr-customer-reviews .ysr-close:hover {
  background:#555!important;
}
#ysr-customer-reviews dialog {
  position:fixed!important;
  top:50%!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  transform:translate(-50%,-50%)!important;
  margin:0!important;
}

/* Square outlined close button */
#ysr-customer-reviews .ysr-close {
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  background:#fff!important;
  color:#222!important;
  border:2px solid #222!important;
  border-radius:0!important;
  font-size:30px!important;
}
#ysr-customer-reviews .ysr-close:hover {
  background:#f0f0f0!important;
}

/* Corner close button refinement */
#ysr-customer-reviews .ysr-dialog-header {
  padding-top:0!important;
  padding-right:48px!important;
}
#ysr-customer-reviews .ysr-close {
  position:absolute!important;
  top:5px!important;
  right:-10px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  border:1px solid #222!important;
  border-radius:0!important;
  font-size:0!important;
  font-weight:400!important;
  background:transparent!important;
}
#ysr-customer-reviews .ysr-close::before,
#ysr-customer-reviews .ysr-close::after {
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:39px;
  height:1.5px;
  background:#222;
}
#ysr-customer-reviews .ysr-close::before {
  transform:translate(-50%,-50%) rotate(45deg);
}
#ysr-customer-reviews .ysr-close::after {
  transform:translate(-50%,-50%) rotate(-45deg);
}

/* Refined close button */
#ysr-customer-reviews .ysr-close {
  top:-5px!important;
  right:-12px!important;
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  min-height:30px!important;
  border:1px solid #777!important;
  border-radius:2px!important;
}
#ysr-customer-reviews .ysr-close::before,
#ysr-customer-reviews .ysr-close::after {
  width:22px!important;
  height:1.5px!important;
  background:#333!important;
}

/* Mobile popup refinement */
@media(max-width:767px) {
  #ysr-customer-reviews .ysr-close {
    right:-6px!important;
    -webkit-tap-highlight-color:transparent;
  }
  #ysr-customer-reviews .ysr-close:focus:not(:focus-visible) {
    outline:none!important;
    box-shadow:none!important;
  }
  #ysr-customer-reviews .ysr-dialog-header {
    margin-bottom:6px!important;
    padding-bottom:4px!important;
  }
  #ysr-customer-reviews .ysr-dialog-header h3 {
    margin-bottom:8px!important;
  }
}

/* Mobile popup height and focus refinement */
@media(max-width:767px) {
  #ysr-customer-reviews dialog {
    height:70vh!important;
    height:70dvh!important;
    max-height:70vh!important;
    max-height:70dvh!important;
  }
  #ysr-customer-reviews dialog:focus {
    outline:none!important;
  }
}

/* Fixed popup header with independently scrolling reviews */
#ysr-customer-reviews dialog[open] {
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
#ysr-customer-reviews .ysr-dialog-header {
  position:relative!important;
  top:0!important;
  flex-shrink:0!important;
}
#ysr-customer-reviews .ysr-all-reviews {
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
}

#ysr-customer-reviews {
    border-top: none !important;
}

#ysr-customer-reviews {
    margin-top: 0 !important;
    padding-top: 20px !important;
}

@media(max-width:767px) {
    #ysr-customer-reviews {
        padding-top: 15px !important;
    }
}

#tbm-expanded-review-faq {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

#ysr-customer-reviews {
    margin-top: 0 !important;
    padding-top: 24px !important;
}

#ysr-customer-reviews > h3 {
    margin-top: 0 !important;
}


/* Mobile customer review spacing */
@media (max-width: 767px) {
    #ysr-customer-reviews {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }
    #ysr-customer-reviews > h3 {
        margin-top: 0 !important;
    }
}


/* TBM mobile ingredient-to-review spacing */
@media (max-width: 767px) {
    .section:has(.tbm-ingredient-card) {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    #ysr-customer-reviews.section {
        margin-top: 0 !important;
        padding-top: 12px !important;
    }
    #ysr-customer-reviews > h3 {
        margin-top: 0 !important;
    }
}


/* Mobile review button spacing refinement */
@media (max-width: 767px) {
    #ysr-customer-reviews .ysr-review-button {
        margin-top: 20px !important;
        margin-bottom: 0 !important;
    }
    #ysr-customer-reviews {
        padding-bottom: 0 !important;
        margin-bottom: 24px !important;
    }
    #ysr-customer-reviews ~ section {
        margin-top: 0 !important;
    }
}
