.form {
  @extend %reset;

  &__wrapper {
    display: flex;
    flex-direction: column;
    gap: 20rem;
  }

  &__label {
    @extend %reset;
    margin-bottom: 15px * 0.5;
    display: flex;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  &__input {
    width: 100%;
    border: 1.5px solid var(--tide-booking-gray--medium-light);
    background-color: var(--tide-booking-gray-xlight);
    box-sizing: border-box;
    @extend %transition-easing;
  }

  &__group {
    @extend %reset;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;

    &-input {
      position: relative;
      width: 100%;
    }

    &--icon {
      &:focus,
      &:focus-within,
      &:active {
        .icon {
          svg {
            fill: var(--tide-booking-color-secondary);
          }
        }
      }

      .form {
        &__label {
          position: absolute;
          top: 3px;
          left: 47.5px;
          font-size: 14px;
          pointer-events: none;
          color: var(--tide-booking-datepicker-input-label-color);

          @include media-sm {
            left: 17.5px;
          }

          @include media-lg {
            font-size: 16px;
          }

          @include media-xl {
            left: 47.5px;
          }
        }

        &__input {
          @include input;
          padding-left: 20px;
          padding-top: 16px;

          @include media-sm {
            padding-left: 20px;
          }

          @include media-md {
            padding-left: 20px;
          }

          @include media-xl {
            font-size: 15.5px;
          }
        }

        .typeahead {
          &__trigger {
            height: 4.5rem;
            max-height: 4.5rem;
            padding-left: 4rem;
            font-size: 1.6rem;
            background-color: var(--tide-booking-white);

            @include media-sm {
              padding-left: 1rem;
            }

            @include media-md {
              padding-left: 4rem;
            }
          }
        }
      }
    }


    &--datepicker {
      .form__group-input {
        width: 50%;
      }
    }

    &--submit {
      .cta {
        width: 100%;
        justify-content: center;
      }
    }

    &--success-message {
      &:before {
        content: "";
        width: 15px * 3.33;
        height: 15px * 1.33;
        border-left: 0.25rem solid var(--tide-booking-black);
        border-bottom: 0.25rem solid var(--tide-booking-black);
        margin: 0 auto 15px * 3 auto;
        transform: rotate(-45deg);
      }
    }
  }

  &__region {
    @extend %reset;

    & + .form__region {
      margin-top: 15px * 4;
    }

    &-header {
      margin-bottom: 15px * 0.3;
      display: flex;
      flex-flow: row wrap;
    }

    &-heading {
      @include media-xs {
        padding-right: 15px * 2;
      }
    }

    &-label {
      width: 100%;
      margin-top: -15px * 0.5;
      font-style: italic;
      order: 2;

      @include media-xs {
        width: auto;
        margin-top: 0;
        // @include marginLeft(15px * 0.2);
        order: initial;
      }
    }

    &--errors {
      padding-left: 0 !important;
      border: none !important;
      color: var(--tide-booking-invalid);
    }
  }

  &__room {
    display: grid;
    grid-template-rows: repeat(1, 1fr);
    gap: 15px;
    padding: 20px;
    background: var(--tide-booking-room-options-card-background);
    border: var(--tide-booking-room-options-card-border);
    border-radius: var(--tide-booking-room-options-card-border-radius);

    @include media-md {
      gap: 25px;
      grid-template-columns: 75% 20%;
      justify-content: space-between;
    }

    &__header{
      @include h3;
      color: #666;
    }

    &__wrapper {
      display: grid;
      grid-template-columns: repeat(1, 1fr);
      grid-template-rows: repeat(1, 1fr);
      gap: 15px;

      @include media-sm {
        gap: 25px;
        grid-template-columns: 230px 1fr;
      }
    }

    &__image{
      width: 100%;
      height: 230px;
      object-fit: cover; 
      overflow: hidden;
      border-radius: var(--tide-booking-room-options-image-border-radius);
      position: relative;
    }

    &__img{
      width: 100%;
      height: 100%;
      object-fit: cover; 
      object-position: center;
    }

    &__favorite {
      position: absolute;
      top: 10px;
      left: 10px;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: white;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      color: #26b489;
      font-size: 20px;
    }

    &__footer {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: flex-end;
      gap: 10px;

      @include media-xs {
        flex-direction: row;
      }

      @include media-md {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
      }

      p {
        margin-bottom: 0;
        font-size: 14px;

        @include media-md {
          font-size: 16px;
          text-align: right;
        }
      }

      &__top {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        width: 100%;

        @include media-md {
          align-items: flex-end;
        }
      }

      &__bottom {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        width: 100%;
        max-width: 230px;

        @include media-md {
          align-items: flex-end;
        }
      }

      .cta {
        width: 100%;
        max-width: 230px;
        justify-content: center;
      }
    }

    &__title {
      font-family: var(--tide-booking-room-options-title-font-family);
      font-weight: var(--tide-booking-room-options-title-font-weight);
      color: var(--tide-booking-room-options-title-color);
      margin-bottom: 5px;
    }


    &__text{
      font-size: 14px;
      line-height: 18px;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical; 
    }

    &__days{
      font-size: 14px;
      @include media-md {
        font-size: 16px;
        text-align: right;
      }
    }

    &__usps{
      display: flex; 
      flex-direction: row;
      justify-content: flex-start;
      flex-wrap: wrap;
      gap: 10px;
      row-gap: 0rem;
      margin: 0;
    }

    &__select {
      display: grid;
      grid-template-rows: repeat(1, 1fr);
      gap: 10px;
      margin-top: 15px;

      @include media-md {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
      }
    }

    &__price {
      font-size: 16px;
      font-weight: 400;
      color: #0a0a0a;

      span{        
        font-size: 20px;
        font-weight: bold;
      }

      &--increase {
        color: var(--tide-booking-price-increase);
      }

      &--decrease {
        color: var(--tide-booking-price-decrease);
      }
    }

    &__alternatives{
      &__header{
        margin: 30px 0rem 10px 0rem;
        font-size: 16px;
      }

      &__btn{
        margin-bottom: 5px;
        outline: none;
        border: none;
        background: transparent;
        text-align: right;
        color: #667eff;
        text-decoration: underline;
        transition: color 0.3s ease, text-decoration 0.3s ease;

        &:hover{
          text-decoration: none;
          color: #667effcc;
        }
      }
    }

  }

}


