// Default ajax search form

@searchFormTop: 115px;
@searchFormWidth: 800px;
@searchFormPaddingHorizontal: 80px;
@searchFormPaddingVertical: 40px;

@searchResultTop: @searchFormTop + (@searchFormPaddingVertical * 2) + 53px;

.shop--navigation .entry--search {
  &.is--active {
    .main-search--form {
      display: block;

    }

  }

  .btn.is--active {
    background: initial;
    //color: inherit;
    border-color: transparent;
  }

  .main-search--form {
    background-color: inherit;
    @media (min-width: @phoneLandscapeViewportWidth) {
      display: none;

      position: fixed;
      text-align: center;
      top: @searchFormTop;
      width: 100%;
      max-width: 100%;
      @media (min-width: @searchFormWidth) {
        width: @searchFormWidth;
        left: 50%;
        margin-left: -(@searchFormWidth/2);
      }
      .unitize-padding(unit(@searchFormPaddingVertical), unit(@searchFormPaddingHorizontal));
      background: @gray-light;
      transition: all .2s ease;

      .box-shadow(0 10px 50px -15px rgba(0, 0, 0, .5));
      &:hover {
        .main-search--field {
          border-bottom: 1px solid @gray-dark;
          width: 100%;
          &::placeholder {
            color: inherit;
          }
        }
      }

    }
    .main-search--field {
      @media (min-width: @phoneLandscapeViewportWidth) {
        border: 0 none;
        box-shadow: none;
        border-bottom: 1px solid @gray;
        font-size: 1.5em;
        line-height: 2.5em;
        height: inherit;
        margin: 0 auto;
        padding: 0em 3em 0 1em;
        .border-radius(0);
      }
    }

    .main-search--button {
      @media (min-width: @phoneLandscapeViewportWidth) {
        top: 50%;
        transform: translateY(-50%);
        right: @searchFormPaddingHorizontal;
      }
    }
    .form--ajax-loader {
      @media (min-width: @phoneLandscapeViewportWidth) {
        top: 50%;
        transform: translateY(-10px);
        left: (@searchFormPaddingHorizontal - 30);
      }
    }

  }

  .main-search--results {
    @media (min-width: @phoneLandscapeViewportWidth) {
      width: 100%;
      margin: 0;
      max-width: 100%;
      .box-shadow(0 10px 50px -15px rgba(0, 0, 0, .5));
      @media (min-width: @searchFormWidth) {
        width: @searchFormWidth;

        left: 50%;
        margin-left: -(@searchFormWidth/2);
      }
      top: @searchResultTop;
      position: fixed;
      .results--list {
        .unitize-padding(unit(@searchFormPaddingVertical), unit(@searchFormPaddingHorizontal));
        border-left: 0 none;
        border-right: 0 none;
        border-bottom: 0 none;
        border-radius: 0;
      }

      .is--active {

      }
    }
  }
}

.main-search--overlay {
  display: none;
  &.is--overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: @zindex-header-search-form - 2;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
  }
}
