.header-nav {
  position: sticky;
  z-index: 4;
  top: 0;
  background-color: rgba(255, 255, 255, .7);
  backdrop-filter: blur(.5rem);
  border-bottom: 1px solid #DBDBDB;

  &--dark {
    background-color: rgba(4, 17, 32, .7);
    border-bottom: 1px solid #20344C;
  }
}

//@media (max-width: 759px) {
//  .header-nav .container {
//    max-width: none;
//  }
//}

@media (max-width: 759px) {
  .header-bar__old-version {
    text-align: left;

    span {
      display: block;
      margin-bottom: .5rem;
      margin-right: 0;
    }
  }
}

.header-nav__toggle-checkbox {
  visibility: hidden;
  position: absolute;
  top: -1000rem;
}

.header-nav__lists-wrapper {
  padding: 0;
  display: flex !important;
  justify-content: space-between;
  flex-grow: 1;
  position: static;
  margin-left: -.625rem;
  box-shadow: none;
  background-color: transparent;
  align-items: center;
}

.header-nav__toggle-button {
  background: #333;
  display: block;
  height: 1px;
  width: 1rem;
  position: relative;
  cursor: pointer;
  margin-bottom: 0;
}
.header-nav__toggle-button span {
  padding: 1rem 0;
  width: 100%;
  display: block;
  position: absolute;
  top: -1rem;
  left: 0;
  height: 1px;
}
.header-nav__toggle-button:before {
  top: .25rem;
}
.header-nav__toggle-button:after {
  top: -.25rem;
}
.header-nav__toggle-button:before,
.header-nav__toggle-button:after {
  background: #333;
  display: block;
  width: 100%;
  height: 100%;
  content: "";
  position: absolute;
  transition: all 0.2s ease-out;
}

.header-nav__wrapper {
  min-height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-nav__list {
  margin: 0;
  padding: 0;
}

.header-nav__item {
  margin: 0;
  padding: 0;
  display: block;

  &--github {
    display: none;
    @media (min-width: 400px) {
      display: block;
      margin-left: 1rem;
    }
  }
}

.header-nav__link {
  display: inline-block;
  padding: .625rem;
  text-decoration: none;
  font-size: 1.25rem;
  color: #717171 !important;
  position: relative;
  font-weight: 600;

  border-bottom: none !important;

  .header-nav--dark & {
    color: #ced1de !important;
    opacity: .7;
  }
}
.header-nav__link:before {
  opacity: 0;
  content: '';
  position: absolute;
  background-color: #C9D7CE55;
  left: .375rem;
  top: .625rem;
  right: .375rem;
  bottom: .625rem;
  border-radius: .1875rem;
  transition: opacity .15s;
  /*border: 1px solid rgba(0, 0, 0, 1.0);*/
}
.header-nav__link--active {
  color:  black !important;
  //text-decoration: underline;
  //text-decoration-color: rgba(0, 0, 0, .5);
  //text-decoration-thickness: 1px;
  .header-nav--dark & {
    color: #ced1de !important;
    opacity: 1;
  }
}
.header-nav__link--active:before {
  opacity: 1;

  .header-nav--dark & {
    background-color: #06490c;
  }
}

.header-nav__link:not(.header-nav__link--active):hover {
  color:  black !important;

  .header-nav--dark & {
    color: #ced1de !important;
    opacity: 1;
  }
}
.header-nav__link:not(.header-nav__link--active):hover:before {
  //opacity: .4;
}

.header-nav__link span {
  position: relative;
}

@media (min-width: 480px) {
  .header-nav__item {
    margin-right: .625rem;
  }

  .header-nav__item:last-child {
    margin-right: 0;
  }
}

@media (min-width: 200px) {

  .header-nav__list {
    display: flex;
    align-items: center;
  }



  .header-nav__link {
    font-size: .875rem;
  }
}

.header-nav__version {
  position: relative;

  &[open] summary {
    color: black;
  }

  summary {
    border-radius: 1000rem;
    background-color: #C9D7CE88;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: .75rem;
    padding: .2rem .75rem;
    color: #717171;
    cursor: pointer;

    &:hover {
      color: black;
    }

    &:after {
      content: '';
      display: block;
      background-image: url("data:image/svg+xml,%3Csvg width='9' height='5' viewBox='0 0 9 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0.500183L4.53867 3.57403L0.99997 0.50003' stroke='%23686868'/%3E%3C/svg%3E%0A");
      background-position: center;
      background-repeat: no-repeat;
      background-size: contain;
      width: .6rem;
      height: .5rem;
      margin-left: .3rem;
    }

    &::marker,
    &::-webkit-details-marker {
      display: none;
      appearance: none;
    }

  }

  > div {
    position: absolute;
    padding: .625rem 0;
    border: 1px solid #EBEBEB;
    border-radius: .5rem;
    box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.06);
    background: white;
    width: 6.25rem;
    right: 0;
    margin-top: .25rem;

    > * {
      display: flex;
      font-size: .875rem;
      font-weight: 700;
      padding: .25rem 1rem;
      color: #717171;
      text-decoration: none;
      justify-content: space-between;
      align-items: center;
    }

    a:hover {
      background-color: #eff6ef;
      color: black;
    }

    span {
      color: #0A7307;

      &:after {
        content: '';
        background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.7633 0.434662L4.55618 8.88445L1.02463 5.30399' stroke='%230A7307'/%3E%3C/svg%3E%0A");
        background-size: contain;
        width: .75rem;
        height: .75rem;
        background-position: center;
        background-repeat: no-repeat;
      }
    }
  }

  .header-nav--dark & {
    summary {
      color: #ced1de;
      opacity: .7;
      background: transparent;
      border: 1px solid #ced1de;

      &:hover {
        opacity: 1;
      }

      &:after {
        filter: invert(1);
      }
    }

    &[open] summary {
      opacity: 1;
    }
  }
}

.header-nav__github {
  display: block;
  opacity: .6;
  transition: opacity .15s;

  &:hover {
    opacity: .8;
  }

  svg {
    width: 1.4rem;
    height: auto;
    display: block;
  }

  .header-nav--dark & {
    filter: invert(1);
  }
}