@import '../global/variables';
@import '../global/mixins';
@import '../components/search-title';
@import '../sections/hotels';
@import '../sections/destinations-types';
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
input:focus,
input:active {
  outline: none;
  box-shadow: none;
}
body {
  background: $white;
  filter: none !important;
  backdrop-filter: none !important;
}
.page-template-hotels {
  .hotels-search-page {
    .search_title {
      padding: 50px 0;
      @media screen and (max-width: $tablets-big) {
        padding: 20px 0 50px;
        .container {
          padding-bottom: 44px;
        }
      }
      h1 {
        margin: 0;
        width: 75%;
        @media screen and (max-width: $tablets-big) {
          width: 100%;
        }
      }
    }
    .title {
      text-align: center;
      @media screen and (max-width: $tablets-big) {
        margin-top: 25px;
      }
    }
    .main_form {
      @media screen and (min-width: $tablets-big) {
       z-index: 9;
      }
    }
    .form-wrapper {
      padding: 50px 0;
      display: flex;
      flex-direction: column;
      gap: 20px;
      &.hp_bg {
        background: $bg-light-gray;
      }
      @media screen and (max-width: $tablets-big) {
        padding: 40px 15px;
      }
      @media screen and (max-width: $phones-big) {
        padding: 20px 15px 40px 15px;
        gap: 15px;
      }
      .btn_box {
        display: flex;
        align-items: center;
        gap: 15px;
        @media screen and (max-width: $tablets-big) {
          & > * {
            width: calc(33.33% - 7px)!important;
            flex-shrink: 0;
            min-width: 0;
          }
        }
        @media screen and (max-width: $phones) {
          gap: 11px;
        }
      }
      @media screen and (max-width: $tablets-big) {
        .filters {
          width: auto;
          max-width: 100%;
          margin: 0;
          flex-shrink: 0;
          .trigger_button {
            padding: 5px 16px;
            width: 100%;
            justify-content: center;
          }
          .has_content {
            width: 100%;
            .content_box {
              left: 50%;
              transform: translateX(-50%);
            }
          }
        }
      }
      @media screen and (max-width: $phones) {
        .trigger_button {
          padding: 5px 12px;
        }
      }
      .map-action,
      .filters-action {
        z-index: 1;
        width: 100%;
        display: none;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: transparent;
        font: normal 400 16px / 1em $font-almoni;
        color: $dark-blue;
        border-radius: 5px;
        border: 1px solid $light-blue;
        padding: 8px 16px;
        max-width: 1000px;
        margin: 0 auto;
        @media screen and (max-width: $tablets-big) {
          display: flex;
        }
        @media screen and (max-width: $phones) {
          padding: 8px 12px;
        }
      }
      .main_form {
        @media screen and (max-width: $tablets-big) {
          &:not(.hp_hotels_form) {
            position: static;
            top: 0;
            box-shadow: none;
            z-index: auto;
            .mob_form {
              display: flex;
              align-items: center;
              justify-content: space-between;
              border-radius: 12px;
              background: $bg-light-gray;
              padding: 16px 35px 20px 16px;
              .button-submit {
                font-size: 0;
                background: 0 0;
                padding: 0;
                margin: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                width: 35px;
                height: 35px;
                gap: 0;
                border: none;
                flex-shrink: 0;
                &:before {
                  font-size: 24px;
                  line-height: 24px;
                  content: "\f044";
                  font-family: $font-awesome;
                  display: block;
                  color: $bg-dark-blue;
                }
              }
            }
          }
        }
        &:not(.hp_hotels_form) {
          .mob_form {
            .top {
              padding: 0;
            }
            .mob-item {
              font-size: 16px;
              margin: 0;
              padding: 0;
              background: none;
              &.mob-guests-block, &.mob-hotel-date-range {
                .text {
                  color: $dark-gray;
                }
              }
            }
          }
        }
        .guests-block {
          position: relative;
          .wrap {
            width: 400px;
            left: inherit;
            right: 0;
            transform: none;
            top: calc(100% + 10px);
            padding: 4px 0;
            @media screen and (max-width: $tablets-big) {
              top: 0;
              width: 100%;
            }
            .row {
              padding: 28px 40px;
              display: flex;
              align-items: center;
              justify-content: space-between;
              &:not(:last-child) {
                border-bottom: 1px solid #BBB9C6;
              }
              .input-group {
                button {
                  width: 24px;
                  height: 24px;
                  border-radius: 50%;
                  border: 2px solid #9BA6BF;
                  color: #9BA6BF;
                  background: none;
                  display: inline-flex;
                  align-items: center;
                  justify-content: center;
                  font-size: 22px;
                  font-weight: 700;
                }
                input {
                  margin: 0 8px;
                  width: 36px;
                  font-size: 22px;
                  text-align: center;
                  border: none;
                  &::-webkit-outer-spin-button,
                  &::-webkit-inner-spin-button {
                    -webkit-appearance: none;
                  }
                }
              }
            }
          }
        }
        .hotel-date-range {
          .tabs_content > div {
            min-height: 400px;
          }
          .date-picker-wrapper .month-wrapper .day {
            height: 35px;
            display: flex;
            justify-content: center;
            align-items: center;
          }
        }
      }
    }
    .container {
      z-index: 2;
      max-width: 1615px;
      padding-bottom: 60px;
      .wrapper {
        display: flex;
        gap: 70px;
        @media screen and (max-width: $full-hd) {
          gap: 30px;
        }
        @media screen and (max-width: 1050px) {
          gap: 20px;
        }
        .hotels-list {
          width: 75%;
          display: flex;
          flex-direction: column;
          gap: 30px;
          @media screen and (max-width: $full-hd) {
            width: calc(100% - 300px);
          }
          @media screen and (max-width: 1050px) {
            width: calc(100% - 250px);
            gap: 20px;
          }
          @media screen and (max-width: $tablets-big) {
            width: 100%;
          }
          .load_more {
            margin: 0;
          }
          .custom-dropdown {
            margin-top: 100px;
            @media screen and (max-width: $tablets-big) {
              margin-top: 90px;
            }
          }
        }
        .sidebar {
          width: 25%;
          background: $white;
          border-radius: 10px;
          height: fit-content;
          @media screen and (max-width: $full-hd) {
            width: 270px;
          }
          @media screen and (max-width: 1050px) {
            width: 220px;
          }
          @media screen and (max-width: $tablets-big) {
            display: none;
          }
        }
      }
    }
  }
  .no-results-message {
    padding: 100px 0 0 0;
    & > * {
      display: inline-block;
      margin-bottom: 10px;
    }
    .reset-filter {
      color: $blue;
      margin-right: 5px;
      cursor: pointer;
    }
  }
  .destinations_types {
    padding: 0;
    .flex {
      display: flex;
      justify-content: center;
      gap: 24px;
      row-gap: 24px;
      flex-wrap: wrap;
    }
    .additional_info {
      max-width: 1120px;
      margin: 50px auto 0;
      line-height: 1.5;
      a {
        text-decoration: underline;
      }
    }
  }
}
.map_box {
  pointer-events: none;
  margin-bottom: 20px;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  @media screen and (max-width: $tablets-big) {
    height: 100dvh;
    position: relative;
    z-index: 1;
  }
  .wr {
    height: 410px;
    width: 100%;
    display: flex;
    @media screen and (max-width: $tablets-big) {
      height: calc(100dvh + 20px);
    }
  }
  iframe {
    pointer-events: auto;
    flex: 1;
    width: 100%;
    border: 0;
    @media screen and (max-width: $tablets-big) {
      position: relative;
      z-index: 1;
    }
  }
}
.close {
  cursor: pointer;
  display: none;
  width: 24px;
  height: 24px;
  background-color: $black;
  margin-right: 20px;
  @include mask('../img/close.svg', contain, center, no-repeat);
}
.hotels-filters {
  border: 1px solid $divider2;
  border-radius: 10px;
  .filter-item {
    padding: 20px 40px;
    &:not(:last-child) {
      border-bottom: 1px solid #BBB9C6;
    }
    &.range_rating {
      padding-bottom: 32px;
    }
    @media screen and (max-width: $full-hd) and (min-width: $tablets-big) {
      padding: 20px;
    }
    @media screen and (max-width: 1050px) and (min-width: $tablets-big) {
      padding: 20px 15px;
    }
    .filter-title {
      font-size: 22px;
      margin-bottom: 20px;
      color: $extra-dark-gray;
    }
    .checkbox {
      display: block;
      font-size: 22px;
      position: relative;
      & + .checkbox {
        margin-top: 24px;
      }
      span {
        padding: 0 40px !important;
        position: relative;
        &:before {
          content: "";
          width: 20px;
          height: 20px;
          border-radius: 4px;
          border: 1px solid $dark-blue;
          background: transparent;
          position: absolute;
          top: 3px;
          right: 0;
        }
        &:after {
          content: "\f00c";
          font-family: "Font Awesome 6 Pro", sans-serif;
          font-size: 14px;
          position: absolute;
          right: 4px !important;
          top: 6px;
          color: $blue;
          opacity: 0;
          transition: opacity 0.2s ease-in-out;
        }
      }
      input[type=radio] + span:before {
        border-radius: 50%;
      }
      input:checked + span {
        &:before {
          background: $white;
          border-color: $blue;
        }
        &:after {
          opacity: 1;
        }
      }
      i {
        font-size: 16px;
        color: #FFA239;
      }
    }
    .range-container {
      .range-values {
        font-size: 28px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
      }
      .range-slider {
        position: relative;
        width: 100%;
        height: 5px;
        .track {
          position: absolute;
          width: 100%;
          height: 5px;
          background: $divider;
          border-radius: 3px;
        }
        .range {
          position: absolute;
          height: 100%;
          background: $blue;
          border-radius: 3px;
          left: 0;
          right: 0;
        }
        input[type=range] {
          position: absolute;
          width: 100%;
          top: -9px;
          height: 24px;
          background: none;
          pointer-events: none;
          -webkit-appearance: none;
          &::-webkit-slider-thumb {
            pointer-events: all;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: $blue;
            cursor: pointer;
            -webkit-appearance: none;
          }
        }
      }
    }
  }
  .btn_box {
    padding: 12px 55px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-top: 1px solid $light-blue;
    .button-filter {
      width: 100%;
      padding: 12px;
      font: normal 400 16px / 1em $font-almoni;
      border-radius: 4px;
      border: none;
      outline: none;
      &.start-filter {
        background: $blue;
        color: $white;
      }
      &.reset-filter {
        background: $white;
        color: $extra-dark-gray;
      }
    }
  }
}
.map-popup,
.hotel-filter-popup {
  opacity: 0;
  visibility: hidden;
  z-index: -1;
  display: flex;
  background: $white;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 10px 10px 0 0;
  border: 1px solid $divider2;
  padding-top: 16px;
  box-shadow: 5px 8px 38px 0 rgba(219, 229, 239, 0.75);
  &.open {
    opacity: 1;
    visibility: visible;
    z-index: 200;
  }
  .hotels-filters {
    width: 100%;
    border: none;
  }
  .filters-wrapper {
    height: calc(100% - 88px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .close, .btn_box {
    display: flex;
  }
}
.map-popup {
  padding: 0;
  display: block;
  .overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 24px;
    height: 24px;
  }
  .close {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    z-index: 2;
    pointer-events: auto;
  }
}
