/* Collapsible TOC Plugin - Default Styles */

.post__toc {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 0;
  margin: 1.5rem 0;
}

.post__toc h1,
.post__toc h2,
.post__toc h3,
.post__toc h4,
.post__toc h5,
.post__toc h6 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1.1em;
}

.post__toc[aria-expanded="false"] h1,
.post__toc[aria-expanded="false"] h2,
.post__toc[aria-expanded="false"] h3,
.post__toc[aria-expanded="false"] h4,
.post__toc[aria-expanded="false"] h5,
.post__toc[aria-expanded="false"] h6 {
  border-bottom: none;
}

/* Toggle button */
.post__toc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85em;
  padding: 0.15em 0.5em;
  color: var(--toc-toggle-link-color, currentColor);
  white-space: nowrap;
}

.post__toc-toggle::before {
  content: '[';
  color: var(--toc-toggle-color, currentColor);
  margin-right: 0.15em;
}

.post__toc-toggle::after {
  content: ']';
  color: var(--toc-toggle-color, currentColor);
  margin-left: 0.15em;
}

.post__toc-toggle:hover,
.post__toc-toggle:active {
  color: var(--toc-toggle-link-color-hover, currentColor);
}

.post__toc-toggle:focus {
  color: var(--toc-toggle-link-color, currentColor);
  outline: none;
}

.post__toc-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Ordered list */
.post__toc > ol {
  margin: 0;
  padding: 0.5rem 1rem 0.5rem 2rem;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

.post__toc > ol[aria-hidden="true"] {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.post__toc > ol[aria-hidden="false"] {
  opacity: 1;
}

.post__toc ol {
  padding-left: 1.5em;
}

.post__toc ol li {
  margin: 0.25em 0;
  padding-left: 0.25em;
}

/* Links */
.post__toc a {
  color: var(--toc-link-color, var(--link-color));
  text-decoration: none;
}

.post__toc a:hover,
.post__toc a:active,
.post__toc a:focus {
  color: var(--toc-link-color-hover, var(--link-color-hover));
  text-decoration: underline;
}

/* Number color via counter marker */
.post__toc ol li::marker {
  color: var(--toc-number-color, currentColor);
}
