/* Top Navigation */
nav.hextra-max-navbar-width {
  height: 5.5rem !important;
}

/* Logo and Title styling */
nav.hextra-max-navbar-width img[src*="logo"] {
  width: 32px !important;
  height: 32px !important;
}

nav.hextra-max-navbar-width span[title] {
  font-size: 1.4rem !important;
  margin-left: 0.5rem !important;
  margin-right: 5rem !important;
}

nav.hextra-max-navbar-width > a:first-child {
  margin-right: 4rem !important;
}

/* Missing hx: prefixed Tailwind utilities (not compiled in vendored CSS) */
.hx\:opacity-0 {
  opacity: 0;
}

/* Back to top button - hidden by default via .hx\:opacity-0 class, shown on scroll via JS */
#backToTop {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  transition: all 75ms;
}

#backToTop:hover {
  color: #111827;
}

html[class~="dark"] #backToTop,
html.dark #backToTop {
  color: #9ca3af;
}

html[class~="dark"] #backToTop:hover,
html.dark #backToTop:hover {
  color: #f3f4f6;
}

#backToTop svg {
  display: inline !important;
  vertical-align: middle;
  height: 0.875rem;
  width: 0.875rem;
  border-radius: 9999px;
  border: 1px solid #6b7280;
  margin-left: 0.25rem;
}

#backToTop:hover svg {
  border-color: #111827;
}

html[class~="dark"] #backToTop svg,
html.dark #backToTop svg {
  border-color: #9ca3af;
}

html[class~="dark"] #backToTop:hover svg,
html.dark #backToTop:hover svg {
  border-color: #f3f4f6;
}

/* TOC bottom divider above "Edit this page" */
.hextra-toc .hextra-scrollbar > div:last-child {
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 2rem;
}

html[class~="dark"] .hextra-toc .hextra-scrollbar > div:last-child,
html.dark .hextra-toc .hextra-scrollbar > div:last-child {
  border-top-color: #262626;
}

/* Hide dark logo in light mode, show in dark mode */
img[alt="Dark Logo"] {
  display: none !important;
}

html[class~="dark"] img[alt="Dark Logo"],
html.dark img[alt="Dark Logo"] {
  display: block !important;
}

html[class~="dark"] img[alt="Logo"],
html.dark img[alt="Logo"] {
  display: none !important;
}

nav.hextra-max-navbar-width a,
nav.hextra-max-navbar-width button.hextra-nav-menu-toggle {
  font-weight: 500;
  font-size: 1.15rem;
  color: #1f2937;
  margin: 0 0.75rem;
}

html[class~="dark"] nav.hextra-max-navbar-width a,
html[class~="dark"] nav.hextra-max-navbar-width button.hextra-nav-menu-toggle {
  color: #f3f4f6;
}

nav.hextra-max-navbar-width [data-search],
nav.hextra-max-navbar-width [type="search"],
nav.hextra-max-navbar-width input[placeholder*="Search"],
nav.hextra-max-navbar-width .search-wrapper,
nav.hextra-max-navbar-width button[aria-label*="search" i] {
  height: 2.75rem !important;
  min-height: 2.75rem !important;
  padding: 0.625rem 1rem !important;
  font-size: 1rem !important;
}

nav.hextra-max-navbar-width a[href*="github"] {
  margin-right: 0.25rem !important;
}

/* Sidebar Root Items — top-level doc sections (structural selector) */
.hextra-sidebar-container .hextra-scrollbar > ul > li > a {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-top: 1rem;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.hextra-sidebar-container .hextra-scrollbar > ul > li:first-child > a {
  margin-top: 0;
}

html[class~="dark"] .hextra-sidebar-container .hextra-scrollbar > ul > li > a {
  color: #e5e7eb !important;
}

/* Sidebar section roots — Overview, Concepts, Configuration, etc. */
.hextra-sidebar-container .hextra-scrollbar > ul > li > div > ul > li > a {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}

/* Hide vertical line on section-root list (keep it only on subpage lists) */
.hextra-sidebar-container .hextra-scrollbar > ul > li > div > ul::before {
  display: none !important;
}

/* Indent subpages under section roots to show parent-child relation */
.hextra-sidebar-container .hextra-scrollbar > ul > li > div > ul > li > div {
  margin-left: 0.5rem !important;
}

/* TOC active link — more visible highlight */
.hextra-toc a.hextra-toc-active {
  color: #2563eb !important;
  font-weight: 600 !important;
}

html[class~="dark"] .hextra-toc a.hextra-toc-active {
  color: #60a5fa !important;
}

/* Hide sidebar collapse/expand chevron arrows */
.hextra-sidebar-collapsible-button {
  display: none !important;
}
