$color_1: red;
$color_2: #456083;
$color_3: #ffb600;
$color_4: white;
$color_5: #ffffff;
$color_6: #fff;
$font-family_1: "woocommerce-photo-reviews";
$background-color_1: var(--upload_button_color);
$background-color_2: transparent;
$background-color_3: rgba(0, 0, 0, 0.1);
$background-color_4: rgba(0, 0, 0, 0.5);
$background-color_5: rgba(0, 0, 0, 0.8);
$background-color_6: #000000;

@font-face {
  font-family: "woocommerce-photo-reviews";
  src: url("../fonts/woocommerce-photo-reviews.eot");
  src: url("../fonts/woocommerce-photo-reviews.eot?#iefix") format("embedded-opentype"), url("../fonts/woocommerce-photo-reviews.woff") format("woff"), url("../fonts/woocommerce-photo-reviews.ttf") format("truetype"), url("../fonts/woocommerce-photo-reviews.svg") format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@keyframes wcpr_notify_loading {
  0% {
    transform: translate3d(0, 2px, 0) scale(1.2, 0.85);
  }
  100% {
    transform: translate3d(0, -5px, 0) scale(0.9, 1.1);
  }
}

@keyframes wcpr_notify_loading {
  0% {
    transform: translate3d(0, 2px, 0) scale(1.2, 0.85);
  }
  100% {
    transform: translate3d(0, -5px, 0) scale(0.9, 1.1);
  }
}

/*overall rating*/
/*filter*/
/*filter overlay-normal style only*/
/*button load more*/
/*Input file*/
/*For woodmart theme*/
/*custom fields*/
/*custom fields in review*/
/*vote button*/
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  @font-face {
    font-family: $font-family_1;
    src: url("../fonts/woocommerce-photo-reviews.svg") format("svg");
  }
}

.woocommerce-Reviews {
  flex-direction: column;
}

.rtl {
  .wcpr-stars-count {
    padding-left: 0;
    padding-right: 20px;
  }

  .rate-percent-bg {
    .rate-percent {
      left: unset;
      right: 0;
    }
  }

  .wcpr-overall-rating-right {
    padding-left: unset;
    text-align: right;
    padding-right: 10px;

    .wcpr-overall-rating-right-star {
      .star-rating {
        float: right !important;
      }
    }
  }

  .wcpr-filter-button {
    &:before {
      margin: 0 0 0 5px !important;
    }

    .wcpr-filter-rating-placeholder {
      display: flex;
      justify-content: center;
    }
  }

  .wcpr-filter-button[data-filter_type="verified"] {
    display: flex;
    justify-content: center;
  }

  .wcpr-filter-button.wcpr-filter-button-images {
    display: flex;
    justify-content: center;
  }

  .wcpr-filter-container {
    li.wcpr-filter-button-li {
      a {
        display: flex;
        justify-content: center;
      }
    }
  }
}

.wcpr_image_upload_button {
  text-transform: inherit;
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 6px;
}

.wcpr_image_upload_button.button {
  text-transform: inherit;
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 6px;

  &:before {
    content: "";
    mask: url("../images/add-photo-medium-ion.svg") no-repeat center/contain;
    -webkit-mask: url("../images/add-photo-medium-ion.svg") no-repeat center/contain;
    background-color: $background-color_1;
    width: 17px;
    height: 17px;
    margin-right: 10px;
  }
}

.wcpr_image_upload_button.icon_with_text {
  padding: 0;
  background-color: $background-color_2;
  border: unset;
  display: inline-flex;
  align-items: center;
  &:before {
    content: "";
    background: url(../images/add-photo-bigger.svg) no-repeat center / contain;
    width: 90px;
    height: 90px;
    margin-right: 15px;
    background-color: $background-color_2;
    background-size: 40px;
    padding: 15px;
    mask-size: 40px;
    border: solid 1px #c3c3c3 !important;
    border-radius: 6px;
    display: block;
  }
}

.wcpr-hidden {
  display: none !important;
}

.wcpr-comment-form-error {
  color: $color_1;
  display: inline-grid;
  white-space: break-spaces !important;
  margin-bottom: 15px;
  width: 100% !important;
}

.wcpr-comment-form-notify {
  color: $color_2;
  display: inline-block;

  > span {
    display: inline-flex;
    white-space: break-spaces !important;
    align-items: baseline;
    gap: 5px;
    margin-left: 5px;

    span {
      width: 5px;
      height: 5px;
      border-radius: 100%;
      background: #456083;
      animation: wcpr_notify_loading 0.5s 0.1s alternate infinite cubic-bezier(.6, .05, .15, .95) backwards;

      &:first-child {
        animation: wcpr_notify_loading 0.5s alternate infinite cubic-bezier(.6, .05, .15, .95);
      }

      &:last-child {
        animation: wcpr_notify_loading 0.5s 0.12s alternate infinite cubic-bezier(.6, .05, .15, .95) backwards;
      }
    }
  }
}

.wcpr-stars-count {
  font-size: 10px;
  width: -webkit-fill-available;
  width: -moz-available;
  &.grid-style{
    .wcpr-row{
      .wcpr-col-number{
        display: inline-block;
        font-size: inherit;
      }
      .wcpr-col-star{
        width: calc( 7.5em * 20/100 );
        overflow: hidden;
        .star-rating{
          &:before{
            opacity: 0;
          }
        }
      }
      .wcpr-col-process{
        max-width: calc(100% - 60px);
        margin: 0 10;
      }
      .wcpr-col-rank-count {
        text-align: right;
      }
    }
  }
  .wcpr-row {
    display: flex;
    font-size: 14px;
    width: 100%;
    height: 22px;
    align-items: center;
    justify-content: space-between;

    > div {
      vertical-align: middle;
      font-size: 0;
      display: inline-block;
      text-align: center;
      box-sizing: border-box;
      padding: 0;
    }

    .wcpr-col-rank-count {
      width: 50px;
      white-space: nowrap;
      font-size: inherit;
    }

    .wcpr-col-process {
      max-width: calc(100% - 50px - 6.6em);
      width: 100%;
      font-size: inherit;
    }

    .wcpr-col-star {
      width: 7.5em;
      font-size: inherit;

      .star-rating {
        //width: 100%;
        font-size: inherit;
        float: left;

        &:before {
          color: $color_3;
          opacity: 0.3 !important;
          float:left;
        }

        span {
          &:before {
            color: $color_3;
          }
        }
      }

      &:before {
        color: $color_3;
        opacity: 0.3 !important;
      }

      span {
        &:before {
          color: $color_3;
        }
      }
    }

    .wcpr-col-number {
      width: 16px;
      display: none;
    }
  }
}

.wcpr-html {
  overflow: hidden;
}

.rate-percent-bg {
  .rate-percent-bg-1 {
    position: absolute;
    text-align: center;
    width: 100%;
    color: $color_4;
    z-index: 2;
  }

  .rate-percent {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    border-radius: 3px;
  }

  position: relative;
  height: 6px;
  background-color: $background-color_3;
  display: inline-block;
  width: 100%;
  vertical-align: middle;
  font-size: 0;
  border-radius: 3px;
  overflow: hidden;
}

.wcpr-modal-light-box {
  box-sizing: border-box;

  * {
    box-sizing: border-box;
  }
}

.wcpr-col-star {
  .star-rating {
    &:before {
      font-size: inherit;
      letter-spacing: inherit;
      //letter-spacing: 1px !important;
    }

    span {
      &:before {
        font-size: inherit;
        letter-spacing: inherit;
        //letter-spacing: 1px !important;
      }
    }
  }
}

#comments {
  .wcpr-overall-rating-and-rating-count {
    display: inline-flex !important;
    gap: 20px;
    width: 100%;
    padding-bottom: 30px;

    h2 {
      display: inline;
      white-space: nowrap;
    }

    .wcpr-overall-rating-right-star {
      .star-rating {
        &:before {
          font-size: inherit;
          letter-spacing: inherit;
          //letter-spacing: 1px !important;
        }

        span {
          &:before {
            font-size: inherit;
            letter-spacing: inherit;
            //letter-spacing: 1px !important;
          }
        }
      }
    }

    &.grid-style {
      display: flex;
      gap: 20px;
      padding: 0;

      .wcpr-overall-rating-right-star{
        font-size: 20px;
        .star-rating {
          min-width: 109px;
          min-height: 20px;
          span{
            min-height: 20px;
            &:before{
              font-size: 20px !important;
            }
          }
          &:before{
            font-size: 20px !important;
          }
        }
      }
      .wcpr-overall-rating {
        flex-grow: 1;
        width: auto;
        background-color: #f6f6f6;
        display: flex;
        border-radius: 10px;
        padding: 20px;

        .wcpr-overall-rating-main {
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          justify-content: flex-start;

          .wcpr-overall-rating-average {
            font-size: 45px;
            font-weight: bold;
            line-height: 1.125;
          }


          .wcpr-overall-rating-right-total {
            font-size: 1.125em;
            margin-top: 5px;
            color: #ffb600;
          }
        }
      }

      .wcpr-stars-count {
        flex-grow: 1;
        width: auto;
        background-color: #f6f6f6;
        border-radius: 10px;
        padding: 20px;
      }
    }
  }

  .wcpr-filter-container {
    display: flex !important;
    &.wcpr-filter-style-grid,
    &.wcpr-filter-style-grid-layout-2 {
      border-width: 1px 0 1px 0 ;
      margin-top: 35px;
      margin-bottom: 35px;
      gap: 25px;
      padding: 15px 0;

      .wcpr-filter-button {
        border-radius: 20px ;
        margin: 0 ;
      }
    }
  }


}

.wcpr-overall-rating-main {
  display: flex;
  align-items: center;

  .wcpr-overall-rating-right {
    .wcpr-overall-rating-right-total {
      float: none;
      clear: both;
      white-space: nowrap;
    }
  }
}

.wcpr-overall-rating-left {
  padding: 15px 10px;
  text-align: center;
  vertical-align: middle;
  background: #2d2b2b;
  color: $color_4;
  border-radius: 3px;
  font-size: 16px;
  margin: 10px 1px;

  .wcpr-overall-rating-left-average {
    white-space: nowrap;
  }
}

.wcpr-overall-rating-right {
  padding-left: 10px;
  text-align: left;

  .wcpr-overall-rating-right-star {
    .star-rating {
      width: 5.5em;
      font-size: 14px;
      float: left !important;

      &:before {
        color: $color_3;
        opacity: 0.3 !important;
      }

      span {
        &:before {
          color: $color_3;
        }
      }
    }
  }
}

.product {
  .woocommerce-product-rating {
    .star-rating {
      &:before {
        color: $color_3;
        opacity: 0.3 !important;
      }

      span {
        &:before {
          color: $color_3;
        }
      }
    }
  }
}

.commentlist {
  .comment-text {
    .star-rating {
      &:before {
        color: $color_3;
        opacity: 0.3 !important;
      }

      span {
        &:before {
          color: $color_3;
        }
      }
    }
  }
}

.wcpr-filter-container {
  padding: 0;
  margin: 20px 0;
  text-align: center;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;

  .wcpr-filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 100;
    cursor: progress;
    display: none;
  }

  .wcpr-filter-button {
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 2px;
    padding: 10px 15px !important;
    display: inline-block;
    margin: 10px 5px !important;
    font-size: 15px;
    font-weight: 300;
    line-height: 1;
    color: $color_5;
    background-color: $background-color_4;
    transition: all 300ms ease-in-out 0s;
    border: 1px solid;

    &:hover {
      color: $color_5;
      background-color: $background-color_5 !important;
    }
  }

  .wcpr-filter-button.wcpr-active {
    background-color: $background-color_6;
  }

  ul.wcpr-filter-button-ul {
    list-style-type: none;
    position: absolute;
    z-index: 999;
    margin: 10px 0 0 0;
    left: -1px;
    padding: 0;
    display: none;
  }

  li.wcpr-filter-button-li {
    a {
      margin: 0 !important;
      width: 125px !important;
    }
  }
}

.wcpr-filter-container.wcpr-filter-loading {
  .wcpr-filter-button-wrap {
    overflow: hidden;
  }

  .wcpr-filter-overlay {
    display: block;
  }
}

.wcpr-filter-button.wcpr-filter-button-images {
  &:before {
    font-family: $font-family_1;
    content: "\f109";
  }
}

.wcpr-filter-button.wcpr-filter-button-verified {
  &:before {
    font-family: $font-family_1;
    content: "\f10a";
  }
}

.wcpr-filter-button {
  &:before {
    margin: 0 5px 0 0 !important;
    font-size: inherit !important;
  }
}

.wcpr-filter-button-wrap {
  &:hover {
    ul.wcpr-filter-button-ul {
      display: block;
    }
  }

  position: relative;
  display: inline-block;
  width: 125px;
}

li.wcpr-filter-button-li {
  margin: 0 !important;
  display: inline-block;
}

.wcpr-comment-form-images {
  label {
    display: block;
  }

  .wcpr-selected-image {
    width: 30%;
    max-width: 128px;
    margin: 10px 0 0;
  }

  margin: .5em 0;
  width: 100%;

  .wcpr_image_upload {
    width: 100%;
    margin-bottom: 10px;
  }

  .wcpr-selected-image-caption {
    width: 100%;
  }

  .wcpr-selected-image-name {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .8em;
    white-space: nowrap;
  }
}

.wcpr-comment-form-title {
  input {
    margin: 0;
    width: 100%;
  }
}

.wcpr-load-more-reviews-button-container {
  .wcpr-load-more-reviews-button {
    display: inline-block !important;
    background: rgb(0, 0, 0);
    color: $color_6;
    border-radius: 3px;
    width: 100px;
    height: 40px;
    line-height: 40px;
    font-size: 14px;
    margin: 10px 0;
    font-weight: 400;
    cursor: pointer;
    position: relative;
  }

  span.wcpr-load-more-reviews-button.wcpr-loading {
    &:before {
      background: white;
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
    }

    &:after {
      content: url(../images/loading-1.gif);
      width: 64px;
      height: 64px;
      font-size: 15px;
      position: absolute;
      left: 50%;
      top: 50%;
      opacity: 1;
      transform: translate(-50%, -50%) scale3d(0.5, 0.5, 0.5);
      display: inline-block;
    }
  }

  text-align: center;
}

.wcpr-input-file-container {
  .wcpr-input-file-wrap {
    .wcpr-selected-image-container {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: flex-end;
    }

    margin-top: 10px;
    margin-bottom: 10px;

    .wcpr-selected-image {
      input {
        margin: 0;
      }
    }
  }
}

.wcpr-comment-form-images.wcpr-comment-form-images-with-caption {
  .wcpr-selected-image {
    width: 100%;
    max-width: 100%;
    margin: 5px 0;
    display: flex;
    align-items: center;

    img.wcpr-selected-image-preview {
      width: 25%;
      max-width: 64px;
    }

    video.wcpr-selected-image-preview {
      width: auto;
      max-width: 100px;
    }
  }

  .wcpr-selected-image-info {
    width: calc(100% - 64px);
    padding-left: 10px;
  }
}

.theme-woodmart {
  .wcpr-custom-fields {
    width: 100%;
    padding: 0 10px;
  }

  .wcpr-comment-form-images {
    padding: 0 10px;
  }

  .wcpr-form-description {
    width: 100%;
    padding: 0 10px;
    margin-bottom: 10px;
  }

  .wcpr-comment-form-title {
    width: 100%;
    padding: 0 10px;
    margin-bottom: 10px;
  }
}

.wcpr-custom-field {
  margin: 8px 0;

  .wcpr-custom-field-name {
    font-size: 16px;
  }

  .wcpr-custom-field-input {
    display: flex;
    justify-content: space-between;
    justify-items: center;
    align-items: center;

    > div {
      width: 48%;

      input {
        width: 100%;
        padding: 5px;
        margin: 0;
        font-size: 14px;
      }
    }
  }
}

.wcpr-custom-field-input {
  > div {
    select {
      width: 100%;
      padding: 5px;
      margin: 0;
      font-size: 14px;
    }
  }
}

.wcpr-review-custom-fields {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

span.wcpr-review-custom-field-value {
  font-weight: 500;
}

span.wcpr-review-custom-field-name {
  font-weight: 300;
}

.wcpr-comment-helpful-button-container {
  margin: 5px 0;
  display: flex;
  justify-content: flex-end;
  line-height: 2em;
  border-top: 1px solid rgba(1, 1, 1, .1);
  flex-wrap: wrap;
  padding: 5px 0;
  position: relative;

  span {
    cursor: pointer;
  }

  &:not(.wcpr-comment-helpful-button-voted-up) {
    .wcpr-comment-helpful-button-up-vote {
      &:hover {
        transform: scale3d(1.2, 1.2, 1.2);
      }
    }
  }

  &:not(.wcpr-comment-helpful-button-voted-down) {
    .wcpr-comment-helpful-button-down-vote {
      &:hover {
        transform: scale3d(1.2, 1.2, 1.2) rotate(180deg);
      }
    }
  }
}

.reviews-content-right-meta {
  .wcpr-comment-helpful-button-container {
    margin: 10px 0;
  }
}

span.wcpr-comment-helpful-button-label {
  margin: 0 5px;
}

.wcpr-comment-helpful-button-vote-container {
  display: flex;
}

span.wcpr-comment-helpful-button-down-vote {
  transform: rotate(180deg);
}

.wcpr-comment-helpful-button-up-vote {
  font-weight: 300;
  margin: 0 2px;
  margin-right: 8px;
}

.wcpr-comment-helpful-button-up-vote-count {
  font-weight: 300;
  margin: 0 2px;
}

.wcpr-comment-helpful-button-down-vote {
  font-weight: 300;
  margin: 0 2px;
}

.wcpr-comment-helpful-button-down-vote-count {
  font-weight: 300;
  margin: 0 2px;
}

.wcpr-comment-helpful-button-voted-up {
  .wcpr-comment-helpful-button-up-vote {
    font-weight: 700;
    cursor: initial;
  }

  .wcpr-comment-helpful-button-up-vote-count {
    font-weight: 700;
    cursor: initial;
  }
}

.wcpr-comment-helpful-button-voted-down {
  .wcpr-comment-helpful-button-down-vote {
    font-weight: 700;
    cursor: initial;
  }

  .wcpr-comment-helpful-button-down-vote-count {
    font-weight: 700;
    cursor: initial;
  }
}

.wcpr-comment-helpful-button-voting-overlay {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, .5);
  display: none;
}

.wcpr-comment-helpful-button-voting {
  .wcpr-comment-helpful-button-voting-overlay {
    display: block;
  }
}

.wcpr-comment-helpful-button {
  transition: transform 200ms ease;
}

.wcpr-comment-author-with-country {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 5px;

  .vi-flag-64 {
    margin: -8px -12px;
    transform: scale(0.6);
  }
}

.shortcode-reviews-images {
  height: auto;
}

.reviews-videos {
  height: auto;
}

.reviews-images {
  height: auto;
}

/*Compa theme*/
body {
  &.theme-goya {
    #review_form{
      .comment-form-rating{
        text-align: left;
        background: transparent;
        padding-left: 0;
      }
    }
    #comments {
      .kt-reviews-image-container,
      .wcpr-list-layout-2-style  .reviews-images-wrap-left,
      .wcpr-list-style  .reviews-images-wrap-right,
      .wcpr-grid-layout-2-style  .reviews-images-wrap-left,
      .wcpr-grid-style-item  .reviews-images-wrap-right,
      .wcpr-masonry-style .reviews-images-wrap-right{
        img{
          display: block;
        }
      }
      .wcpr-overall-rating-and-rating-count {
        &:not(.grid-style):not(.list-style) {
          .wcpr-overall-rating-right-star {
            .star-rating {
              &:before {
                letter-spacing: 1.5px;
              }

              span {
                &:before {
                  letter-spacing: 1.5px;
                }
              }
            }
          }
        }
        &.grid-style {
          .wcpr-overall-rating-main {
            .wcpr-overall-rating-right-star {
              .star-rating {
                min-height: 25px;
                &:before {
                  font-size: 25px !important;
                  opacity: 0.3;
                }

                span {
                  min-height: 25px;
                  &:before {
                    font-size: 25px !important;
                  }
                }
              }
            }
          }
        }
      }
    }
    .woocommerce-Reviews .commentlist{
      max-width: 100%;
    }
    #reviews-content-right {
      .woocommerce-photo-reviews-rating-html-shortcode {
        .star-rating {
          letter-spacing: 1.3px;
        }
      }
    }
    .commentlist,#reviews-content-right {
      .wcpr-review-rating{
        .star-rating{
          &:before{
            font-size: 14px;
          }
          span{
            font-size: 0;
            &:before{
              font-size: 14px
            }
          }
        }
      }
      .wcpr-grid-style, .wcpr-grid-layout-2-style{
        .review-author-container{
          .avatar {
            position: static;
          }
        }
      }
      .comment-text{
        border-bottom: unset;
      }
    }
  }
  &.theme-flatsome{
    #reviews{
      flex-direction: column;
      #comments,
      #review_form_wrapper{
        flex-basis:100% !important;
        max-width: 100% !important;
      }
    }
  }
}

@media screen and (max-width: 680px) {
  #comments {
    .wcpr-overall-rating-and-rating-count {
      display: inline-block !important;
    }
  }
  .wcpr-overall-rating-main {
    justify-content: center;
  }
  .wcpr-overall-rating {
    text-align: center;
  }
  .wcpr-stars-count {
    margin: 0;
    padding: 0;
  }
}
