/* ===================================================================
   Scylla navbar logo (replaces DocFX default "D" logo)
   Sized to fit the classic DocFX navbar height. Round PNG so we apply
   border-radius: 50% to keep it visually circular.
   =================================================================== */

.navbar-brand {
	padding-top: 10px;
	padding-bottom: 10px;
}

.navbar-brand #logo {
	height: 30px;
	width: 30px;
	border-radius: 50%;
	display: inline-block;
	vertical-align: middle;
}


/* ===================================================================
   Theme toggle button
   =================================================================== */

.btn-theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  margin-top: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.btn-theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

/* Show sun in dark mode (to switch to light), moon in light mode (to switch to dark) */
[data-theme="dark"] .theme-icon-light { display: inline; }
[data-theme="dark"] .theme-icon-dark  { display: none; }
html:not([data-theme="dark"]) .theme-icon-light { display: none; }
html:not([data-theme="dark"]) .theme-icon-dark  { display: inline; }

/* ===================================================================
   Dark mode overrides
   =================================================================== */

[data-theme="dark"] body {
  background-color: #1e1e1e;
  color: #d4d4d4;
}

[data-theme="dark"] #wrapper {
  background-color: #1e1e1e;
}

[data-theme="dark"] .article {
  background-color: #1e1e1e;
}

/* --- Links --- */

[data-theme="dark"] a,
[data-theme="dark"] button:not(.btn-theme-toggle) {
  color: #6cb4ee;
}

[data-theme="dark"] a:hover,
[data-theme="dark"] a:focus,
[data-theme="dark"] button:not(.btn-theme-toggle):hover,
[data-theme="dark"] button:not(.btn-theme-toggle):focus {
  color: #8ccbff;
}

[data-theme="dark"] a.disable,
[data-theme="dark"] a.disable:hover {
  color: #888;
}

[data-theme="dark"] a code {
  color: #6cb4ee;
}

[data-theme="dark"] a code:hover {
  color: #8ccbff;
}

/* --- Headings --- */

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #e0e0e0;
}

/* --- Navbar --- */

[data-theme="dark"] .navbar-inverse {
  background-color: #252526;
  border-color: #333;
}

/* --- Sidebar / TOC --- */

[data-theme="dark"] .sidenav,
[data-theme="dark"] .fixed_header,
[data-theme="dark"] body .toc,
[data-theme="dark"] .sidetoc,
[data-theme="dark"] .sidetoggle.collapse {
  background-color: #252526;
}

[data-theme="dark"] .sidetoc {
  border-left-color: #333;
  border-right-color: #333;
}

[data-theme="dark"] .toc .nav > li > a {
  color: #b0b0b0;
}

[data-theme="dark"] .toc .nav > li > a:hover,
[data-theme="dark"] .toc .nav > li > a:focus {
  color: #e0e0e0;
  background-color: #2d2d2d;
}

[data-theme="dark"] .toc .nav > li.active > a {
  color: #6cb4ee;
}

[data-theme="dark"] .toc .nav > li.active > a:hover,
[data-theme="dark"] .toc .nav > li.active > a:focus {
  color: #8ccbff;
}

/* --- Breadcrumb / subnav bar --- */

[data-theme="dark"] .subnav,
[data-theme="dark"] .subnav.navbar-default {
  background-color: #252526;
  background-image: none;
  border-color: #333;
}

[data-theme="dark"] #breadcrumb {
  background-color: #252526;
}

[data-theme="dark"] #breadcrumb .breadcrumb > li + li:before {
  color: #666;
}

[data-theme="dark"] .breadcrumb > li a {
  color: #b0b0b0;
}

/* --- Content area --- */

[data-theme="dark"] .content {
  background-color: #1e1e1e;
}

/* --- Code blocks --- */

[data-theme="dark"] code {
  color: #ce9178;
  background-color: #2d2d2d;
}

[data-theme="dark"] pre {
  background-color: #1e1e1e;
  border-color: #333;
  color: #d4d4d4;
}

[data-theme="dark"] pre code {
  background-color: transparent;
  color: #d4d4d4;
}

/* --- Tables (both Bootstrap .table and plain <table>) --- */

[data-theme="dark"] table,
[data-theme="dark"] .table {
  border-color: #333;
}

[data-theme="dark"] table thead th,
[data-theme="dark"] table thead td,
[data-theme="dark"] .table > thead > tr > th,
[data-theme="dark"] .table > thead > tr > td {
  background-color: #2d2d2d;
  border-color: #444;
  border-bottom-color: #444;
  color: #e0e0e0;
}

[data-theme="dark"] table tbody td,
[data-theme="dark"] .table > tbody > tr > td {
  border-color: #333;
  background-color: #1e1e1e;
  color: #d4d4d4;
}

[data-theme="dark"] table tbody tr:nth-child(even) td,
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) {
  background-color: #252526;
}

[data-theme="dark"] table tbody tr:nth-child(odd) td,
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #1e1e1e;
}

[data-theme="dark"] .table-bordered,
[data-theme="dark"] .table-bordered > thead > tr > th,
[data-theme="dark"] .table-bordered > thead > tr > td,
[data-theme="dark"] .table-bordered > tbody > tr > th,
[data-theme="dark"] .table-bordered > tbody > tr > td {
  border-color: #333;
}

/* --- Panels and wells --- */

[data-theme="dark"] .panel {
  background-color: #252526;
  border-color: #333;
}

[data-theme="dark"] .panel-default > .panel-heading {
  background-color: #2d2d2d;
  border-color: #333;
  color: #d4d4d4;
}

[data-theme="dark"] .well {
  background-color: #252526;
  border-color: #333;
}

/* --- Alerts --- */

[data-theme="dark"] .alert-info {
  background-color: #1a3a4a;
  border-color: #2a5a7a;
  color: #8ccbff;
}

[data-theme="dark"] .alert-warning {
  background-color: #3a3520;
  border-color: #5a5530;
  color: #e0c878;
}

[data-theme="dark"] .alert-danger {
  background-color: #3a1a1a;
  border-color: #5a2a2a;
  color: #f08080;
}

/* --- Search --- */

[data-theme="dark"] .docs-search {
  background-color: #2d2d2d;
}

[data-theme="dark"] .form-control {
  background-color: #2d2d2d;
  border-color: #444;
  color: #d4d4d4;
}

[data-theme="dark"] .form-control:focus {
  border-color: #6cb4ee;
}

/* --- Footer --- */

[data-theme="dark"] footer,
[data-theme="dark"] .footer {
  background-color: #252526;
  border-top-color: #333;
  color: #888;
}

/* --- Affix (right sidebar "In This Article") --- */

[data-theme="dark"] .affix ul > li > a {
  color: #888;
}

[data-theme="dark"] .affix ul > li > a:hover,
[data-theme="dark"] .affix ul > li.active > a {
  color: #6cb4ee;
}

[data-theme="dark"] .affix h5 {
  color: #b0b0b0;
}

[data-theme="dark"] .sideaffix > div.contribution > ul > li > a.contribution-link:hover {
  background-color: #2d2d2d;
}

/* --- Sidefilter (TOC filter input area) --- */

[data-theme="dark"] .sidefilter {
  background-color: #252526;
  border-left-color: #333;
  border-right-color: #333;
}

[data-theme="dark"] .toc-filter {
  background-color: #2d2d2d;
  border-color: #444;
  color: #d4d4d4;
}

[data-theme="dark"] .toc-filter > input {
  background-color: #2d2d2d;
  color: #d4d4d4;
}

/* --- Gradient blends at header/footer edges --- */

[data-theme="dark"] .grad-top {
  background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0));
}

[data-theme="dark"] .grad-bottom {
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.02));
}

/* --- Try button --- */

[data-theme="dark"] .tryspan {
  background-color: #2d2d2d;
  border-color: #555;
  color: #b0b0b0;
}

/* --- Syntax highlighting --- */

[data-theme="dark"] .hljs-keyword { color: rgb(86, 156, 214); }
[data-theme="dark"] .hljs-string  { color: rgb(214, 157, 133); }
[data-theme="dark"] .hljs-title   { color: rgb(220, 220, 170); }
[data-theme="dark"] .hljs-comment { color: rgb(106, 153, 85); }
[data-theme="dark"] .hljs-number  { color: rgb(181, 206, 168); }
[data-theme="dark"] .hljs-literal { color: rgb(86, 156, 214); }
[data-theme="dark"] .hljs-type    { color: rgb(78, 201, 176); }

/* --- Horizontal rules --- */

[data-theme="dark"] hr {
  border-top-color: #444;
}

/* --- Misc text --- */

[data-theme="dark"] .small {
  color: #888;
}

[data-theme="dark"] mark,
[data-theme="dark"] .highlight-text {
  background-color: #555522;
  color: #e0e0e0;
}

[data-theme="dark"] .inheritance .level0:before,
[data-theme="dark"] .inheritance .level1:before,
[data-theme="dark"] .inheritance .level2:before,
[data-theme="dark"] .inheritance .level3:before,
[data-theme="dark"] .inheritance .level4:before,
[data-theme="dark"] .inheritance .level5:before {
  color: #888;
}

[data-theme="dark"] blockquote {
  border-left-color: #444;
  color: #b0b0b0;
}

/* --- Search results overlay --- */

[data-theme="dark"] .search-list {
  background-color: #252526;
  border-color: #333;
}

[data-theme="dark"] .search-list .e-list-item:hover {
  background-color: #2d2d2d;
}

/* --- Container body for search results --- */

[data-theme="dark"] .body-content {
  background-color: #1e1e1e;
}
