/* ── Xybern brand colors for Material slate scheme ── */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color:         #6C5CE7;
  --md-primary-fg-color--light:  #9A8EF0;
  --md-primary-fg-color--dark:   #4A3BC7;
  --md-accent-fg-color:          #9A8EF0;
  --md-default-bg-color:         #0D0B16;
  --md-default-bg-color--light:  #100D1E;
  --md-default-bg-color--lighter:#150F24;
  --md-default-fg-color:         rgba(255,255,255,0.87);
  --md-default-fg-color--light:  rgba(255,255,255,0.60);
  --md-code-bg-color:            #100D1E;
  --md-code-fg-color:            #e2e8f0;
}

/* ── Header ── */
.md-header {
  background-color: #100D1E;
  border-bottom: 1px solid #1E1830;
  box-shadow: none;
}

/* Remove grid max-width constraint so header spans full width */
.md-header .md-grid {
  max-width: 100%;
  padding-left: 0.8rem;
  padding-right: 0.8rem;
}

.md-header__brand-text {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

.md-header__brand-text:hover {
  color: #9A8EF0;
}

/* Center nav by splitting free space equally on both sides */
.md-search {
  margin-left: auto;
}

/* ── Inline nav in header ── */
.md-header__nav-inline {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media screen and (min-width: 60em) {
  .md-header__nav-inline {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
    flex-shrink: 0;
  }
}

.md-header__nav-item {
  list-style: none;
}

.md-header__nav-link {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 0.65rem;
  line-height: 2.4rem;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
  letter-spacing: 0.01em;
}

.md-header__nav-link:hover {
  color: #fff;
}

.md-header__nav-item--active .md-header__nav-link {
  color: #fff;
  border-bottom: 2px solid #6C5CE7;
}

/* Hide Material tab bar — we use our own inline nav in the header */
.md-tabs {
  display: none;
}

/* ── Left sidebar ── */
.md-sidebar {
  background-color: #0D0B16;
}

.md-sidebar--primary .md-sidebar__inner::before {
  content: "Xybern Docs";
  display: block;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 0.6rem 0.4rem;
}

.md-nav__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 0.6rem 0.6rem 0.3rem;
}

/* Fix text being cut — allow wrapping */
.md-nav__link {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.4;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.md-nav__item .md-nav__link--active,
.md-nav__item .md-nav__link:hover {
  color: #9A8EF0 !important;
}

/* ── Right sidebar (TOC) ── */
.md-sidebar--secondary .md-nav__title {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.md-sidebar--secondary .md-nav__link {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.54);
}

.md-sidebar--secondary .md-nav__link:hover,
.md-sidebar--secondary .md-nav__link--active {
  color: #9A8EF0 !important;
}

/* ── Content area ── */
.md-content {
  max-width: 860px;
}

/* ── Code blocks ── */
.md-typeset pre {
  background-color: #100D1E;
  border: 1px solid #1E1830;
  border-radius: 6px;
}

.md-typeset code {
  background-color: #1A1530;
  color: #9A8EF0;
  border-radius: 3px;
  padding: 0.1em 0.3em;
  font-size: 0.85em;
}

.md-typeset pre code {
  background: none;
  color: #e2e8f0;
  padding: 0;
}

/* ── Tables ── */
.md-typeset table:not([class]) {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #1E1830;
}

.md-typeset table:not([class]) th {
  background-color: #1A1530;
  color: #9A8EF0;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.md-typeset table:not([class]) tr:nth-child(even) {
  background-color: #0F0C1A;
}

/* ── Admonitions ── */
.md-typeset .admonition,
.md-typeset details {
  border-left-color: #6C5CE7;
  background-color: #100D1E;
  border-radius: 0 6px 6px 0;
}

.md-typeset .admonition-title,
.md-typeset summary {
  background-color: rgba(108,92,231,0.15);
  color: #9A8EF0;
}

/* Warning admonition */
.md-typeset .admonition.warning {
  border-left-color: #F59E0B;
}
.md-typeset .admonition.warning .admonition-title {
  background-color: rgba(245,158,11,0.15);
  color: #F59E0B;
}

/* ── Footer ── */
.md-footer {
  background-color: #100D1E;
  border-top: 1px solid #1E1830;
}

.md-footer-meta {
  background-color: #0D0B16;
}

/* ── Search ── */
.md-search__input {
  background-color: #1A1530;
  border: 1px solid #2A2040;
  border-radius: 4px;
}

/* ── Headings ── */
.md-typeset h1 {
  color: #FFFFFF;
  font-weight: 700;
}

.md-typeset h2 {
  color: rgba(255,255,255,0.87);
  border-bottom: 1px solid #1E1830;
  padding-bottom: 0.3em;
}

.md-typeset h3 {
  color: rgba(255,255,255,0.75);
}
