/* Форма «Оставить отзыв» (30.10.2026) и галерея фото гостя на карточке */

.reviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  column-gap: 2.083vw;
}

.reviews__head .section-pretitle {
  flex-basis: 100%;
}

.reviews__add {
  margin-bottom: 0.556vw;
}

.review-card__gallery {
  display: block;
  text-decoration: none;
}

/* окно */
.modal-window.modal-review-form {
  align-items: flex-start;
  overflow-y: auto;
  z-index: 92000; /* выше закреплённой шапки */
}

.modal-window .inner.review-form {
  width: 45vw;
  padding: 3.472vw;
  background: #EDFBFF;
  border-radius: 12px;
  overflow: visible;
}

.review-form .section-title.review-form__title {
  padding-right: 2.778vw; /* место под крестик */
  color: #225170;
  font-size: 2.222vw;
  margin-bottom: 0.694vw;
}

.review-form__lead {
  color: #093024;
  font-size: 1.042vw;
  margin-bottom: 1.736vw;
}

.review-form__field {
  display: block;
  margin-bottom: 1.25vw;
}

.review-form__label {
  display: block;
  margin-bottom: 0.417vw;
  color: #225170;
  font-size: 0.903vw;
}

.review-form input[type="text"],
.review-form textarea {
  width: 100%;
  padding: 0.694vw 0.833vw;
  border: 1px solid rgba(34, 81, 112, 0.35);
  border-radius: 8px;
  background: #fff;
  color: #093024;
  font-family: Inter, sans-serif;
  font-size: 1.042vw;
  line-height: 1.4;
}

.review-form textarea {
  resize: vertical;
  min-height: 8.333vw;
}

.review-form input[type="text"]:focus,
.review-form textarea:focus {
  outline: none;
  border-color: #50B1D9;
  box-shadow: 0 0 0 3px rgba(80, 177, 217, 0.2);
}

.review-form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.review-form__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.556vw;
}

.review-form__thumb,
.review-form__add-photo {
  position: relative;
  width: 5.556vw;
  height: 5.556vw;
  border-radius: 8px;
  overflow: hidden;
}

.review-form__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-form__thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(9, 48, 36, 0.75);
  color: #EDFBFF;
  font-size: 16px;
  line-height: 22px;
  cursor: pointer;
}

.review-form__add-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.417vw;
  border: 1px dashed rgba(34, 81, 112, 0.5);
  color: #225170;
  font-size: 0.833vw;
  text-align: center;
  cursor: pointer;
}

.review-form__add-photo[hidden] {
  display: none;
}

.review-form__add-photo input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.review-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.556vw;
  color: #093024;
  font-size: 0.903vw;
  line-height: 1.4;
  cursor: pointer;
}

.review-form__consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  -webkit-appearance: checkbox; /* общие стили сайта прячут вид галочки (appearance: none) */
  appearance: auto;
  accent-color: #225170;
  cursor: pointer;
}

.review-form__consent a {
  color: #225170;
  text-decoration: underline;
}

.review-form__error {
  display: block;
  min-height: 1em;
  margin-top: 0.278vw;
  color: #C0392B;
  font-size: 0.833vw;
}

.review-form__error:empty {
  min-height: 0;
  margin: 0;
}

.review-form__submit {
  margin-top: 1.389vw;
}

.review-form__submit[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 1000px) {
  .modal-window .inner.review-form { width: 80vw; padding: 5vw; }
  .review-form .section-title.review-form__title { font-size: 5vw; }
  .review-form__lead, .review-form input[type="text"], .review-form textarea { font-size: 2.2vw; }
  .review-form__label, .review-form__consent, .review-form__add-photo, .review-form__error { font-size: 1.8vw; }
  .review-form__thumb, .review-form__add-photo { width: 12vw; height: 12vw; }
}

@media (max-width: 640px) {
  .reviews__head { row-gap: 4vw; }
  .reviews__add { margin-bottom: 0; }
  .modal-window .inner.review-form { width: 92vw; padding: 6vw 5vw; }
  .review-form .section-title.review-form__title { font-size: 7vw; }
  .review-form__lead, .review-form input[type="text"], .review-form textarea { font-size: 4vw; }
  .review-form__label, .review-form__consent, .review-form__add-photo, .review-form__error { font-size: 3.4vw; }
  .review-form__field { margin-bottom: 4vw; }
  .review-form__thumb, .review-form__add-photo { width: 20vw; height: 20vw; }
  .review-form textarea { min-height: 30vw; }
}

/* галерея фото (Fancybox) — выше закреплённой шапки (91000), иначе шапка закрывает верх фото */
html body .fancybox__container {
  z-index: 92000;
}

/* общие стили сайта задают тексту line-height: 100% — в форме строки переносятся, нужен нормальный интервал */
.review-form__lead,
.review-form__label,
.review-form__add-photo span,
.review-form__error,
.review-form__consent span {
  line-height: 1.35;
}

@media (max-width: 640px) {
  .review-form__label { margin-bottom: 1.5vw; }
  .review-form__lead { margin-bottom: 5vw; }
  .review-form .section-title.review-form__title { padding-right: 10vw; }
}
