/*------------------------------------------------------------
HEADER
====================================*/

/* Variables Custom */
$header-top-height: 3.8rem;
$header-top-font-size: 1.3rem;

$header-height-mobile: 5rem;
$header-height-desktop: 10rem;

$header-bg: $white;
$header-box-shadow-mobile: 0px 3px 6px rgba($black, 0.3);
$header-box-shadow-desktop: none;

$header-link-font-size: 1.2rem;
$header-link-font-weight: $font-weight-normal;

$cart-bullet-width: 1.56rem;
$cart-bullet-height: 1.56rem;
$cart-bullet-font-size: 1rem;
$cart-bullet-font-weight: $font-weight-bold;
$cart-bullet-color: $white;
$cart-bullet-bg: $primary;

$header-simple-height-desktop: 8rem;
$simple-header-color: $black;
$simple-header-phone-number-color: $primary;

/***************************************/

.header-desktop {
  display: none;
}

.header-container {
  position: relative;
  z-index: 11;
  background: $header-bg;
}

// Structure
.header-content {
  & > .container > .row {
    display: flex;
    height: $header-height-mobile;
  }
}

// Logo
.header-logo-wrapper {
  align-self: center;
}

// Links
.header-links-wrapper {
  display: flex;
  align-self: center;
}

.header-link {
  align-self: center;
  text-align: center;
  text-decoration: none;
  font-size: $header-link-font-size;
  font-weight: $header-link-font-weight;

  svg {
    width: auto;
    height: 26px;
  }
}

.icon-cart-wrapper {
  display: inline-block;
  position: relative;

  .bullet {
    position: absolute;
    right: -6px;
    top: -3px;
    width: $cart-bullet-width;
    height: $cart-bullet-height;
    font-weight: $cart-bullet-font-weight;
    font-size: $cart-bullet-font-size;
    color: $cart-bullet-color;
    background: $cart-bullet-bg;
    border-radius: 100%;
  }
}

// header simple
.simple-header-container {

  .header-contact-wrapper {
    align-self: center;
  }

  .contact-block {
    margin: 0;
    line-height: 1.4;
    font-size: 12px;
  }

  .number-phone {
    font-weight: $font-weight-bold;
    color: $simple-header-phone-number-color;
    font-size: 14px;
  }
}

// Recherche
.autocomplete-results {
  padding: 2rem 1.5rem 0;
  margin-top: 0;
  border-top: 0;
}

/* RESPONSIVE */
/***************************************/
@include media-breakpoint-down(md) {
  .header-container {
    margin-bottom: 20px;
  }
  .header-content {
    box-shadow: $header-box-shadow-mobile;
  }

  // Logo
  .header-logo img {
    width: auto;
    height: $header-height-mobile;
  }

  // Links
  .header-links-wrapper {
    padding-left: 0;
  }
  .header-link {
    width: 50px;
  }

  // Recherche mobile
  .header-search-wrapper {
    position: absolute;
    z-index: -1;
    padding: 0;
    top: 0;
    left: 0;
    right: 0;
    transition: 0.3s;

    &:before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      z-index: 4;
      height: $header-height-mobile;
      background: $header-bg;
    }

    &.active {
      padding-top: $header-height-mobile;
    }
  }

  // header simple
  .header-contact-wrapper {
    padding-left: 0;
  }
}

@include media-breakpoint-up(lg) {
  .header-desktop {
    display: block;
  }
  .header-mobile {
    display: none;
  }

  // Structure
  .header-content {
    & > .container > .row {
      align-items: center;
      height: $header-height-desktop;
    }
  }

  // Top bar
  .header-top {
    display: block;
    font-size: $header-top-font-size;
    color: $white;
    background: $dark;

    & > .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: $header-top-height;
    }

    p {
      margin: 0;
    }

    ul {
      display: flex;
      list-style: none;
      margin: 0;
    }

    li {
      & + li {
        &:before {
          content: '|';
          margin: 0px 8px;
        }
      }
    }

    a {
      font-weight: $font-weight-normal;
      text-decoration: none;
      color: $white;

      &:hover {
        text-decoration: underline;
      }
    }
  }

  // Links
  .header-links-wrapper {
    justify-content: flex-end;
  }
  .header-link {
    position: relative;
    color: $dark;

    & + .header-link {
      margin-left: 35px;
    }
  }
  .header-link-text {
    height: 16px;
    margin-top: 7px;
    text-align: center;
    line-height: 1.1;
  }

  // header simple
  .header-account-wrapper {
    font-size: 13px;
    font-weight: $font-weight-bold;
    color: $simple-header-color;
    text-decoration: underline;
    display: block;
  }

  // header simple
  .simple-header-container {
    margin-bottom: 50px;
    border-bottom: 1px solid $gray-200;
    .header-content {
      & > .container > .row {
        height: $header-simple-height-desktop;
      }
    }
    .contact-block {
      font-size: 16px;
    }

    .number-phone {
      font-size: 18px;
      font-weight: $font-weight-bold;
      color: $simple-header-phone-number-color;
    }
  }
}
