/* stylelint-disable */
@import "../../settings/includes/colors";

.c-header {
  width: 100%;
  height: 32px;
  background-color: $White;

  &--main {
    height: 56px;

    @media (min-width: 1000px) {
      height: 80px;
    }

    @media (min-width: 641px) {
      height: 64px;
    }

    background-color: $Pacific;
  }

  &--tertiary {
    display: none;

    @media (min-width: 1000px) {
      display: block;
    }
  }

  &__container {
    max-width: 1140px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;

    @media (min-width: 1000px) {
      justify-content: space-between;
    }

    height: 100%;
  }

  &__logo {
    width: 120px;
    height: 31px;
    vertical-align: middle;

    @media (min-width: 641px) {
      width: 152px;
      height: 39px;
    }

    @media (min-width: 1000px) {
      width: 168px;
      height: 43px;
    }

    a {
      width: 100%;
      height: 100%;
      display: block;
    }
  }

  &__primary,
  &__secondary,
  &__tertiary {
    display: flex;
    align-items: center;

    &-links {
      display: none;

      @media (min-width: 1000px) {
        display: flex;
      }

      align-items: center;
      list-style: none;
    }

    &-link {
      display: inline-block;
      margin: 0 16px;
      line-height: 1.29rem;
    }
  }

  &__primary,
  &__secondary {
    &-link {
      a {
        color: $White;
        font-size: 1rem;
      }
    }

    &-links {
      padding: 0 16px;
    }
  }

  &__tertiary {
    &-link {
      display: flex;
      align-items: center;
      height: 32px;

      &:first-of-type {
        margin-left: 0;
      }

      a {
        color: $Pacific;
        font-weight: bold;
        font-size: 0.875rem;
      }

      &-active {
        border-bottom: 2px solid $Pacific;
        display: flex;
        align-items: center;
        height: 32px;

        a {
          margin-bottom: -2px;
          color: $Fiord;
          font-weight: bold;
          font-size: 0.875rem;
        }
      }
    }
  }

  &__primary {
    &-link {
      a {
        text-transform: uppercase;
        font-weight: 900;
      }
    }
  }

  &__secondary {
    &-link {
      line-height: 1.25rem;
    }
  }

  &__mobileicon {
    display: flex;

    @media (min-width: 1000px) {
      display: none;
    }

    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
  }

  &__hamburger,
  &__close {
    width: 24px;
    height: 18px;

    @media (min-width: 641px) {
      width: 32px;
      height: 24px;
    }

    @media (min-width: 1000px) {
      display: none;
    }

    position: absolute;
    right: 8px;
    cursor: pointer;
  }
}

.c-mobile-menu {
  @media (min-width: 1000px) {
    display: none;
  }

  max-width: 320px;
  width: 100%;
  height: 100%;
  background-color: $Fiord;
  position: absolute;
  z-index: 100;
  top: 0;
  right: -320px;

  &__account-links {
    height: 56px;

    @media (min-width: 641px) {
      height: 64px;
    }

    background-color: map-get($FiordPalette, 70);
  }

  &__primary,
  &__secondary,
  &__account {
    &-link {
      display: block;
      width: 100%;

      a {
        color: $White;
        font-size: 1rem;
        line-height: 2.5rem;
        width: 100%;
        border-left-style: solid;
        border-left-width: 2px;
        border-left-color: transparent;
      }
    }
  }

  &__primary,
  &__secondary {
    &-link {
      a {
        display: block;
        padding: 0 16px;

        &:hover {
          border-left-color: map-get($PacificPalette, 40);
        }
      }

      &.is-active {
        a {
          border-left-color: $Pacific;
        }
      }
    }
  }

  &__account {
    &-links {
      display: flex;
      align-items: center;
    }

    &-link,
    &-loggedin {
      color: $White;
    }

    &-link {
      a {
        font-weight: bold;
        padding: 0 8px;

        &:first-of-type {
          padding-left: 16px;
        }
      }
    }

    &-loggedin {
      font-weight: bold;
      padding: 0 16px;
    }
  }

  &__primary {
    &-link {
      &--basket {
        border-bottom: 2px solid map-get($FiordPalette, 70);
        color: $White;
        padding: 16px;
        display: flex;
        align-items: center;

        span {
          margin-right: 8px;
          line-height: 1.29rem;
        }

        + .c-mobile-menu__primary-link {
          margin-top: 16px;
        }
      }

      a {
        text-transform: uppercase;
        font-weight: 900;
      }

      &:not(.c-mobile-menu__primary-link--basket) {
        &:first-of-type {
          margin-top: 16px;
        }
      }
    }
  }

  &__secondary {
    &-link {
      &--signout {
        padding: 0 16px;

        span {
          display: flex;
          align-items: center;
          cursor: pointer;
        }
      }
    }
  }

  &__primary-links,
  &__secondary-links {
    background-color: $Fiord;
  }
}

@media (max-width: 999px) {
  body.mobileNav-isactive {
    margin-left: -320px;
    position: absolute;
    width: 100%;
  }
}
