.rdd-reviews {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}
.rdd-reviews__item {
  width: 100%
  border-bottom: 1px solid #E5EAEC;
  padding-bottom: 30px;
}
.rdd-reviews__empty-text {
  width: 100%;
  text-align: center;
}
.rdd-reviews__footer{
  width: 100%;
}

.rdd-review-info-text {
  text-align: center;
}

.rdd-rev {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.rdd-rev__author {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-size: 24px;
  line-height: 28px;
  color: #000000;
}
.rdd-rev__date-and-source {
  display: flex;
  gap: 6px;
}
.rdd-rev__date,
.rdd-rev__source{
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  line-height: 21px;
  text-transform: uppercase;
  color: #7D858C;
}
.rdd-rev__desc {
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.rdd-rev__footer {
  display: flex;
  gap: 25px;
}

.rdd-rev__footer:empty {
  display: none;
}

.rdd-rev__text {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
}

.rdd-rev__rating-stars {
  display: flex;
  gap: 10px;
}
.rdd-rev__rating-star{
  width: 18px;
  height: 17px;
  background-image: url("../img/detail/gray-star-rating.svg");
}
.rdd-rev__rating-star.rdd-rev__rating-star--solid{
  background-image: url("../img/detail/yellow-star-rating.svg");
}

.rdd-rev__btn{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 40px;
  padding: 12px;
  border: 1px solid #E5EAEC;
  border-radius: 6px;
  background-color: transparent;
  transition: 0.2s ease-in-out;
}
.rdd-rev__btn:hover{
  background-color: rgb(229 234 236);
}
.rdd-rev__btn--red {
  background-color: #B12435;
  color: #fff;
}
.rdd-rev__btn--red:hover {
  background-color: rgba(156, 46, 49, 0.7);
}
.rdd-rev__btn--short{
  max-width: 125px;
}
.rdd-rev__btn--center{
  margin: 0 auto;
}
.rdd-rev__btn.waiting-btn{
  opacity: 0.7;
  color: #fff;
}
.rdd-rev__btn--long{
  width: 100%;
  max-width: 100%;
}
.rdd-rev__btn--left {
  justify-content: flex-start;
  width: fit-content;
}

/* rdd message form */
.rdd-message {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
}
.rdd-message__author {
  font-weight: 900;
  font-size: 24px;
  line-height: 28px;
  color: #000000;
  margin-bottom: 10px;
}
.rdd-message__text {
  padding: 12px;
  height: 100px;
  width: 100%;
  border: 1px solid #E5EAEC;
  border-radius: 6px;
  font-family: 'Montserrat';
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  color: #000000;
}
.rdd-message__actions {
  display: flex;
  gap: 10px;
}
.rdd-message__rating {
  display: flex;
  gap: 15px;
}
.rdd-message__info-text {
  font-size: 12px;
}
.rdd-message__agreement {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}
.rdd-message__agreement .checkbox {
  margin-right: 10px;
}
.rdd-message__agreement-checkbox {
  -webkit-appearance: none;
  -moz-appearance:none;
  appearance: none;
}


/* rdd message form end */

.rdd-rev__comments {
  margin: 10px 0;
  padding-left: 30px;
  border-left: 2px solid #E5EAEC;
  display: flex;
  flex-direction: column;
  transition: height 0.3sease-in-out;
  overflow: hidden;
  gap: 15px;
}

.rdd-rev__comments .rdd-rev {
  gap: 5px;
}
.rdd-rev__comments span.rdd-rev__author {
  font-size: 18px;
  font-weight: 700;
}
.rdd-rev__comments p.rdd-rev__text {
  font-size: 14px;
}

.rdd-form-rating {
  position: relative;
  width: fit-content;
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
}
.rdd-form-rating__label{
  width: 24px;
  height: 24px;
  padding: 10px;
  margin: 0;
  cursor: pointer;
}
.rdd-form-rating__label{
  background-image: url(../img/detail/gray-star-rating.svg);
  background-size: 25px;
  background-repeat: no-repeat;
  transition: 0.2s ease-in;
}
.rdd-form-rating__input:checked ~ .rdd-form-rating__label{
  background-image: url(../img/detail/yellow-star-rating.svg);
}
.rdd-form-rating__label:hover{
  background-image: url(../img/detail/yellow-star-rating.svg);
}
.rdd-form-rating__label:hover ~ .rdd-form-rating__label{
  background-image: url(../img/detail/yellow-star-rating.svg);
}

.rdd-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(.8, 0, .2, 1);
  visibility: hidden;
  z-index: 100;
}

.rdd-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(.8, 0, .2, 1);
}

.rdd-popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(50vh);
  transition: transform 0.3s cubic-bezier(.8, 0, .2, 1);
}
.rdd-popup-content--review-form{
  width: 480px;
}

.rdd-popup-overlay.active .rdd-popup-content {
  transform: translateY(0);
}

.rdd-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background-image: url("../img/close-icon.svg");
  background-repeat: no-repeat;
  background-color: transparent;
  background-position: center;
  background-size: cover;
  border: none;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.rdd-popup-body {
  text-align: center;
}

.rdd-popup-header {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #E5EAEC;
  padding-bottom: 10px;
}


/* likes */
.rdd-rev__likes{
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 40px;
  border: 1px solid #E5EAEC;
  border-radius: 6px;
  padding: 1px;
  flex-shrink: 0;
}
.rdd-rev__likes-separator {
  width: 1px;
  background-color: #E5EAEC;
  height: 24px;
  margin: 0 2px;
  flex-shrink: 0;
}

.rdd-rev__like {
  border: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 6px 0;
  border-radius: 4px;
  transition: 0.2s ease-in-out;
  width: 100%;
}
.rdd-rev__like:hover{
  background-color: rgb(229 234 236);
}

.rdd-rev__like::before{
  content: "";
  display: inline-flex;
  height: 24px;
  width: 24px;
  background-image: url("../img/thumb_up.svg");
}
.rdd-rev__like.rdd-rev__like--down::before {
  transform: rotate(176deg);
}
@keyframes fadeMoveUp {
  0% {
    transform: translateY(-20px);
    opacity: 1;
  }
  100% {
    transform: translateY(-40px) scale(1.1);
    opacity: 0;
  }
}
@keyframes fadeMoveDown {
  0% {
    transform: translateY(20px);
    opacity: 1;
  }
  100% {
    transform: translateY(40px) scale(1.1);
    opacity: 0;
  }
}
.rdd-rev__like-number {
  position: absolute;
  font-size: 18px;
  font-weight: bold;
  opacity: 0;
}
.rdd-rev__like-number--like {
  color: green;
  left: 30px;
}
.rdd-rev__like-number--dislike {
  color: red;
  left: 107px;
}

/* user form */
.rdd-user-form {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  background-color: #F4F7F8;
  padding: 16px;
  border-radius: 6px;
  margin: 15px 0;
}
.rdd-user-form__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.rdd-user-form__header {
  width: 100%;
}
.rdd-user-form__label {
  font-weight: 300;
  font-size: 14px;
}
.rdd-user-form__input {
  border: 1px solid #E5EAEC;
  border-radius: 6px;
  font-family: 'Montserrat';
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  color: #000000;
  padding: 8px 12px;
  max-width: min(400px, 100%);
}

.rdd-reviews__sort {
  display: flex;
  column-gap: 20px;
}
.rdd-reviews__sort-title {
  font-weight: 600;
  font-size: 14px;
  color: #7D858C;
}
.rdd-reviews__sort-action {
  display: flex;
  align-items: center;
  column-gap: 4px;
  margin-bottom: 0;
}
.rdd-reviews__sort-text{
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-decoration-line: underline;
  color: #7D858C;
  user-select: none;
}
.rdd-reviews__sort-action::after{
  visibility: hidden;
  content: "";
  background-image: url("../img/sort-arrow-icon.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: transparent;
  width: 12px;
  height: 15px;
  transition: transform 0.2s cubic-bezier(.8, 0, .2, 1);
}
.rdd-reviews__sort-action.active::after{
  visibility: visible;
}

.rdd-reviews__sort-action.desc::after{
  transform: rotate(0);
}
.rdd-reviews__sort-action.asc::after{
  transform: rotate(-180deg);
}
.rdd-reviews__sort-action:hover .rdd-reviews__sort-text,
.rdd-reviews__sort-action.active .rdd-reviews__sort-text{
  color: #000;
}
.rdd-rev__title-comments-count{
  display: none;
}

@media (max-width: 768px){
  .rdd-rev__btn.rdd-rev__btn--more{
    font-size: 0;
    width: 50px;
    position: relative;
  }
  .rdd-rev__btn.rdd-rev__btn--more::after {
    content: "";
    display: block;
    width: 48px;
    height: 40px;
    background-image: url(../img/review-comment-more.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
  }
  .waiting-btn.rdd-rev__btn.rdd-rev__btn--more::after {
    filter: invert(1);
  }
  .rdd-rev__title-comments-count {
    display: block;
    font-size: 12px;
    line-height: 1;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    background-color: #fff;
    z-index: 2;
  }
  .waiting-btn .rdd-rev__title-comments-count{
    color: #fff;
    background-color: transparent;
  }
  .rdd-rev__comments{
    padding-left: 15px;
  }
  .rdd-rev__author{
    font-size: 18px;
  }
  .rdd-rev__text {
    font-size: 14px;
    line-height: 1.4;
  }
  .rdd-rev__btn {
    font-size: 12px;
    padding: 8px;
  }
  .rdd-rev__footer {
    gap: 12px;
  }
  .rdd-user-form__row {
    width: 100%;
  }
  .rdd-user-form__title {
    font-size: 14px;
    display: block;
    line-height: 1.4;
  }
  .rdd-rev__date, .rdd-rev__source{
    font-size: 12px;
  }
  .rdd-rev__desc {
    gap: 5px;
    flex-direction: column;
  }
  .rdd-rev__likes{
    width: 129px;
  }
}
@media (max-width: 576px) {
  .rdd-reviews__item .review-component__date {
    font-size: 12px;
    line-height: 24px;
  }
}