/* Table of Contents (TOC) Styling */
.toc-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

/* TOC List Styling */
.toc ol,
.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc ol ol,
.toc ul ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.toc li {
  margin: 0.5rem 0;
}

.toc a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #4a5568 !important;
  text-decoration: none;
  font-size: 1.6rem;
  line-height: 1.5;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.toc a:hover {
  background-color: #e2e8f0;
  color: #2d3748 !important;
}

.toc a.is-active-link {
  background-color: transparent;
  color: inherit !important;
}

/* Ensure all TOC levels have consistent styling */
.toc .toc-list-item a,
.toc .toc-list-item > a,
.toc ol li a,
.toc ul li a {
  color: #4a5568 !important;
  font-size: 1.6rem !important;
  font-weight: 500;
}

.toc .toc-list-item a:hover,
.toc ol li a:hover,
.toc ul li a:hover {
  color: #2d3748 !important;
  background-color: #e2e8f0;
}

.toc .toc-list-item a.is-active-link,
.toc ol li a.is-active-link,
.toc ul li a.is-active-link {
  color: inherit !important;
  background-color: transparent;
}

/* Override any default tocbot styles */
.toc .toc-list {
  margin: 0;
  padding: 0;
}

.toc .toc-list-item {
  margin: 0.5rem 0;
}

.toc .toc-list-item::before {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .toc-box {
    padding: 1rem;
    margin: 1.5rem 0;
  }
  
  .toc-title {
    font-size: 1.125rem;
  }
  
  .toc a {
    font-size: 1.6rem;
    padding: 0.4rem 0.6rem;
  }
}
