.header {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--admin-bar-height, 0);
  z-index: $z-header;

  &-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.6rem;
    height: var(--header-height);
    @include media-min($xlarge) {
      padding: 0 3.2rem;
    }
  }

  &-logo {
    width: 80px;
    height: 32px;
    @include media-min($medium) {
      width: 99px;
      height: 40px;
    }
  }

  &__primary-menu {
    display: none;
    @include media-min($xlarge) {
      display: flex;
    }
    &-link {
      color: $white;
      padding: 2.2rem 1.6rem;
      @include media-min($xxlarge) {
        padding: 2.2rem 2.4rem;
      }
      cursor: pointer;
      &:hover {
        color: $white-600;
      }
    }
    // .menu-dropdown {
    //   left: 50%;
    //   transform: translateX(-50%);
    // }
  }

  &__secondary-menu {
    display: none;
    @include media-min($xlarge) {
      display: flex;
      align-items: center;
    }
    &-link {
      color: $white;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.8rem;
      cursor: pointer;
      &:hover {
        color: $white-600;
      }
    }
  }

  &__search {
    position: relative;
    width: 6.4rem;
    transition: all $transition-speed $transition-easing;
    &-icon {
      white-space: nowrap;
      opacity: 1;
      transition: all $transition-speed $transition-easing;
    }
    &-input {
      position: absolute;
      top: -6px;
      right: 0;
      width: 100%;
      visibility: hidden;
      opacity: 0;
      transition: opacity $transition-speed $transition-easing,
        width $transition-speed $transition-easing, visibility $transition-speed $transition-easing;
    }
    &.active {
      .header__search-icon {
        opacity: 0;
        visibility: hidden;
      }
      .header__search-input {
        width: 20rem;
        opacity: 1;
        visibility: visible;
      }
    }
  }

  .icons {
    font-size: 2.4rem;
    line-height: 1;
    color: inherit;
  }

  &__dropdown-menu-container {
    position: relative;
    &.language {
      padding: 2.2rem 0;
    }
    &::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      margin: 0 auto;
      width: 0;
      height: 0;
      border-width: 0 12px 12px;
      border-style: solid;
      border-color: transparent transparent #363840;
      opacity: 0;
    }
    &:hover {
      &::before {
        opacity: 1;
      }
      .menu-dropdown {
        opacity: 1;
        pointer-events: all;
      }
    }
    &.language {
      .menu-dropdown {
        left: 0;
      }
      a {
        min-width: unset;
      }
    }
  }

  &__mobile-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    @include media-min($xlarge) {
      display: none;
    }
    a {
      color: $white;
      &:hover {
        color: $white-600;
      }
    }
    &-button {
      cursor: pointer;
    }
    &-close {
      cursor: pointer;
      display: none;
    }
  }
}

body.error404 header {
  background-color: #20222b;
}
