/* Modal body */
body.ryviu-media-modal-open,
body.ryviu-feature-modal-open,
body.ryviu-carousel-modal-open {
  overflow: hidden;
}
.r--question-block,
.r--ryviu-block,
questions-answers,
ryviu-widget{
  display: flex;
}
/* Modal iframe */


.ryviu-modal-iframe-wrapper,
.ryviu-modal-iframe{
  width: 90%;
  max-width: 600px;
  height: 80%;
  max-height: 650px;
}
.ryviu-modal-iframe-wrapper{
  position: relative;
}

.ryviu-modal-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  animation: ryviuModalSpin 2s linear infinite;
  z-index: 10000;
}
.ryviu-modal-loading-spinner circle {
  stroke: #ffffff;
  stroke-width: 3;
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  fill: none;
  animation: ryviuModalSpinDash 1.5s ease-in-out infinite;
}
@keyframes ryviuModalSpin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes ryviuModalSpinDash {
  0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 200; stroke-dashoffset: -35px; }
  100% { stroke-dasharray: 90, 200; stroke-dashoffset: -124px; }
}

@media (min-width: 701px) {
  .ryviu-modal-iframe-wrapper.ryviu-review-modal-iframe{
    height: auto;
  }
}

.ryviu-modal-iframe-container{
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  border-radius: 20px;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 10px 30px;
}

/* Answer modal iframe */
.ryviu-answer-modal-iframe{
  max-height: 670px;
}

/* Question modal iframe */
.ryviu-question-modal-iframe{
  max-height: 630px;
}

/* Review modal iframe */
/* .ryviu-review-modal-iframe{
  max-height: 750px;
} */

/* Media modal iframe */
.ryviu-media-modal-iframe{
  max-height: 700px;
  max-width: 1000px;
}

.ryviu-media-modal-iframe-no-image{
  max-height: 500px;
  max-width: 400px;
}

.ryviu-show-only-mobile{
  display: none;
}
.r--empty-data{
  display: none!important;
}

.ryviu-shopify-mode .r--empty-data{
  display: flex!important;
}

@media (max-width: 768px) {
  .ryviu-show-only-mobile{
    display: block;
  }
} 


/* Featured review modal iframe */
.ryviu-featured-review-modal-iframe,
.ryviu-carousel-review-modal-iframe{
  max-width: 80%;
  max-height: 85%;
  padding: 20px 0px;
}

.ryviu-featured-review-modal-iframe .ryviu-modal-close-btn-desktop,
.ryviu-carousel-review-modal-iframe .ryviu-modal-close-btn-desktop{
  top: 0;
}

#ryviu-answer-modal,
#ryviu-question-modal,
#ryviu-media-modal,
#ryviu-review-modal,
#ryviu-featured-review-modal,
#ryviu-carousel-review-modal{
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.ryviu-modal-close-btn-desktop{
  position: absolute;
  top: -15px;
  right: -35px;
  width: 35px;
  height: 35px;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
  border-radius: 4px;
  opacity: 0.7;
}
.ryviu-modal-close-btn-desktop:hover{
  opacity: 1;
}
.ryviu-modal-close-btn-desktop svg{
  width: 14px;
  height: 14px;
  flex: none;
}
.ryviu-modal-close-btn-desktop svg path{
  fill: #fff;
  stroke: #fff;
}
/* Modal close button */
.ryviu-modal-close-btn{
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 8px;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ryviu-modal-close-btn:hover{
  background: rgba(255, 255, 255, 1);
}

/* Star Rating */
.ryviu-product-rating,
ryviu-widget-total {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ryviu-collections-page.ryviu-product-rating,
ryviu-widget-total.ryviu-collections-page {
  justify-content: center;
}

.ryviu-product-rating.vertical,
ryviu-widget-total.vertical {
  flex-direction: column;
  align-items: flex-start;
}

.stars {
  display: flex;
  gap: 2px;
  line-height: 1;
}

.star {
  color: #ddd;
  font-size: 20px;
}

.star.filled {
  color: #ffb800;
}

.review-count {
  font-size: var(--ryviu-font-size, 14px);
  line-height: 1;
  display: flex;
  align-items: center;
  margin-top: 1px;
  margin-left: 4px;
}
.review-count .trw-avg{
  margin-right: 4px;
}

.review-count .trw-text{
  margin-left: 4px;
}

.star-container{
  position: relative;
}
.star-overlay{
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  display: block;
  pointer-events: none;
}

@media (max-width: 768px) {
  .ryviu-modal-iframe{
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .ryviu-modal-iframe-wrapper{
    max-width: 100%;
    width: 100%;
    border-radius: 0;
  }
  .ryviu-modal-iframe-container{
    border-radius: 0;
  }

  .ryviu-modal-iframe-wrapper{
    max-height: 100%;
    height: 100%;
    max-width: 100%;
    width: 100%;
    border-radius: 0;
    padding: 0;
  }

  .ryviu-featured-review-modal-iframe .ryviu-modal-close-btn-desktop, .ryviu-carousel-review-modal-iframe .ryviu-modal-close-btn-desktop{
    top: 10px;
  }

  .ryviu-modal-close-btn-desktop{
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  
  .ryviu-modal-close-btn-desktop svg path{
    fill: #000;
    stroke: none;
  }
}

/* End Star Rating */

/* Snippet Review Card Image */
.snippet-review-card.has-image {
  display: flex;
  align-items: center;
  gap: 15px;
}

.snippet-card-image {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
}

.snippet-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.snippet-card-body {
  flex: 1;
}