/*
 * VERA documentation theme
 *
 * Keeps Material's behavior and accessibility while borrowing the restrained
 * compact API presentation and symbol-rich navigation used by documentation
 * sites such as Docling, while retaining the VERA desktop app palette.
 */

:root {
  --vera-radius: 0.55rem;
  --md-primary-fg-color: #2563eb;
  --md-primary-fg-color--light: #3b82f6;
  --md-primary-fg-color--dark: #1d4ed8;
  --md-accent-fg-color: #2563eb;
  --md-accent-fg-color--transparent: rgba(37, 99, 235, 0.1);
  --vera-border-light: color-mix(in srgb, var(--md-default-fg-color) 14%, transparent);
  --vera-surface-light: color-mix(in srgb, var(--md-default-bg-color) 94%, var(--md-primary-fg-color));
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #181818;
  --md-default-bg-color--light: #202020;
  --md-default-bg-color--lighter: #292929;
  --md-code-bg-color: #202020;
  --md-default-fg-color: #cccccc;
  --md-default-fg-color--light: #9d9d9d;
  --md-accent-fg-color: #6ea0f7;
  --md-accent-fg-color--transparent: rgba(110, 160, 247, 0.1);
  --vera-border-light: rgba(255, 255, 255, 0.12);
  --vera-surface-light: #202020;
}

/* Let both navigation bars blend into the page; reserve blue for accents. */
.md-header,
.md-tabs {
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
}

.md-header {
  box-shadow: none;
}

.md-tabs {
  border-bottom: 1px solid var(--vera-border-light);
  box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.08);
}

.md-search__form {
  background: var(--vera-surface-light);
  border: 1px solid var(--vera-border-light);
  border-radius: var(--vera-radius);
}

.md-search__input::placeholder {
  color: var(--md-default-fg-color--light);
}

.md-tabs__link {
  font-weight: 600;
  opacity: 0.82;
}

.md-tabs__item--active .md-tabs__link,
.md-tabs__link:hover {
  opacity: 1;
}

.md-tabs__item--active {
  box-shadow: inset 0 -0.14rem 0 var(--md-accent-fg-color);
}

/* Keep the VERA document mark crisp in both palettes. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  border-radius: 0.3rem;
}

/* Improve long-form guide readability without constraining API signatures. */
.md-content__inner {
  margin-bottom: 2rem;
}

.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

.md-typeset h2 {
  border-bottom: 1px solid var(--vera-border-light);
  padding-bottom: 0.3rem;
}

.md-typeset a:not(.headerlink) {
  text-underline-offset: 0.14em;
}

/* Polished surfaces for examples and structured content. */
.md-typeset pre > code,
.md-typeset .highlight pre {
  border-radius: var(--vera-radius);
}

.md-typeset .highlight {
  border: 1px solid var(--vera-border-light);
  border-radius: var(--vera-radius);
  overflow: hidden;
}

.md-typeset table:not([class]) {
  border: 1px solid var(--vera-border-light);
  border-radius: var(--vera-radius);
  box-shadow: none;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background: var(--vera-surface-light);
  font-weight: 700;
}

.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--vera-radius);
  box-shadow: 0 0.15rem 0.45rem rgba(0, 0, 0, 0.1);
}

/* Make generated API objects easier to scan. */
.md-typeset .doc-object {
  border-left: 0.15rem solid
    color-mix(in srgb, var(--md-accent-fg-color) 72%, transparent);
  margin: 1.4rem 0;
  padding-left: 1rem;
}

.md-typeset .doc-heading {
  scroll-margin-top: 6rem;
}

.md-typeset .doc-signature {
  background: var(--vera-surface-light);
  border: 1px solid var(--vera-border-light);
  border-radius: var(--vera-radius);
  padding: 0.65rem 0.8rem;
}

/* Compact API-kind badges in headings and the table of contents. */
html body code.doc-symbol-module::after {
  content: "mod";
}

html body code.doc-symbol-class::after {
  content: "c";
}

html body code.doc-symbol-attribute::after {
  content: "a";
}

html body code.doc-symbol-method::after {
  content: "m";
}

html body code.doc-symbol-function::after {
  content: "f";
}

html body code.doc-symbol-parameter::after {
  content: "p";
}

html body code.doc-symbol-type_parameter::after {
  content: "tp";
}

html body code.doc-symbol-type_alias::after {
  content: "t";
}

html body code.doc-symbol:not(.doc-symbol-module) {
  min-width: 1.15rem;
  text-align: center;
}

/* Material card grids remain available for future package landing pages. */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > ol > li {
  background: var(--vera-surface-light);
  border-color: var(--vera-border-light);
  border-radius: var(--vera-radius);
  transition:
    border-color 150ms ease,
    transform 150ms ease;
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > ol > li:hover {
  border-color: var(--md-accent-fg-color);
  transform: translateY(-0.1rem);
}

@media screen and (max-width: 76.234375em) {
  .md-tabs {
    box-shadow: none;
  }
}
