/*
 * Dark palette override for davidhsaiou docs.
 * Maps the officialsite color tokens to Bootstrap 5 custom properties.
 * Source palette: OfficialSite.Frontend/wwwroot/app.css :root block.
 */

:root,
[data-bs-theme="dark"] {
  /* Core backgrounds */
  --bs-body-bg:           #0d1117;
  --bs-body-bg-rgb:       13, 17, 23;

  /* Surface (sidebar, cards) */
  --bs-secondary-bg:      #161b22;
  --bs-secondary-bg-rgb:  22, 27, 34;

  /* Tertiary surface (hover, nested) */
  --bs-tertiary-bg:       #1c2128;
  --bs-tertiary-bg-rgb:   28, 33, 40;

  /* Tile hover */
  --bs-card-bg:           #1c2128;

  /* Body text */
  --bs-body-color:        #f0f6fc;
  --bs-body-color-rgb:    240, 246, 252;

  /* Muted / secondary text */
  --bs-secondary-color:   #8b949e;
  --bs-secondary-color-rgb: 139, 148, 158;

  /* Accent / primary */
  --bs-primary:           #00d4ff;
  --bs-primary-rgb:       0, 212, 255;
  --bs-link-color:        #00d4ff;
  --bs-link-hover-color:  #33ddff;

  /* Borders */
  --bs-border-color:      #30363d;
  --bs-border-color-translucent: rgba(48, 54, 61, 0.5);
}

/* Ensure html root inherits the dark theme by default */
html {
  color-scheme: dark;
}

/* Navbar */
.navbar,
.navbar-default {
  background-color: #161b22 !important;
  border-bottom: 1px solid #30363d;
}

.navbar-brand,
.navbar-brand:hover {
  color: #f0f6fc !important;
}

.nav-link,
.nav-link:hover {
  color: #f0f6fc !important;
}

.nav-link.active,
.nav-link:focus {
  color: #00d4ff !important;
}

/* Sidebar */
.sidebar,
.affix,
.sidefilter,
.sidenav {
  background-color: #161b22 !important;
  border-right: 1px solid #30363d;
}

.sidebar a,
.sidenav a {
  color: #f0f6fc;
}

.sidebar a:hover,
.sidenav a:hover,
.sidebar a.active,
.sidenav a.active {
  color: #00d4ff;
}

/* Article / content area */
.article,
article {
  background-color: #0d1117;
  color: #f0f6fc;
}

/* Cards and tiles */
.card {
  background-color: #1c2128;
  border-color: #30363d;
  color: #f0f6fc;
}

.card:hover {
  background-color: #21262d;
  border-color: #00d4ff;
}

/* Code blocks */
pre,
code {
  background-color: #161b22 !important;
  border-color: #30363d !important;
  color: #f0f6fc !important;
}

/* Tables */
.table {
  --bs-table-bg: #0d1117;
  --bs-table-striped-bg: #161b22;
  --bs-table-hover-bg: #1c2128;
  --bs-table-border-color: #30363d;
  color: #f0f6fc;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
}

.breadcrumb-item a {
  color: #00d4ff;
}

.breadcrumb-item.active {
  color: #8b949e;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: #f0f6fc;
}

/* Horizontal rules */
hr {
  border-color: #30363d;
  opacity: 1;
}

/* Scrollbar (Webkit) */
::-webkit-scrollbar {
  background-color: #0d1117;
}

::-webkit-scrollbar-thumb {
  background-color: #30363d;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #8b949e;
}

/* Search input */
.search input,
#search-query {
  background-color: #161b22 !important;
  border-color: #30363d !important;
  color: #f0f6fc !important;
}

.search input:focus,
#search-query:focus {
  border-color: #00d4ff !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25) !important;
}

/* Footer */
footer,
.footer {
  background-color: #0d1117;
  border-top: 1px solid #30363d;
  color: #8b949e;
}

footer a,
.footer a {
  color: #00d4ff;
}

/* Docfx modern theme specific overrides */
.theme-switch-item {
  color: #f0f6fc;
}

.pagination .page-link {
  background-color: #161b22;
  border-color: #30363d;
  color: #f0f6fc;
}

.pagination .page-link:hover {
  background-color: #1c2128;
  color: #00d4ff;
}

.pagination .page-item.active .page-link {
  background-color: #00d4ff;
  border-color: #00d4ff;
  color: #0d1117;
}
