/*
 * Styling for the OpenAPI reference rendered by the neoteroi.mkdocsoad plugin
 * (docs/manual/reference/api.md).
 *
 * Vendored on purpose. The plugin ships no stylesheet and its upstream one is fetched from the
 * web; the manual is served from the appliance itself with no outbound network access, so every
 * asset must live in the repository. Colours are expressed with Material's own CSS custom
 * properties wherever possible so the page follows the reader's light/dark palette.
 */

/* ── HTTP method badges ─────────────────────────────────────────────────────────────────────── */

.md-typeset [class^="http-"] {
  display: inline-block;
  min-width: 4.4em;
  margin-right: 0.5em;
  padding: 0.1em 0.55em;
  border-radius: 0.2rem;
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  vertical-align: 0.16em;
  color: #fff;
}

/* Conventional verb colours, dark enough for white text in both palettes. */
.md-typeset .http-get {
  background-color: #1565c0;
}
.md-typeset .http-post {
  background-color: #2e7d32;
}
.md-typeset .http-put {
  background-color: #ef6c00;
}
.md-typeset .http-patch {
  background-color: #6a1b9a;
}
.md-typeset .http-delete {
  background-color: #c62828;
}
.md-typeset .http-head,
.md-typeset .http-options {
  background-color: #455a64;
}

/* Slate needs a lift — the same hues read as muddy against a dark background. */
[data-md-color-scheme="slate"] .md-typeset .http-get {
  background-color: #42a5f5;
  color: #0b1020;
}
[data-md-color-scheme="slate"] .md-typeset .http-post {
  background-color: #66bb6a;
  color: #0b1020;
}
[data-md-color-scheme="slate"] .md-typeset .http-put {
  background-color: #ffa726;
  color: #0b1020;
}
[data-md-color-scheme="slate"] .md-typeset .http-patch {
  background-color: #ab47bc;
  color: #0b1020;
}
[data-md-color-scheme="slate"] .md-typeset .http-delete {
  background-color: #ef5350;
  color: #0b1020;
}
[data-md-color-scheme="slate"] .md-typeset .http-head,
[data-md-color-scheme="slate"] .md-typeset .http-options {
  background-color: #90a4ae;
  color: #0b1020;
}

/* Operation headings carry a path, so let them wrap rather than overflow on narrow screens. */
.md-typeset h3 {
  overflow-wrap: anywhere;
}

/* ── Tag and version chips ──────────────────────────────────────────────────────────────────── */

.md-typeset .api-tag,
.md-typeset .api-version {
  display: inline-block;
  padding: 0.05em 0.5em;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.2rem;
  background-color: var(--md-code-bg-color);
}

.md-typeset .api-version {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.8em;
}

/* ── Document preamble ──────────────────────────────────────────────────────────────────────── */

.md-typeset .info-data {
  margin: 0.6em 0;
  color: var(--md-default-fg-color--light);
  font-size: 0.85em;
}

/* ── Section labels above the request/response tab sets ─────────────────────────────────────── */

.md-typeset .request-body-title,
.md-typeset .responses-title {
  margin-bottom: 0.3em;
  color: var(--md-default-fg-color--light);
  font-size: 0.8em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Parameter and schema tables ────────────────────────────────────────────────────────────── */

/* Parameter names are identifiers — breaking "sessionCookie" across two lines makes the column
   harder to scan than a slightly wider table does. Material already scrolls wide tables. */
.md-typeset .parameter-name {
  white-space: nowrap;
}

.md-typeset .parameter-name code {
  font-weight: 700;
}

.md-typeset .route-param {
  font-family: var(--md-code-font-family, monospace);
  color: var(--md-accent-fg-color);
}

.md-typeset a.ref-link {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.9em;
}

/* Value types read as annotations, not prose. */
.md-typeset .string-type,
.md-typeset .boolean-type,
.md-typeset .null-type,
.md-typeset .format,
.md-typeset .date-time-format,
.md-typeset .alt-types {
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.85em;
  color: var(--md-default-fg-color--light);
}

.md-typeset .null-type {
  font-style: italic;
}

/* ── Auto-generated-example caveat ──────────────────────────────────────────────────────────── */

.md-typeset .small-note {
  font-size: 0.78em;
  color: var(--md-default-fg-color--light);
}

.md-typeset em.small-note.warning {
  font-style: italic;
}

/* ── Separator between operations ───────────────────────────────────────────────────────────── */

.md-typeset hr.operation-separator {
  margin: 2.2em 0 1.4em;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}
