/* TOC Border Fixes - Prevents vertical light lines in table of contents */

/* Fix TOC heading font size - reduce from default h2 size */
#toc-title,
#TOC h2,
#quarto-toc h2,
.quarto-toc h2,
.toc-title,
[class*="toc"] h2,
[class*="TOC"] h2 {
  font-size: 1.2rem !important;
}

/* Comprehensive TOC border fixes for both light and dark modes */
#quarto-margin-sidebar,
.margin-sidebar,
.sidebar {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* TOC specific styling to remove any borders - moved to consistent positioning section below */

/* Additional fixes for TOC container elements */
#quarto-margin-sidebar .quarto-listing-category {
  border: none !important;
  background: var(--bs-body-bg) !important;
  z-index: 10 !important;
  position: relative !important;
  padding: 15px !important;
  border-radius: 5px !important;
  margin-bottom: 10px !important;
}

/* Ensure consistent TOC positioning for both light and dark themes */
#TOC,
#quarto-toc,
.quarto-toc {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 15px !important;
  border-radius: 5px !important;
  margin-bottom: 10px !important;
  background-color: var(--bs-body-bg) !important;
}

/* Light theme specific TOC background */
body.quarto-light #TOC,
body.quarto-light #quarto-toc,
body.quarto-light .quarto-toc {
  background-color: var(--bs-body-bg) !important;
}

#quarto-margin-sidebar .quarto-listing-category-title {
  border: none !important;
  background: var(--bs-body-bg) !important;
}

#quarto-margin-sidebar .quarto-listing-category .category {
  border: none !important;
  background: transparent !important;
  font-size: 0.8rem !important; /* Force consistent font size */
}

/* Fix for any remaining border issues in TOC area */
body.quarto-dark #quarto-margin-sidebar,
body.quarto-dark .margin-sidebar,
body.quarto-dark .sidebar {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

/* Ensure TOC elements don't have any borders - consistent with light theme positioning */
body.quarto-dark #TOC,
body.quarto-dark #quarto-toc,
body.quarto-dark .quarto-toc {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  background-color: #141414 !important;
  /* Padding, border-radius, and margin are inherited from the general TOC rules above */
}

/* Force consistent font size for all category elements in sidebar regardless of theme */
#quarto-margin-sidebar .quarto-listing-category .category,
body.quarto-light #quarto-margin-sidebar .quarto-listing-category .category,
body.quarto-dark #quarto-margin-sidebar .quarto-listing-category .category {
  font-size: 0.8rem !important;
}

/* Additional fixes for Bootstrap grid system that might add borders */
.col-md-3,
.col-lg-3,
.col-xl-3 {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* Fix for any Bootstrap container elements that might have borders */
.container-fluid,
.container {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* Ensure row elements don't add borders */
.row {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* Fix for any Quarto-specific TOC elements */
.quarto-margin-sidebar,
.quarto-margin-sidebar-content {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Dark mode specific fixes */
body.quarto-dark .quarto-margin-sidebar,
body.quarto-dark .quarto-margin-sidebar-content {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  background-color: #141414 !important;
}

/* Dark mode category menu background */
body.quarto-dark #quarto-margin-sidebar .quarto-listing-category {
  border: none !important;
  background: #141414 !important;
  z-index: 10 !important;
  position: relative !important;
  padding: 15px !important;
  border-radius: 5px !important;
  margin-bottom: 10px !important;
}


/* Dark mode category title background */
body.quarto-dark #quarto-margin-sidebar .quarto-listing-category-title {
  border: none !important;
  background: #141414 !important;
}

/* Blog-specific TOC fixes */
body[class*="blog"] #quarto-margin-sidebar,
body[class*="blog"] .margin-sidebar,
body[class*="blog"] .sidebar {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Blog-specific dark mode TOC fixes */
body.quarto-dark[class*="blog"] #quarto-margin-sidebar,
body.quarto-dark[class*="blog"] .margin-sidebar,
body.quarto-dark[class*="blog"] .sidebar {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  background-color: #141414 !important;
}

/* Additional fixes for any remaining border elements in blog posts */
body[class*="blog"] .col-md-3,
body[class*="blog"] .col-lg-3,
body[class*="blog"] .col-xl-3 {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* Fix for any remaining border issues in blog TOC area */
body.quarto-dark[class*="blog"] .col-md-3,
body.quarto-dark[class*="blog"] .col-lg-3,
body.quarto-dark[class*="blog"] .col-xl-3 {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
} 