@import '../helpers/helpers';

.header-wrapper--old {
  .header-wrapper {
    position: fixed;
    z-index: $header;
    background: $blue-dark;
    width: 100%;
  }

  .header {
    @include make-container;
    @include make-container-max-widths;
    position: relative;
  }

  .header-inner {
    @include make-row;
    min-height: 68px;
    padding: 12px 0 10px;
    margin-left: 0;
    flex-wrap: wrap-reverse;
  }

  .header-logo {
    @include make-col-ready;
    @include make-col(6);
    position: absolute;
    top: 26px;
    left: 0;
    display: block;
  }

  .header-logo__link,
  .header-logo__link-tp,
  .header-logo_wickes {
    background: top left no-repeat;
    background-size: contain;
    display: block;
    overflow: hidden;
    text-indent: -100em;
    margin-top: -11px;
  }

  .header-logo_wickes,
  .header-logo__link {
    background-image: url('../../img/wickes-logo.svg');
    background-position-y: center;
    height: 50px;
    width: 135px;
  }

  .header-logo__link-tp {
    background-image: url('../../img/tradePro-logo_mob.png');
    background-position-y: center;
    height: 40px;
    width: 135px;
  }

  .header-top-line {
    display: none;
  }

  .header-oldtop {
    flex: 1;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    justify-content: flex-end;
    margin-right: 15px;
  }

  .header__bottom-line {
    @include make-col-ready;
    display: flex;
    justify-content: flex-end;
    padding-right: 0;
  }

  .header-search {
    position: relative;

    &__wrapper {
      position: relative;
      bottom: auto;
      display: block;
      width: 100%;
      margin-right: 12px;
      margin-left: 0;
      padding-left: 0;
      padding-right: 0;
      flex: auto;

      @include media-breakpoint-up(md) {
        flex: auto;
        margin-left: auto;
        max-width: 100%;
      }
    }
  }

  .header-search__input {
    @include inputfield;
    border-color: $white;
    padding-right: 56px;
    font-weight: 400;
  }

  .header-search__submit {
    position: absolute;
    color: $blue;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5rem;
    border: 0;
    background: none;
    transform: translateY(0);
    top: 0;
    bottom: 0;
    right: 0;
    padding-right: 16px;
    padding-left: 16px;

    &:hover {
      color: $blue-dark;
    }
  }

  .header-search__submit-label {
    position: relative;
    display: none;
    line-height: normal;
  }

  .header-search__submit-icon {
    position: relative;
    line-height: normal;
    display: block;
  }

  .header-minicart {
    text-align: right;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0;
    padding-right: 0;
    font-size: 0;
  }

  .header-minicart__switcher {
    position: relative;
    display: inline-block;

    & .btn__text {
      height: 16px;
    }

    & svg {
      width: auto;
      height: 16px;
    }
  }

  .header-shop-list .svg-inline--fa.fa-w-12.svg-inline--fa.fa-w-12 {
    height: 22px;
    width: 15px;
  }

  .header-hamburger-menu,
  .header-shop-list {
    margin: 0 0 0 12px;

    @include media-breakpoint-up(md) {
      display: inline-block;
    }
  }

  .header__bottom-line .header-shop-list {
    margin: 0 12px 0 0;
  }

  .header-minicart__btn,
  .header-hamburger-menu,
  .header-shop-list {
    padding-left: 0;
    padding-right: 0;
    width: 40px;
    height: 40px;
    border: 0; // TODO: use better solution

  }

  .header-right__link.header-minicart__btn {
    background: #0277bd;
    color: #fff;
    border-color: #0277bd;
    vertical-align: top;
  }

  .header-minicart__btn-icon {
    vertical-align: top;
  }

  .header-minicart__btn-label {
    display: none;
  }

  .header-minicart__counter {
    position: absolute;
    z-index: 1;
    top: -(26px / 2);
    left: -(26px / 2);
    right: auto;
    padding: 0 5px;
    height: 26px;
    min-width: 26px;
    border-radius: (26px / 2);
    border: 2px solid $blue-dark;
    background-color: $red;
    color: $white;
    font-size: .625rem;
    font-weight: bold;
    line-height: 24px;
    text-align: center;
  }

  .header-hamburger-menu {
    background-color: #0277bd;
    border-color: #0277bd;
    color: #fff;

    .fa-times {
      display: none;
    }

    .icon {
      width: 25px;
      margin-top: 0;
      vertical-align: top;
    }

    &_close-visible {
      background: $blue;
      color: $white;

      &,
      &:hover,
      &:focus,
      &:active {
        background: $white;
      }

      .fa-bars {
        display: none;
      }

      .icon {
        background: url('../../img/ic-menu.svg') left top no-repeat;
        vertical-align: top;
      }
    }
  }

  .btn-primary .icon {
    font-size: 1rem;
  }

  .header__top-line {
    min-height: 0;
    max-height: 60px;
    transition: max-height .5s;
    overflow: hidden;
    width: 100%;
    justify-content: flex-end;
  }

  .header-top-line-hide {
    max-height: 0;
    overflow: hidden;
  }

  .touch-device .header-minicart__btn_link {
    color: $white;
    background-color: $blue;
    border-color: $blue;
  }

  .main-nav {
    @include media-breakpoint-down(md) {
      transform: translateY(0);
      z-index: 100;
    }
    @include media-breakpoint-up(md) {
      display: none;
    }
  }

  .offer-banner {
    position: fixed;
  }

  .header-shop-list,
  .header-minicart__btn {
    background: $blue;
    color: $white;
    border-color: $blue;

    &:hover,
    &:active,
    &:focus {
      background: $blue;
      color: $white;
      border-color: $blue;
    }
  }

  .page-responsiveHomePage {
    .btn-back {
      display: none;
    }
  }
}
