/* Icon + button container */
.content-icon-container,
.p-table-of-contents__section .content-icon-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.1rem;
  margin: 0.5rem 1rem 1rem auto;
  padding: 0;
  text-align: right;
}

/* Optional variation in TOC context */
.p-table-of-contents__section .content-icon-container {
  margin-bottom: 0.5rem;
}

/* GitHub issue link container */
.github-issue-link-container {
  padding-right: 0.1rem;
}

/* "Give feedback" / issue link styling.
 * Uses the theme-wide --ulwazi-color-brand tokens defined in vanilla-main.css. */
.github-issue-link,
.p-table-of-contents__section .muted-link.github-issue-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size--small, 0.875rem);
  font-weight: 600;
  background-color: var(--ulwazi-color-brand);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  line-height: 1;
  white-space: nowrap;
}

.github-issue-link:hover,
.p-table-of-contents__section .muted-link.github-issue-link:hover {
  background-color: var(--ulwazi-color-brand-hover);
}

/* Muted links (edit/view) */
a.muted-link {
  color: inherit;
}

.p-table-of-contents__section .edit-this-page.muted-link,
.p-table-of-contents__section .view-source.muted-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin: 0;
  padding: 0;
  color: var(--vf-color-text-muted, #444);
}

.p-table-of-contents__section .edit-this-page.muted-link:hover,
.p-table-of-contents__section .view-source.muted-link:hover {
  color: var(--vf-color-link-default, #e95420);
}

/* Hidden text for accessibility */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  background: var(--vf-color-background-default, var(--color-background-primary, transparent));
  color: var(--vf-color-text-default, var(--color-foreground-primary, inherit));
}

/* Theme toggle button */
.theme-toggle-container {
  display: flex;
}

button.theme-toggle {
  display: flex;
  cursor: pointer;
  background-color: transparent;
  border: none;
  padding: 0;
}

.theme-toggle svg {
  display: none;
  color: var(--vf-color-text-default, var(--color-foreground-primary));
  width: 1.25rem;
  height: 1.25rem;
}

/* SVG rendering fix */
svg:not(:root) {
  overflow-clip-margin: content-box;
  overflow: hidden;
}


.p-toc-feedback-block {
  display: block;
  margin-bottom: var(--pst-spacing-m, 1rem);
}

/* Local TOC: delete vertical slider */

/* .l-docs__sticky-container {
  position: static !important;
  height: auto !important;
  overflow: visible !important;
}

.p-table-of-contents {
  max-height: none !important;
  overflow-y: visible !important;
} */

.p-toc-feedback-block .content-icon-container {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  white-space: nowrap;
}

.p-toc-feedback-block .content-icon-container a,
.p-toc-feedback-block .content-icon-container button {
  flex-shrink: 0;
}

/* Side navigation icon on the far left; the rest of the row on the right. */
.p-toc-feedback-block .content-icon-container .js-drawer-toggle {
  margin-right: auto;
  padding-left: 0;
}

@media (min-width: 1036px) {
  .p-toc-feedback-block .content-icon-container.navigation-only {
    display: none;
  }
}
