/* ZhEaIsNsAaBn — Sunset skin over the DocFX default template.
   The UiKit Sunset theme (hassanragai.dev/uikit/themes/sunset.css) is loaded in the
   head partial and provides the --zh-* tokens; this file re-skins DocFX chrome for
   the dark theme.

   It must beat two light themes: the defaults in docfx.css, and the highlight.js
   GitHub light theme bundled at the end of docfx.vendor.min.css. Where a light rule
   uses a class selector (.hljs, .toc-filter, ...), the override below uses the same
   or higher specificity — a bare element selector is not enough. */

/* ---- Navbar ---- */
.navbar {
  background: var(--zh-gradient);
  border: none;
}

/* The logo is the 64px ribbon; without a size rule it renders at its natural size
   and overflows the navbar onto the article (seen on the landing page). */
.navbar-brand {
  padding: 9px 15px;
}
.navbar-brand #logo,
#logo {
  height: 32px;
  width: auto;
}

.navbar .navbar-brand,
.navbar .navbar-nav > li > a {
  color: var(--zh-on-accent);
}

.navbar .navbar-nav > li > a:hover,
.navbar .navbar-nav > li > a:focus {
  color: var(--zh-on-accent);
  background: rgba(0, 0, 0, .12);
}

/* Navbar search box: Bootstrap's .form-control is white. */
.navbar .form-control,
#search-query {
  background: var(--zh-surface);
  color: var(--zh-text);
  border-color: var(--zh-line);
}
.navbar .form-control::placeholder {
  color: var(--zh-faint);
}

/* Breadcrumb bar under the navbar. */
.subnav {
  background-color: var(--zh-surface-muted);
  border-color: var(--zh-line);
}
.breadcrumb {
  background-color: transparent;
}
.breadcrumb > li + li:before {
  color: var(--zh-faint);
}

/* ---- Left table of contents: dark like the rest of the page ---- */
.sidenav,
.fixed_header,
.toc,
.sidetoc,
body .toc {
  background-color: var(--zh-surface-muted);
  border-color: var(--zh-line);
}
.sidetoc {
  border-left: 1px solid var(--zh-line);
}
.toc .nav > li > a {
  color: var(--zh-muted);
}
.toc .nav > li > a:hover,
.toc .nav > li.active > a {
  color: var(--zh-rose);
}
.toc-filter {
  background: var(--zh-surface);
  color: var(--zh-muted);
}
.toc-filter > input {
  background: transparent;
  color: var(--zh-text);
}
.toc-filter > input::placeholder {
  color: var(--zh-faint);
}

/* ---- Right "in this article" rail ---- */
.affix ul > li > a {
  color: var(--zh-muted);
}
.affix ul > li > a:hover {
  color: var(--zh-text);
}
.affix ul > li.active > a,
.affix ul > li.active > a:before {
  color: var(--zh-rose);
}
.affix ul > li > a.active {
  border-left: 2px solid var(--zh-rose);
  color: var(--zh-rose);
}

/* ---- Code: inline and fenced blocks ----
   The vendor bundle's .hljs rules (GitHub light theme) beat a plain `code`
   selector, so the overrides target .hljs and pre code explicitly. */
pre,
pre code,
pre code.hljs,
code,
.hljs {
  background: var(--zh-surface);
  color: var(--zh-text);
  border-color: var(--zh-line);
}
.content code {
  background: var(--zh-surface);
  color: var(--zh-text);
}
a code {
  color: var(--zh-rose-soft);
}

/* highlight.js tokens, dark palette (GitHub Dark-ish). */
.hljs-doctag,
.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-variable.language_ {
  color: #ff7b72;
}
.hljs-title,
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-title.function_ {
  color: #d2a8ff;
}
.hljs-attr,
.hljs-attribute,
.hljs-literal,
.hljs-meta,
.hljs-number,
.hljs-operator,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id,
.hljs-variable {
  color: #79c0ff;
}
.hljs-meta .hljs-string,
.hljs-regexp,
.hljs-string {
  color: #a5d6ff;
}
.hljs-built_in,
.hljs-symbol {
  color: #ffa657;
}
.hljs-code,
.hljs-comment,
.hljs-formula {
  color: #8b949e;
}
.hljs-name,
.hljs-quote,
.hljs-selector-pseudo,
.hljs-selector-tag {
  color: #7ee787;
}
.hljs-subst {
  color: var(--zh-text);
}
.hljs-section {
  color: #79c0ff;
  font-weight: 700;
}
.hljs-bullet {
  color: #f2cc60;
}
.hljs-emphasis {
  color: var(--zh-text);
  font-style: italic;
}
.hljs-strong {
  color: var(--zh-text);
  font-weight: 700;
}
.hljs-addition {
  color: #aff5b4;
  background-color: #033a16;
}
.hljs-deletion {
  color: #ffdcd7;
  background-color: #67060c;
}

/* For code snippet line highlight */
pre > code .line-highlight {
  background-color: rgba(251, 191, 36, .18);
}

.btn {
  background: var(--zh-gradient);
  color: var(--zh-on-accent);
  border: none;
}
