/* AltTester brand colours and font on the PyData Sphinx Theme. */
html[data-theme="light"] {
  --pst-color-primary: #0e3c64;
  --pst-color-secondary: #00a525;
  --pst-color-link: #196db6;
  --pst-color-link-hover: #0e3c64;
  --pst-color-accent: #00a525;
  --pst-color-inline-code: #0e3c64;
}
html[data-theme="dark"] {
  --pst-color-primary: #7fb8ea;
  --pst-color-secondary: #3fcf63;
  --pst-color-link: #7fb8ea;
  --pst-color-link-hover: #b5d6f4;
  --pst-color-accent: #3fcf63;
  --pst-color-inline-code: #b5d6f4;
}
html {
  --pst-font-family-base: Oxygen, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pst-font-family-heading: Oxygen, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Product tabs in the top bar: the active product is underlined in brand green. */
.product-tabs .nav-item.active > .nav-link {
  border-bottom: 3px solid var(--pst-color-secondary);
  color: var(--pst-color-text-base);
}
.product-tabs .nav-link {
  font-weight: 700;
}
.return-to-website {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Group captions in the sidebar. */
.bd-sidebar-primary .caption {
  margin: 1.25rem 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pst-color-text-muted);
}
.bd-sidebar-primary .bd-links__title {
  font-weight: 700;
}

/* The old "Table of contents:" group repeats the product tabs. */
.bd-sidebar-primary .bd-toc-item > p.caption:first-of-type,
.bd-sidebar-primary .bd-toc-item > p.caption:first-of-type + ul {
  display: none;
}

/* sphinx-tabs has no dark mode of its own. */
html[data-theme="dark"] .sphinx-tabs-panel {
  border-color: var(--pst-color-border);
  background: var(--pst-color-surface);
  color: var(--pst-color-text-base);
}
html[data-theme="dark"] .sphinx-tabs-tab {
  color: var(--pst-color-text-muted);
}
html[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] {
  border-color: var(--pst-color-border);
  border-bottom-color: var(--pst-color-surface);
  background: var(--pst-color-surface);
  color: var(--pst-color-text-base);
}
html[data-theme="dark"] [role="tablist"] {
  border-bottom-color: var(--pst-color-border);
}

/* Path examples in dark mode. */
html[data-theme="dark"] .path-playground {
  --pp-border: var(--pst-color-border);
  --pp-muted: var(--pst-color-text-muted);
  --pp-accent: #7fb8ea;
  --pp-accent-soft: #1d3550;
  --pp-first: #f0a050;
  --pp-first-soft: #4a3015;
  --pp-bg: var(--pst-color-surface);
  --pp-panel-bg: var(--pst-color-on-background);
  --pp-path: #ff8a7a;
}

/* Long command names in headings wrap on narrow screens. */
.bd-article h1, .bd-article h2, .bd-article h3 {
  overflow-wrap: anywhere;
}
