.bs-sidebar .nav > .active > a,
.bs-sidebar .nav > .active:hover > a,
.bs-sidebar .nav > .active:focus > a {
  font-weight: bold;
    color: var(--cbr-dark); 
    border-right: 2px solid var(--logo-cc);
}

.bs-sidebar .nav > li > a {
    display: block;
    color: var(--cbr-dark); /*#645f6c;*/ /* dark, dusty purple */
    padding: 5px 20px;
}

.bs-sidenav {
    background-color: var(--cbr-nav-bg);
}

.bs-sidebar.affix {
    /* position: fixed; */ /* Undo the static from mobile first approach */
    position: sticky !important;
    top: 100px !important;
}


ul[class="nav bs-sidenav"] {
    display: block !important;
}

  /* TOC Positioning */
  .toc-container {
      position: sticky;
      top: 100px;
      height: fit-content;
      border-radius: 0.375rem;
      transition: top 0.3s ease;
      padding-right: 1rem;
      border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important;
  }
  
  .toc-container.header-collapsed {
      top: 100px;
  }
  
  .toc {
      max-height: 70vh;
      overflow-y: unset !important; /* Prevents Tocbot from shrinking height of container, keeping all content-section items visible */
      scrollbar-width: none; /* Firefox */
      -ms-overflow-style: none; /* IE/Edge */
  }
  
  .toc::-webkit-scrollbar {
      display: none; /* Chrome/Safari/Opera */
  }
  
  .toc-list {
      margin: 0;
      padding: 0;
      list-style: none;
  }
  
  
  .toc-list-item {
      margin: 0;
      padding: 2px;
      position: relative;
  } 
  
  .toc-list-item.has-children > .toc-link {
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      position: relative;
  }
  
  .toc-list-item.has-children > .toc-link:hover {
      background-color: var(--cbr-ltgraygreen) !important;
      color: var(--cbr-color) !important;
      text-decoration: none;
  }
  
  .toc-list-item.has-children > .toc-link::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    width: 3px;
    height: 100%;
    background-color: transparent;
    transition: background-color 0.2s ease;
  }

  .toc-list-item.has-children > .toc-link::after {
      content: '\25BA';
      display: inline-block;
      transition: transform 0.2s ease;
      font-size: 0.75rem;
      color: var(--cbr-color);
      margin-left: auto;
      flex-shrink: 0;
      font-weight: bold;
  }
  
  .toc-list-item.has-children.expanded > .toc-link::after {
      transform: rotate(90deg);
      color: currentColor;
  }
  
  .toc-list-item.has-children:hover > .toc-link::before {
      background-color: var(--cbr-color);
  }
  
  .toc-link {
      display: block;
      padding: 0.25rem 0.5rem;
      text-decoration: none;
      color: #495057;
      border-radius: 0.25rem;
      transition: all 0.2s ease;
      cursor: pointer;
      margin-left: 10px;
  }
  
  .toc-link:hover {
      background-color: var(--cbr-color);
      color: #fff;
  }
  
  .is-active-link {
      background-color: var(--cbr-color);
      color: white !important;
  }

  .is-active-link::before {
    background-color: var(--cbr-color) !important;
  }
  
  .toc-list-item.expanded > .toc-list {
      display: block;
  }
  
  /* Permalink styles */
.permalink {
	margin-left: 8px;
	color: var(--cbr-color) !important;
	text-decoration: none;
	opacity: 0;
	transition: opacity 0.2s ease;
	font-weight: normal;
}

.permalink:hover {
	color: var(--cbr-link) !important;
	text-decoration: none;
}

.content:hover .permalink {
	opacity: 1;
}

h2:hover .permalink,
h3:hover .permalink {
	opacity: 1;
}
  

