/* Intentum DocFX theme — primary: navy, secondary: purple */

:root,
[data-bs-theme="light"] {
  /* Primary: navy (logo background) */
  --bs-primary: #1e3a5f;
  --bs-primary-rgb: 30, 58, 95;
  --bs-primary-bg-subtle: #e8eef5;
  --bs-primary-border-subtle: #b8c9dc;

  /* Links / accent: purple (logo bar gradient) */
  --bs-link-color: #6366f1;
  --bs-link-color-rgb: 99, 102, 241;
  --bs-link-hover-color: #4f46e5;
  --bs-link-hover-color-rgb: 79, 70, 229;

  /* Navbar: subtle primary tint */
  --bs-body-color: #1e293b;
  --bs-heading-color: #0f172a;
}

[data-bs-theme="dark"] {
  --bs-primary: #3b5b8a;
  --bs-primary-rgb: 59, 91, 138;
  --bs-primary-bg-subtle: #1e2d42;
  --bs-primary-border-subtle: #2d4263;

  --bs-link-color: #818cf8;
  --bs-link-color-rgb: 129, 140, 248;
  --bs-link-hover-color: #a5b4fc;
  --bs-link-hover-color-rgb: 165, 180, 252;

  --bs-body-color: #e2e8f0;
  --bs-heading-color: #f1f5f9;
}

/* Navbar brand area: align logo + name */
.navbar-brand {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Logo size: limit height so it doesn’t dominate the page */
.navbar-brand img,
img[src*="logo"],
img[alt*="Intentum"] {
  max-height: 2rem;
  width: auto;
  object-fit: contain;
}

/* Hero/banner logo (modern template main logo block) */
.page-header img,
.hero img,
[class*="banner"] img {
  max-height: 3rem;
  width: auto;
  object-fit: contain;
}

/* Main article: first block logo (modern template brand area) */
.article .content > div:first-child img,
.article .content > section:first-child img {
  max-height: 3rem;
  width: auto;
  object-fit: contain;
}

/* Code blocks: slight primary tint on border */
pre {
  border-left: 3px solid var(--bs-primary);
}

/* Sidebar / TOC active item */
.affix a.active {
  color: var(--bs-link-color);
  font-weight: 500;
}

/* Sidebar TOC: accordion-style groups (collapsible, less clutter) */
.affix .nav {
  padding-left: 0;
}
.affix .nav > li > a {
  font-weight: 600;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.affix .nav .nav > li > a {
  font-weight: 400;
  padding-left: 1rem;
  font-size: 0.9375rem;
}
.affix .nav .nav .nav > li > a {
  padding-left: 1.5rem;
}

/* Group header: any top-level li with class toc-group (added by JS) */
.affix .nav > li.toc-group > a,
.nav > li.toc-group > a {
  cursor: pointer;
  user-select: none;
}
.affix .nav > li.toc-group > a::before,
.nav > li.toc-group > a::before {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-right: 0.35em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  vertical-align: 0.15em;
  transition: transform 0.15s ease;
}
.affix .nav > li.toc-group.expanded > a::before,
.nav > li.toc-group.expanded > a::before {
  transform: rotate(45deg);
}

/* Accordion: collapse child ul by default; show when .expanded */
.affix .nav > li.toc-group > ul,
.nav > li.toc-group > ul {
  display: none;
}
.affix .nav > li.toc-group.expanded > ul,
.nav > li.toc-group.expanded > ul {
  display: block;
}

/* Fallback for DocFX modern's own has-children (if present) */
.affix .nav li.has-children > a::before {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-right: 0.35em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  vertical-align: 0.15em;
  transition: transform 0.15s ease;
}
.affix .nav li.has-children.expanded > a::before {
  transform: rotate(45deg);
}

/* Slightly compact sidebar so more fits without scroll */
.affix ul.nav {
  list-style: none;
}
.affix .nav li {
  margin-bottom: 0;
}
