/* Docusaurus Numbered Headings Plugin Styles - Generic Base */
/* Shared styles for all numbering conventions */

/* Initialize counters for main content */
body {
  counter-reset: h2counter;
}

/* Initialize counters for table of contents */
.table-of-contents {
  counter-reset: toc-h2;
}

.table-of-contents > li {
  counter-increment: toc-h2;
  counter-reset: toc-h3;
}

.table-of-contents > li > ul > li {
  counter-increment: toc-h3;
  counter-reset: toc-h4;
}

.table-of-contents > li > ul > li > ul > li {
  counter-increment: toc-h4;
  counter-reset: toc-h5;
}

.table-of-contents > li > ul > li > ul > li > ul > li {
  counter-increment: toc-h5;
}

/* Base styling for heading numbers */
h2::before,
h3::before,
h4::before,
h5::before {
  color: inherit;
  font-weight: inherit;
}

/* Make links inline to prevent line breaks after numbering */
ul.table-of-contents li a.table-of-contents__link {
  display: inline !important;
}
a.table-of-contents__link {
  display: inline !important;
}
ul.table-of-contents * {
  list-style: none;
}

/* Disable numbered headings within elements with disable_numbered_headings class */
.disable_numbered_headings h2::before,
.disable_numbered_headings h3::before,
.disable_numbered_headings h4::before,
.disable_numbered_headings h5::before {
  content: none !important;
}

/* Reset counters for headings inside disable_numbered_headings to prevent interference */
.disable_numbered_headings {
  counter-reset: h2counter h3counter h4counter h5counter;
}

/* Disable numbered headings when the class is applied */
.disable-numbered-headings h2::before,
.disable-numbered-headings h3::before,
.disable-numbered-headings h4::before,
.disable-numbered-headings h5::before {
  display: none !important;
}
