﻿/* =============================================
   VS CODE DARK THEME + COLORED HEADERS + AFFIX FIX
   ============================================= */

/* --- Base dark theme (VS Code Dark+) --- */
html, body {
  background-color: #1e1e1e;
  color: #d4d4d4;
}

#wrapper {
  background-color: #1e1e1e;
}

a {
  color: #4fc1ff;
}

a:hover, a:focus {
  color: #9cdcfe;
}

a.disable, a.disable:hover {
  color: #808080;
}

code {
  color: #ce9178;
  background-color: #2d2d2d;
}

a code {
  color: #4fc1ff;
  background-color: #2d2d2d;
}

pre {
  background-color: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid #3c3c3c;
}

/* --- Colored headers (VS Code Dark+ palette, muted) --- */
h1, .h1 {
  color: #4e94c2;
  border-bottom: 2px solid #2b4a6b;
  padding-bottom: 8px;
}

h2, .h2 {
  color: #3dab96;
  border-bottom: 1px solid #264f42;
  padding-bottom: 6px;
}

h3, .h3 {
  color: #9e9e9e;
}

h4, .h4 {
  color: #66CDAA;
}

h5, .h5 {
  color: #8a8a8a;
}

h6, .h6 {
  color: #8b8b8b;
}

/* --- Navbar dark --- */
.navbar {
  background-color: #252526;
  border-color: #3c3c3c;
}

.navbar .navbar-brand,
.navbar .navbar-nav > li > a {
  color: #d4d4d4;
}

.navbar .navbar-nav > li > a:hover,
.navbar .navbar-nav > li > a:focus {
  color: #ffffff;
}

header .navbar {
  border-bottom-color: #3c3c3c;
}

.documentation-home-link {
  float: left;
  min-height: 50px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d4d4d4;
  border-left: 1px solid #3c3c3c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.documentation-home-link:hover,
.documentation-home-link:focus {
  color: #ffffff;
  background-color: #2d2d2d;
  text-decoration: none;
}

.documentation-home-link__arrow {
  color: #4fc1ff;
  font-size: 18px;
  line-height: 1;
}

@media only screen and (max-width: 600px) {
  .documentation-home-link {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .documentation-home-link__label {
    display: none;
  }
}

/* --- Sidebar / TOC dark --- */
.sidenav, .fixed_header, .toc,
.sidetoc, .sidefilter {
  background-color: #252526;
  border-color: #3c3c3c;
}

.sidetoc {
  border-left-color: #3c3c3c;
  border-right-color: #3c3c3c;
}

.sidefilter {
  border-left-color: #3c3c3c;
  border-right-color: #3c3c3c;
}

.toc-filter {
  background: #3c3c3c;
  color: #d4d4d4;
}

.toc-filter > input {
  color: #d4d4d4;
  background: transparent;
}

.toc .nav > li > a {
  color: #cccccc;
}

.toc .nav > li > a:hover,
.toc .nav > li > a:focus {
  color: #ffffff;
}

.toc .nav > li.active > a {
  color: #4fc1ff;
}

body .toc {
  background-color: #252526;
}

/* --- Article area --- */
.article {
  background-color: #1e1e1e;
}

/* --- AFFIX SCROLL FIX --- */
/* A single scrollbar for the whole container */
.sideaffix {
  overflow-y: auto !important;
  overflow-x: hidden;
  max-height: calc(100vh - 200px);
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.sideaffix::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* Nested lists — no scrollbar of their own */
.affix,
.bs-docs-sidebar,
.bs-docs-sidenav,
.affix ul.level1,
.affix ul.level2,
.affix ul.level3 {
  overflow: visible !important;
  max-height: none !important;
}

/* Affix dark styles */
.affix h5 {
  color: #569cd6;
}

.affix ul > li > a {
  color: #cccccc;
}

.affix ul > li > a:hover {
  color: #ffffff;
}

.affix ul > li.active > a,
.affix ul > li.active > a:before {
  color: #4fc1ff;
}

.affix > ul > li > a:before {
  color: #555555;
}

/* --- Breadcrumb dark --- */
.breadcrumb {
  background-color: transparent;
  color: #808080;
}

.breadcrumb > li + li:before {
  color: #555555;
}

/* --- Footer dark --- */
.footer {
  background-color: #252526;
  border-top-color: #3c3c3c;
  color: #808080;
}

/* --- Tables dark --- */
.table > thead > tr > th,
.table > tbody > tr > td {
  border-color: #3c3c3c;
  color: #d4d4d4;
}

.table > thead > tr > th {
  background-color: #2d2d2d;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #1e1e1e;
}

.table-striped > tbody > tr:nth-of-type(even) {
  background-color: #252526;
}

/* --- Alerts dark --- */
.alert-info {
  background-color: #063b49;
  border-color: #3c3c3c;
  color: #9cdcfe;
}

.alert-warning {
  background-color: #4d3a1a;
  border-color: #3c3c3c;
  color: #dcdcaa;
}

.alert-danger {
  background-color: #4b1818;
  border-color: #3c3c3c;
  color: #f48771;
}

/* --- Gradient blends dark --- */
.grad-top {
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
}

.grad-bottom {
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
}

/* --- Dividers --- */
hr {
  border-color: #3c3c3c;
}

.divider {
  color: #555555;
}

/* --- Search dark --- */
.docs-search {
  background: #3c3c3c;
}

.docs-search > .search-query {
  color: #d4d4d4;
}

#search-results {
  color: #d4d4d4;
}

.search-results-container {
  background: rgba(30, 30, 30, 0.95);
  border-top-color: #3c3c3c;
}

/* --- Inheritance / members sections --- */
.inheritance h5, .inheritedMembers h5 {
  border-bottom-color: #3c3c3c;
  color: #4ec9b0;
}

#fields, #properties, #methods, #events {
  color: #dcdcaa;
}

.declaration, .fieldValue, .parameters, .returns {
  color: #808080;
}

/* --- Tabs dark --- */
.tabGroup a[role="tab"] {
  color: #808080;
  border-bottom-color: #252526;
}

.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus,
.tabGroup a[role="tab"][aria-selected="true"] {
  border-bottom-color: #4fc1ff;
}

.tabGroup a[role="tab"][aria-selected="true"] {
  color: #d4d4d4;
}

.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus {
  color: #4fc1ff;
}

.tabGroup section[role="tabpanel"] {
  border-color: #3c3c3c;
  background-color: #1e1e1e;
}

/* --- Global scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
  background: #424242;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #4f4f4f;
}

/* --- Pagination dark --- */
.pagination > li > a {
  color: #4fc1ff;
  background-color: #2d2d2d;
  border-color: #3c3c3c;
}

.pagination > .active > a {
  background-color: #264f78;
  border-color: #264f78;
  color: #ffffff;
}

/* --- Code syntax highlighting (VS Code Dark+) --- */
.hljs,
.hljs-subst {
  color: #d4d4d4;
}

/* Keywords: if, else, return, class, etc. */
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
  color: #569cd6;
}

/* Strings */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-template-tag,
.hljs-template-variable {
  color: #ce9178;
}

/* Function names / titles */
.hljs-title,
.hljs-title.function_ {
  color: #dcdcaa;
}

/* Types, classes */
.hljs-type,
.hljs-class .hljs-title,
.hljs-title.class_ {
  color: #4ec9b0;
}

/* Tag names (XML/HTML) */
.hljs-name {
  color: #569cd6;
}

/* Comments, meta */
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
  color: #6a9955;
}

/* Reset bold weight */
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-type,
.hljs-name,
.hljs-strong {
  font-weight: normal;
}

/* Numbers */
.hljs-number {
  color: #b5cea8;
}

/* Parameters, attributes */
.hljs-params,
.hljs-attr {
  color: #9cdcfe;
}

/* Variables */
.hljs-variable,
.hljs-attribute {
  color: #9cdcfe;
}

/* Built-in functions */
.hljs-built_in {
  color: #1bdbb5;
}

/* Regular expressions */
.hljs-regexp {
  color: #a8dac9;
}

.hljs-emphasis {
  font-style: italic;
}

/* --- Bash / shell highlighting --- */
.hljs-language-bash .hljs-variable,
.hljs-language-bash .hljs-subst {
  color: #9cdcfe;
}

.hljs-language-bash .hljs-built_in {
  color: #dcdcaa;
}

.hljs-language-bash .hljs-string {
  color: #ce9178;
}

.hljs-language-bash .hljs-keyword {
  color: #569cd6;
}

.hljs-language-bash .hljs-comment {
  color: #6a9955;
}

.hljs-language-bash .hljs-number {
  color: #b5cea8;
}

.hljs-language-bash .hljs-literal {
  color: #569cd6;
}

/* --- ABNF highlighting --- */
.hljs-language-abnf .hljs-attribute {
  color: #9cdcfe;
}

.hljs-language-abnf .hljs-symbol {
  color: #d4d4d4;
}

.hljs-language-abnf .hljs-string {
  color: #ce9178;
}

.hljs-language-abnf .hljs-comment {
  color: #6a9955;
}

.hljs-language-abnf .hljs-keyword {
  color: #569cd6;
}

/* --- XML doc comments (/// <summary> etc.) --- */
.hljs-doctag,
.hljs-tag,
.hljs-name {
  color: #608b4e;
}

.hljs-tag .hljs-attr {
  color: #9cdcfe;
}

.hljs-tag .hljs-string {
  color: #ce9178;
}

/* XML comment content — green like comments */
.hljs-comment .hljs-doctag,
.hljs-comment .hljs-tag,
.hljs-comment .hljs-name {
  color: #6a9955;
}

/* --- Inline code in documentation text --- */
code {
  color: #d4d4d4;
  background-color: #2d2d2d;
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid #3c3c3c;
}

a code {
  color: #4fc1ff;
  background-color: #2d2d2d;
}

/* =============================================
   LAYOUT — use the full window width
   The default Bootstrap container is centered with a fixed max-width, which
   leaves a large empty strip on the left and squeezes the content on wide
   screens. Span the whole width and let the three panes fill it.
   ============================================= */

/* Container spans the viewport instead of a centered fixed-width band */
.container,
.container.body-content {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Left table of contents / filter pinned to the left edge, a bit wider */
.sidefilter {
  left: 0;
  width: 320px;
}
.sidetoc {
  left: 0;
  width: 320px;
}

/* Main content fills the gap between the left TOC and the right outline.
   Left rail = sidebar 320 at left:0, content margin-left 336 -> 16 px gap.
   Right rail = affix width 220 at right:16 (rail 236); margin-right 252 mirrors
   the 16 px gap (336 - (320 - 236)), so both gaps are visually symmetric. */
.article.grid-right {
  margin-left: 336px;
  margin-right: 212px;
}

/* The content sits in a Bootstrap .col-md-10 with an empty .col-md-2 beside it
   (the in-page outline is fixed-positioned separately). Let the content column
   fill the whole article area and drop the empty placeholder column's width,
   otherwise ~17% is wasted between the content and the outline. */
.article.grid-right .col-md-10 {
  width: 100%;
}
.article.grid-right .col-md-2 {
  width: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Right in-page outline pinned to the right edge (narrow footprint so the
   content can extend and the right gap matches the left one) */
.sideaffix {
  right: 12px;
  width: 200px;
}

/* Breadcrumb aligns with the content column */
.subnav .breadcrumb {
  padding-left: 336px;
}

/* Readability: larger body text and comfortable line spacing */
.article {
  font-size: 15px;
  line-height: 1.65;
}
.article h1 { font-size: 30px; }
.article h2 { font-size: 23px; }
.article h3 { font-size: 19px; }
.article p,
.article li { max-width: 100ch; }

/* On narrow screens fall back to the stacked mobile layout */
@media only screen and (max-width: 768px) {
  .article.grid-right { margin-left: 0; margin-right: 0; padding-right: 0; }
  .subnav .breadcrumb { padding-left: 15px; }
}

/* =============================================
   SPRUTCAM LIGHT THEME
   Mirrors the light surfaces, graphite text and red accent of sprut.ru.
   ============================================= */
:root {
  color-scheme: light;
  --sprut-ink: #1f1f1f;
  --sprut-muted: #68727b;
  --sprut-line: #dfe3e5;
  --sprut-canvas: #f4f6f7;
  --sprut-panel: #ffffff;
  --sprut-soft: #eceff0;
  --sprut-red: #ff3333;
  --sprut-red-dark: #d92323;
}

html,
body,
#wrapper {
  color: var(--sprut-ink);
  background: var(--sprut-canvas);
  font-family: Onest, "Segoe UI", Arial, sans-serif;
}

a,
a code,
.card-link {
  color: var(--sprut-red-dark);
}

a:hover,
a:focus,
a code:hover {
  color: var(--sprut-red);
}

a.disable,
a.disable:hover,
.declaration,
.fieldValue,
.parameters,
.returns {
  color: var(--sprut-muted);
}

/* Top navigation */
.navbar,
header .navbar {
  background: var(--sprut-soft);
  border-color: var(--sprut-line);
}

.navbar .navbar-brand,
.navbar .navbar-nav > li > a,
.documentation-home-link {
  color: var(--sprut-ink);
}

.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus,
.navbar .navbar-nav > li > a:hover,
.navbar .navbar-nav > li > a:focus,
.documentation-home-link:hover,
.documentation-home-link:focus {
  color: var(--sprut-ink);
  background: var(--sprut-panel);
}

.navbar-brand img {
  filter: brightness(0) saturate(100%);
  opacity: .86;
}

.navbar-brand #logo g {
  fill: var(--sprut-ink);
}

.documentation-home-link {
  border-left-color: #d3d8db;
}

.documentation-home-link__arrow {
  color: var(--sprut-red);
}

.navbar-toggle,
.navbar-inverse .navbar-toggle {
  border-color: #cbd1d4;
}

.navbar-inverse .navbar-toggle .icon-bar {
  background-color: var(--sprut-ink);
}

.subnav.navbar,
.subnav.navbar-default {
  background: rgba(255, 255, 255, .96);
  border-color: var(--sprut-line);
  box-shadow: 0 5px 18px rgba(9, 8, 9, .035);
}

/* Left navigation and filters */
.sidenav,
.fixed_header,
.toc,
.sidetoc,
.sidefilter,
body .toc {
  color: var(--sprut-ink);
  background: var(--sprut-panel);
  border-color: var(--sprut-line);
}

.sidetoc,
.sidefilter {
  border-left-color: var(--sprut-line);
  border-right-color: var(--sprut-line);
}

.toc-filter,
.docs-search {
  color: var(--sprut-ink);
  background: var(--sprut-soft);
  border-color: var(--sprut-line);
}

.toc-filter > input,
.docs-search > .search-query,
#search-query,
.form-control {
  color: var(--sprut-ink);
  background: transparent;
}

.toc-filter > input::placeholder,
.docs-search > .search-query::placeholder,
#search-query::placeholder {
  color: #899197;
}

.toc .nav > li > a,
.affix ul > li > a {
  color: #3f474d;
}

.toc .nav > li > a:hover,
.toc .nav > li > a:focus,
.affix ul > li > a:hover {
  color: var(--sprut-ink);
  background: #f8f9f9;
}

.toc .nav > li.active > a,
.affix ul > li.active > a,
.affix ul > li.active > a:before {
  color: var(--sprut-red-dark);
}

.affix > ul > li > a:before,
.divider {
  color: #a7b1b9;
}

.affix h5 {
  color: var(--sprut-ink);
}

/* Article and headings */
.article,
.sideaffix,
.affix {
  color: var(--sprut-ink);
  background: var(--sprut-panel);
}

h1,
.h1 {
  color: var(--sprut-ink);
  border-bottom-color: var(--sprut-red);
}

h2,
.h2 {
  color: #272b2e;
  border-bottom-color: #cfd5d8;
}

h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  color: #3a4146;
}

.breadcrumb {
  color: var(--sprut-muted);
  background: transparent;
}

.breadcrumb > li + li:before {
  color: #a7b1b9;
}

hr {
  border-color: var(--sprut-line);
}

/* Code and API reference */
code,
a code {
  color: #9b2929;
  background: #f3f4f5;
  border-color: #dfe3e5;
}

pre,
.hljs,
.hljs-subst {
  color: var(--sprut-ink);
  background: #f7f8f8;
  border-color: var(--sprut-line);
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link,
.hljs-language-bash .hljs-keyword,
.hljs-language-bash .hljs-literal,
.hljs-language-abnf .hljs-keyword {
  color: #0000b8;
}

.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-template-tag,
.hljs-template-variable,
.hljs-language-bash .hljs-string,
.hljs-language-abnf .hljs-string,
.hljs-tag .hljs-string {
  color: #a31515;
}

.hljs-title,
.hljs-title.function_,
.hljs-language-bash .hljs-built_in {
  color: #795e26;
}

.hljs-type,
.hljs-class .hljs-title,
.hljs-title.class_,
.hljs-built_in {
  color: #267f99;
}

.hljs-name,
.hljs-language-abnf .hljs-attribute,
.hljs-tag .hljs-attr,
.hljs-params,
.hljs-attr,
.hljs-variable,
.hljs-attribute,
.hljs-language-bash .hljs-variable,
.hljs-language-bash .hljs-subst {
  color: #001080;
}

.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta,
.hljs-language-bash .hljs-comment,
.hljs-language-abnf .hljs-comment,
.hljs-comment .hljs-doctag,
.hljs-comment .hljs-tag,
.hljs-comment .hljs-name {
  color: #008000;
}

.hljs-number,
.hljs-language-bash .hljs-number {
  color: #098658;
}

.hljs-language-abnf .hljs-symbol {
  color: var(--sprut-ink);
}

.hljs-doctag,
.hljs-tag,
.hljs-name {
  color: #800000;
}

.inheritance h5,
.inheritedMembers h5 {
  color: #267f99;
  border-bottom-color: var(--sprut-line);
}

#fields,
#properties,
#methods,
#events {
  color: #795e26;
}

/* Tables, callouts, tabs and pagination */
.table > thead > tr > th,
.table > tbody > tr > td {
  color: var(--sprut-ink);
  border-color: var(--sprut-line);
}

.table > thead > tr > th {
  background: var(--sprut-soft);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background: #fafafa;
}

.table-striped > tbody > tr:nth-of-type(even) {
  background: var(--sprut-panel);
}

.alert-info {
  color: #14556c;
  background: #eaf7fb;
  border-color: #b9dce7;
}

.alert-warning {
  color: #6d5212;
  background: #fff8df;
  border-color: #ead99a;
}

.alert-danger {
  color: #8e2020;
  background: #fff0f0;
  border-color: #efc0c0;
}

.grad-top {
  background: linear-gradient(rgba(244, 246, 247, .9), rgba(244, 246, 247, 0));
}

.grad-bottom {
  background: linear-gradient(rgba(244, 246, 247, 0), rgba(244, 246, 247, .9));
}

.tabGroup a[role="tab"] {
  color: var(--sprut-muted);
  border-bottom-color: var(--sprut-line);
}

.tabGroup a[role="tab"]:hover,
.tabGroup a[role="tab"]:focus,
.tabGroup a[role="tab"][aria-selected="true"] {
  color: var(--sprut-red-dark);
  border-bottom-color: var(--sprut-red);
}

.tabGroup section[role="tabpanel"] {
  color: var(--sprut-ink);
  background: var(--sprut-panel);
  border-color: var(--sprut-line);
}

.pagination > li > a {
  color: var(--sprut-red-dark);
  background: var(--sprut-panel);
  border-color: var(--sprut-line);
}

.pagination > .active > a,
.pagination > .active > a:hover {
  color: #ffffff;
  background: var(--sprut-red);
  border-color: var(--sprut-red);
}

/* Search results rendered by main.js */
#search-results {
  color: var(--sprut-ink);
}

#search-results mark,
article mark {
  padding: 0 .08em;
  color: inherit;
  background: #ffe783;
  border-radius: 2px;
}

.search-results-container {
  color: var(--sprut-ink);
  background: rgba(255, 255, 255, .98);
  border-top-color: var(--sprut-line);
}

#toc-member-results,
#toc-filter-tags {
  color: var(--sprut-ink) !important;
  background: var(--sprut-panel) !important;
  border-color: var(--sprut-line) !important;
  box-shadow: 0 12px 30px rgba(9, 8, 9, .14) !important;
}

.toc-member-result {
  color: #394147 !important;
  border-bottom-color: #edf0f1 !important;
}

.toc-member-result:hover {
  color: var(--sprut-ink) !important;
  background: #fff1f1 !important;
}

#toc-member-results::-webkit-scrollbar-thumb {
  background: #c6cdd1 !important;
}

/* Footer and scrollbars */
.footer {
  color: var(--sprut-muted);
  background: var(--sprut-soft);
  border-top-color: var(--sprut-line);
}

::-webkit-scrollbar-track {
  background: #edf0f1;
}

::-webkit-scrollbar-thumb {
  background: #c4cbd0;
}

::-webkit-scrollbar-thumb:hover {
  background: #a7b1b9;
}

@media only screen and (max-width: 768px) {
  .article,
  .sideaffix,
  .affix {
    background: var(--sprut-panel);
  }
}
