@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins';

.bd-links {
  padding: 0;

  @include media-breakpoint-up(md) {
    @supports (position: sticky) {
      max-height: calc(100vh - 5rem);
      overflow-y: auto;
    }
  }

  // Override collapse behaviors
  @include media-breakpoint-up(md) {
    display: block !important;
  }
}

.bd-toc-link {
  display: block;
  padding: 0.5rem 1rem;
  @include media-breakpoint-up(md) {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
  color: $gray-800;

  &:hover {
    color: $primary;
  }
}

.bd-toc-item {
  background-color: $white;
  &.active {
    > .bd-toc-link {
      color: $primary;
      font-weight: 600;

      &:hover {
        background-color: transparent;
      }
    }

    .bd-sidenav {
      display: block;
    }
  }
}

.bd-sidenav {
  display: none;
}

// All levels of nav
.nav {
  > li > a {
    display: inline-block;
    padding: 0.25rem 0.5rem 0.25rem 1.5rem;
    font-size: 16px;
    color: $gray-800;
    &:hover {
      color: $primary;
      background-color: transparent;
    }
  }
  > .active > a,
  > .active:hover > a {
    font-weight: 600;
    color: $primary;
    background-color: transparent;
  }
}
