.nav-container {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: 100%;
  font-size: calc(17 / var(--rem-base) * 1rem);
  z-index: var(--z-index-nav);
  visibility: hidden;
  background-color: var(--color-bone);
}

@media screen and (min-width: 769px) {
  .nav-container {
    width: var(--nav-width);
  }
}

@media screen and (min-width: 1024px) {
  .nav-container {
    font-size: calc(15.5 / var(--rem-base) * 1rem);
    flex: none;
    position: static;
    top: 0;
    visibility: visible;
  }
}

.nav-container.is-active {
  visibility: visible;
}

.nav {
  background-color: var(--color-bone);
  border-right: 1px solid #d6d6d6;
  position: relative;
  top: var(--toolbar-height);
  height: var(--nav-height);
}

@media screen and (min-width: 769px) {
  .nav {
    box-shadow: 0.5px 0 3px var(--nav-border-color);
  }
}

@media screen and (min-width: 1024px) {
  .nav {
    top: var(--navbar-height);
    box-shadow: none;
    position: sticky;
    height: var(--nav-height--desktop);
  }
}

.nav .panels {
  display: flex;
  flex-direction: column;
  height: inherit;
}

html.is-clipped--nav {
  overflow-y: hidden;
}

.nav-panel-menu {
  overflow-y: scroll;
  height: var(--nav-panel-menu-height);
}

.nav-panel-menu:not(.is-active) .nav-menu {
  opacity: 0.75;
}

.nav-panel-menu:not(.is-active)::after {
  content: "";
  background: rgba(0, 0, 0, 0.5);
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.nav-menu {
  min-height: 100%;
  padding: 0.5rem 0.75rem;
  line-height: var(--nav-line-height);
  position: relative;
}

.nav-menu h3.title {
  color: var(--nav-heading-font-color);
  font-size: inherit;
  font-weight: var(--body-font-weight-bold);
  margin: 0;
  padding: 0.25em 0 0.125em;
}

.nav-menu a {
  color: inherit;
}

.nav-list {
  margin: 0 0 0 0.75rem;
  padding: 0;
}

.nav-menu > .nav-list + .nav-list {
  margin-top: 0.5rem;
}

.nav-item {
  list-style: none;
  margin-top: 0.5em;
}

/* adds some breathing room below a nested list */
.nav-item-toggle ~ .nav-list {
  padding-bottom: 0.125rem;
}

/* matches list without a title */
.nav-item[data-depth="0"] > .nav-list:first-child {
  display: block;
  margin: 0;
}

/* matches list without a title */
.nav-item[data-depth="2"] {
  color: var(--color-gray-70);
}

.nav-item:not(.is-active) > .nav-list {
  display: none;
}

.nav-item-toggle {
  background: transparent url(../img/chevron.svg) no-repeat center / 50%;
  transform: rotate(-90deg);
  border: none;
  outline: none;
  line-height: inherit;
  position: absolute;
  height: calc(var(--nav-line-height) * 1em);
  width: calc(var(--nav-line-height) * 1em);
  margin-top: -0.05em;
  margin-left: calc(var(--nav-line-height) * -1em);
}

.nav-item.is-active > .nav-item-toggle {
  transform: rotate(0deg);
}

.is-current-page > .nav-link,
.is-current-page > .nav-text {
  color: var(--color-accent);
}

.nav-panel-explore {
  background: var(--color-bone);
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.nav-panel-explore:not(:first-child) {
  top: auto;
  max-height: var(--nav-panel-explore-height);
}

.nav-panel-explore .context {
  font-size: calc(15 / var(--rem-base) * 1rem);
  flex-shrink: 0;
  color: var(--nav-muted-color);
  box-shadow: 0 -1px 0 var(--nav-panel-divider-color);
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  line-height: 1;
  height: var(--drawer-height);
}

.nav-panel-explore .context .version {
  display: flex;
  align-items: inherit;
}

.nav-panel-explore .context .version::after {
  content: "";
  background: url(../img/chevron.svg) no-repeat center right / auto 100%;
  width: 1.25em;
  height: 0.75em;
}

.nav-panel-explore .components {
  line-height: var(--doc-line-height);
  flex-grow: 1;
  box-shadow: inset 0 1px 5px var(--nav-panel-divider-color);
  background: var(--color-bone);
  padding: 0.5rem 0.75rem 0 0.75rem;
  margin: 0;
  overflow-y: scroll;
  max-height: 100%;
  display: block;
}

.nav-panel-explore:not(.is-active) .components {
  display: none;
}

.nav-panel-explore .component {
  display: block;
}

.nav-panel-explore .component + .component {
  margin-top: 0.5rem;
}

.nav-panel-explore .component:last-child {
  margin-bottom: 0.75rem;
}

.nav-panel-explore .component .title {
  font-weight: var(--body-font-weight-bold);
  color: inherit;
}

.nav-panel-explore .versions {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
  margin-top: -0.25rem;
  line-height: 1;
}

.nav-panel-explore .component .version {
  display: block;
  margin: 0.375rem 0.375rem 0 0;
}

.nav-panel-explore .component .version a {
  border: 1px solid var(--nav-border-color);
  border-radius: 0.25rem;
  color: inherit;
  opacity: 0.75;
  white-space: nowrap;
  padding: 0.125em 0.25em;
  display: inherit;
}

.nav-panel-explore .component .is-current a {
  border-color: currentColor;
  opacity: 0.9;
  font-weight: var(--body-font-weight-bold);
}
