/* NOV-401 — NovumOS branding for the self-hosted API reference at /docs.
 *
 * Ours, not vendored. Loaded AFTER swagger-ui.css so the few overrides below
 * win. Deliberately small: this is a chrome + palette pass over stock Swagger
 * UI, not a re-skin, so a swagger-ui-dist bump can't silently break the page.
 * Served from /docs/assets/ as an external stylesheet (no inline <style>), so
 * the /docs CSP needs no style-src exception of its own beyond the
 * inline-style ATTRIBUTES swagger-ui itself sets at runtime.
 */

:root {
  --nov-ink: #0f172a;
  --nov-paper: #ffffff;
  --nov-muted: #64748b;
  --nov-line: #e2e8f0;
  --nov-accent: #4338ca;
}

body {
  margin: 0;
  background: var(--nov-paper);
  color: var(--nov-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ── Header: the "way back to the site" this ticket exists for ───────────── */
.nov-docs-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--nov-line);
  background: var(--nov-paper);
}

.nov-docs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--nov-ink);
  text-decoration: none;
}

.nov-docs-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.nov-docs-tag {
  color: var(--nov-muted);
  font-weight: 450;
}

.nov-docs-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-left: auto;
  font-size: 14px;
}

.nov-docs-nav a {
  color: var(--nov-accent);
  text-decoration: none;
}

.nov-docs-nav a:hover,
.nov-docs-nav a:focus-visible {
  text-decoration: underline;
}

/* ── Hint strip: the two things that make try-it-out actually work ───────── */
.nov-docs-hint {
  padding: 12px 24px;
  border-bottom: 1px solid var(--nov-line);
  background: #f8fafc;
  color: var(--nov-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.nov-docs-hint code {
  padding: 1px 5px;
  border: 1px solid var(--nov-line);
  border-radius: 4px;
  background: var(--nov-paper);
  color: var(--nov-ink);
  font-size: 12.5px;
}

/* ── Swagger UI overrides ────────────────────────────────────────────────── */
.swagger-ui .topbar {
  /* Stock Swagger UI's green topbar carries the Swagger wordmark and a spec
     URL box. We ship our own header instead. */
  display: none;
}

.swagger-ui .info {
  margin: 28px 0;
}

.swagger-ui .info .title {
  color: var(--nov-ink);
}

.swagger-ui .scheme-container {
  box-shadow: none;
  border-bottom: 1px solid var(--nov-line);
}

/* swagger-ui-dist ships ~250 dark rules gated on a `dark-mode` class on <html>
 * (no prefers-color-scheme media query of its own). novumos-docs.js sets that
 * class from the OS preference; these repaint OUR chrome in lockstep, so the
 * header never stays white above a dark reference. */
html.dark-mode {
  --nov-ink: #e2e8f0;
  --nov-paper: #0f172a;
  --nov-muted: #94a3b8;
  --nov-line: #1e293b;
  --nov-accent: #a5b4fc;
}

html.dark-mode .nov-docs-hint {
  background: #111c33;
}
