/* --- TOCBot Styling --- */

/* TOCBot unordered list styling */
#tocbot ul {
  width: 100% !important;
  list-style: none;
  padding: 0;
}

/* Link styling within TOCBot */
#tocbot ul li a {
  position: relative;
  display: inline-block;
  padding: 0.3rem 1rem;
  text-decoration: none;
  border-left: 2px solid #f8f9fa;
}

/* Hover and focus state for TOCBot links */
#tocbot ul li a:focus,
#tocbot ul li a:hover {
  z-index: 1;
  text-decoration: none;
}

/* Active state for TOCBot links */
#tocbot ul li a.active {
  z-index: 1;
  text-decoration: none;
  border-left: 2px solid #BE830E;
}

/* General link color for TOCBot */
.js-toc li a {
  color: #000;
}

/* Active link styling for TOCBot */
.js-toc li a.active {
  font-weight: 600;
}

/* --- TOCBot Mobile and Top Bar Styling --- */

#tocbot-mobile .navbar-toggler,
#tocbot-mobile-top .navbar-toggler {
  background-color: #6B4700;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.7);
}

#tocbot-mobile .navbar-toggler:focus,
#tocbot-mobile-top .navbar-toggler:focus {
  box-shadow: none;
}

/* TOCBot mobile styling */
#tocbot-mobile {
  z-index: 100;
  position: fixed;
  width: 100% !important;
  left: 0 !important;
  bottom: 0 !important;
}

/* TOCBot top styling */
#tocbot-mobile-top {
  position: relative;
  background-color: #6B4700;
}

/* Sticky positioning for TOCBot */
.sticky-top {
  z-index: 100;
  position: sticky;
  width: 100% !important;
  left: 0 !important;
  top: 0 !important;
}

/* Navbar styling for TOCBot */
#tocbot-mobile .navbar,
#tocbot-mobile-top .navbar {
  padding: 0.5rem;
  background-color: #6B4700;
  justify-content: flex-start;
  gap: 8px;
}

/* Navbar collapse styling */
#tocbot-mobile .navbar-collapse,
#tocbot-mobile-top .navbar-collapse {
  max-height: 300px;
  overflow-y: auto;
  background-color: #6B4700;
  padding: 0;
  max-width: calc(100% - 15px);
  padding-bottom: 10px;
}

/* List styling for TOCBot mobile and top bar */
#tocbot-mobile ul,
#tocbot-mobile-top ul {
  list-style: none;
  padding: 0;
}

/* Link styling for TOCBot mobile and top bar */
#tocbot-mobile a,
#tocbot-mobile-top a {
  color: #FFF;
  font-weight: 300;
  font-size: 0.8rem;
}

/* Active link styling */
#tocbot-mobile a.active,
#tocbot-mobile-top a.active {
  font-weight: 600;
}

#tocbot-mobile .nav-link,
#tocbot-mobile-top .nav-link {
  padding: 0.3rem 0;
}

/* --- TOCBot Desktop Top Styling --- */

#tocbot-desktop-top {
  background-color: #6B4700;
}

/* Horizontal navbar list styling */
#tocbot-desktop-top .navbar-horizontal ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#tocbot-desktop-top .navbar-horizontal ul > li {
  padding: 0.5rem 0;
}

/* Link styling within horizontal navbar */
#tocbot-desktop-top .navbar-horizontal ul > li > a {
  text-decoration: none;
  color: #FFFFFF;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 0 15px;
  border-left: 1px solid #FFFFFF;
}

#tocbot-desktop-top .navbar-horizontal ul > li:first-child > a {
  border-left: none;
}

/* Active list item styling */
#tocbot-desktop-top .navbar-horizontal ul > li.is-active-li {
  background-color: #FFF;
}

/* Remove border for adjacent items */
#tocbot-desktop-top .navbar-horizontal ul > li.is-active-li + li > a,
.secondary-navbar ul > li.is-active-li + li > a {
  border-left: none;
}

/* Active link styling */
#tocbot-desktop-top .navbar-horizontal ul > li > a.active {
  color: #6B4700 !important;
  font-weight: bold;
  border: none;
}

/* --- Responsive TOCBot Width Adjustments --- */

@media (min-width: 768px) {
  #tocbot {
    max-width: 156px !important;
  }
}

@media (min-width: 992px) {
  #tocbot {
    max-width: 240px !important;
  }
}

@media (min-width: 1200px) {
  #tocbot {
    max-width: 300px !important;
  }
}
