@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root,
[data-bs-theme="light"] {
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, sans-serif;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, sans-serif;

  --bs-primary: #9C27B0;
  --bs-primary-rgb: 156, 39, 176;

  --bs-link-color: #9C27B0;
  --bs-link-color-rgb: 156, 39, 176;
  --bs-link-hover-color: #7B1FA2;
  --bs-link-hover-color-rgb: 123, 31, 162;

  --bs-body-color: #1F2937;
  --bs-heading-color: #140F1F;

  --bs-primary-text-emphasis: #7B1FA2;
  --bs-primary-bg-subtle: #F8F5FF;
  --bs-primary-border-subtle: #E9D5FF;
}

[data-bs-theme="dark"] {
  --bs-body-bg: #140F1F;
  --bs-body-color: #E9D5FF;

  --bs-primary: #C084FC;
  --bs-primary-rgb: 192, 132, 252;

  --bs-link-color: #C084FC;
  --bs-link-color-rgb: 192, 132, 252;
  --bs-link-hover-color: #E9D5FF;
  --bs-link-hover-color-rgb: 233, 213, 255;

  --bs-heading-color: #F8F5FF;

  --bs-primary-text-emphasis: #C084FC;
  --bs-primary-bg-subtle: #1e1530;
  --bs-primary-border-subtle: #3d2560;

  --bs-tertiary-bg: #1e1530;
  --bs-secondary-bg: #241a35;
}

/* Navbar */
.navbar {
  background-color: #140F1F !important;
  border-bottom: 1px solid rgba(156, 39, 176, 0.2);
}

[data-bs-theme="light"] .navbar {
  background-color: #F8F5FF !important;
  border-bottom: 1px solid #E9D5FF;
}

.navbar-brand {
  font-weight: 700 !important;
}

/* Sidebar nav active state */
.nav-link.active,
.nav-link:hover {
  color: #9C27B0 !important;
}

[data-bs-theme="dark"] .nav-link.active,
[data-bs-theme="dark"] .nav-link:hover {
  color: #C084FC !important;
}

/* TOC active item left border */
.docfx .toc .nav > li > a.active,
.docfx .toc .nav > li > a:hover {
  border-left-color: #9C27B0;
}

[data-bs-theme="dark"] .docfx .toc .nav > li > a.active,
[data-bs-theme="dark"] .docfx .toc .nav > li > a:hover {
  border-left-color: #C084FC;
}

/* Article headings */
article h1 {
  color: #140F1F;
  font-weight: 700;
  border-bottom: 2px solid #E9D5FF;
  padding-bottom: 0.3em;
}

[data-bs-theme="dark"] article h1 {
  color: #F8F5FF;
  border-bottom-color: rgba(192, 132, 252, 0.2);
}

article h2 {
  font-weight: 600;
  margin-top: 1.75em;
}

article h3 {
  margin-top: 1.5em;
}

/* Tables */
.table {
  --bs-table-striped-bg: #F8F5FF;
}

[data-bs-theme="dark"] .table {
  --bs-table-striped-bg: #1e1530;
}

th {
  background-color: #F8F5FF !important;
  color: #140F1F !important;
  font-weight: 600;
}

[data-bs-theme="dark"] th {
  background-color: #1e1530 !important;
  color: #E9D5FF !important;
}

/* Code blocks */
pre {
  border: 1px solid #E9D5FF;
  border-radius: 8px;
}

[data-bs-theme="dark"] pre {
  border-color: #3d2560;
  background-color: #1e1530 !important;
}

code {
  color: #9C27B0;
}

[data-bs-theme="dark"] code {
  color: #C084FC;
}

/* Alerts / callouts (DocFX NOTE, WARNING, etc.) */
.alert-info {
  background-color: #F8F5FF;
  border-color: #E9D5FF;
  color: #1F2937;
}

[data-bs-theme="dark"] .alert-info {
  background-color: #1e1530;
  border-color: #3d2560;
  color: #E9D5FF;
}

/* Footer */
.docfx footer {
  border-top: 1px solid #E9D5FF;
}

[data-bs-theme="dark"] .docfx footer {
  border-top-color: rgba(156, 39, 176, 0.2);
}

/* Search */
.search-results .search-item a {
  color: #9C27B0;
}

[data-bs-theme="dark"] .search-results .search-item a {
  color: #C084FC;
}

/* Breadcrumb */
.breadcrumb-item a {
  color: #9C27B0;
}

[data-bs-theme="dark"] .breadcrumb-item a {
  color: #C084FC;
}

/* Scroll to top button */
.btn-primary {
  --bs-btn-bg: #9C27B0;
  --bs-btn-border-color: #9C27B0;
  --bs-btn-hover-bg: #7B1FA2;
  --bs-btn-hover-border-color: #7B1FA2;
  --bs-btn-active-bg: #6A1B9A;
  --bs-btn-active-border-color: #6A1B9A;
}

[data-bs-theme="dark"] .btn-primary {
  --bs-btn-bg: #9C27B0;
  --bs-btn-border-color: #9C27B0;
  --bs-btn-hover-bg: #C084FC;
  --bs-btn-hover-border-color: #C084FC;
}

/* Selection color */
::selection {
  background-color: rgba(156, 39, 176, 0.2);
}

[data-bs-theme="dark"] ::selection {
  background-color: rgba(192, 132, 252, 0.3);
}
