/*!
 * Bootstrap Table of Contents v1.0.1 (http://afeld.github.io/bootstrap-toc/)
 * Copyright 2015 Aidan Feldman
 * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */

/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */

/* modified by https://github.com/shravanngoswamii, for the original source of this Table of Content, visit above links */

/* Styles for the TOC container */
.toc-container {
  position: fixed;
  background-color: #ffffff;
  right: 0;
  top: 61px; /* Adjust based on your header height */
  width: 290px;
  height: calc(100% - 61px);
  overflow-y: auto;
  padding-top: 14px;
  transition: top 0.3s;
  z-index: 1000;
}

/* Styles for the "On this page" title */
.toc-title {
  font-size: 14px;
  color: #333;
  padding-left: -20px !important;
}

.toc-container nav[id="toc"] > ul {
  margin-left: -.45em !important;
}

/* Styles for the nav element */
nav[data-toggle="toc"] {
  border-left: 1px solid #e3e3e3;
  margin-left: 15px;
}

/* All levels of nav */
nav[data-toggle="toc"] .nav > li > a {
  display: block;
  padding: 4px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #767676;
}
nav[data-toggle="toc"] .nav > li > a:hover,
nav[data-toggle="toc"] .nav > li > a:focus {
  padding-left: 19px;
  color: #2761e3;
  text-decoration: none;
  background-color: transparent;
  border-left: 1px solid #2761e3;
  margin-left: .45em !important;
  

}
nav[data-toggle="toc"] .nav-link.active,
nav[data-toggle="toc"] .nav-link.active:hover,
nav[data-toggle="toc"] .nav-link.active:focus {
  padding-left: 18px;
  font-weight: bold;
  color: #2761e3;
  background-color: transparent;
  border-left: 2px solid #2761e3;
}

/* Nav: second level (shown on .active) */
nav[data-toggle="toc"] .nav-link + ul {
  display: none; /* Hide by default, but at >768px, show it */
  padding-bottom: 10px;
}

nav[data-toggle="toc"] .nav .nav > li > a {
  padding-top: 1px;
  padding-bottom: 1px;
  padding-left: 30px;
  font-size: 12px;
  font-weight: normal;
}
nav[data-toggle="toc"] .nav .nav > li > a:hover,
nav[data-toggle="toc"] .nav .nav > li > a:focus {
  padding-left: 29px;
}
nav[data-toggle="toc"] .nav .nav > li > .active,
nav[data-toggle="toc"] .nav .nav > li > .active:hover,
nav[data-toggle="toc"] .nav .nav > li > .active:focus {
  padding-left: 28px;
  font-weight: 500;
}

nav[data-toggle="toc"] .nav-link.active + ul {
  display: block;
}

/* Mobile CSS */
@media (max-width: 992px) {
  .toc-container {
    transition: transform 0.3s ease, visibility 0.3s ease;
    transform: translateX(100%);
    visibility: hidden;
  }

  .toc-container.show {
    transform: translateX(0);
    visibility: visible;
  }
}

/* Styling the toggle button */
.toc-toggle-button {
  position: fixed;
  right: 0;
  bottom: 35px;
  cursor: pointer;
  z-index: 1021;
  display: none;
}

@media (min-width: 992px) {
  .toc-toggle-button {
    display: none !important;
  }
}
