/* A dark theme for the API docs (FORD 7, `css:` in ford.md), in the colors of
   the website (web/style.css). FORD's pages use Bootstrap 5.3, whose colors
   are CSS variables: they are set here to dark values, and FORD's own light
   rules (local.css, pygments.css) are overridden after them. */

:root {
  color-scheme: dark;
  --bs-body-bg: #0b1020;
  --bs-body-bg-rgb: 11, 16, 32;
  --bs-body-color: #d7deee;
  --bs-body-color-rgb: 215, 222, 238;
  --bs-emphasis-color: #ffffff;
  --bs-emphasis-color-rgb: 255, 255, 255;
  --bs-heading-color: #e6ecf5;
  --bs-secondary-color: rgba(215, 222, 238, 0.7);
  --bs-secondary-color-rgb: 215, 222, 238;
  --bs-secondary-bg: #18203d;
  --bs-secondary-bg-rgb: 24, 32, 61;
  --bs-tertiary-color: rgba(215, 222, 238, 0.5);
  --bs-tertiary-bg: #111830;
  --bs-tertiary-bg-rgb: 17, 24, 48;
  --bs-border-color: #263052;
  --bs-border-color-translucent: rgba(148, 163, 255, 0.16);
  --bs-link-color: #5ec8ff;
  --bs-link-color-rgb: 94, 200, 255;
  --bs-link-hover-color: #9adcff;
  --bs-link-hover-color-rgb: 154, 220, 255;
  --bs-code-color: #e88fb8;
  --bs-highlight-bg: #4a3b12;
  --bs-light-rgb: 17, 24, 48;          /* .bg-light: FORD's panels and card headers */
  --bs-dark-rgb: 7, 10, 18;            /* .bg-dark: the navigation bar */
  --bs-primary-rgb: 42, 33, 74;        /* .bg-primary: the Contents panels' headers (a deep purple) */
}

body { background-color: var(--bs-body-bg); color: var(--bs-body-color); }

/* the navigation bar, as the website's */
.navbar.bg-dark { border-bottom: 1px solid var(--bs-border-color-translucent); }

/* cards, list groups and tables (their own variables, from the body's) */
.card { --bs-card-bg: #111830; --bs-card-cap-bg: #151d3a; --bs-card-border-color: var(--bs-border-color); }
.list-group { --bs-list-group-bg: #111830; --bs-list-group-color: var(--bs-body-color); --bs-list-group-border-color: var(--bs-border-color); }
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--bs-body-color);
  --bs-table-border-color: var(--bs-border-color);
  --bs-table-striped-bg: rgba(148, 163, 255, 0.05);
  --bs-table-striped-color: var(--bs-body-color);
  --bs-table-hover-bg: rgba(148, 163, 255, 0.08);
  --bs-table-hover-color: var(--bs-emphasis-color);
}
.form-control, .form-select { background-color: #0b1020; color: var(--bs-body-color); border-color: var(--bs-border-color); }
.dropdown-menu { --bs-dropdown-bg: #111830; --bs-dropdown-link-color: var(--bs-body-color); --bs-dropdown-link-hover-bg: #18203d; --bs-dropdown-border-color: var(--bs-border-color); }
hr { border-color: var(--bs-border-color); opacity: 1; }

/* FORD's local.css */
ol.hierarchy { background-color: #111830; border-color: var(--bs-border-color); box-shadow: none; }
.lineno, .linenos, td.linenos .normal, span.linenos { color: #5d6886 !important; background: transparent !important; border-color: var(--bs-border-color) !important; }

/* code: the website's code colors (pygments' classes, under FORD's .codehilite) */
pre, code { color: #d7deee; }
.codehilite, .codehilite pre, pre.codehilite, div.codehilite { background: #0a0f1e !important; }
.codehilite { border-radius: 8px; }
.codehilite .hll { background-color: #2a2412; }
.codehilite .c, .codehilite .ch, .codehilite .cm, .codehilite .c1, .codehilite .cs, .codehilite .cpf { color: #6c7aa3; font-style: italic; }
.codehilite .cp { color: #c9a26b; }
.codehilite .k, .codehilite .kc, .codehilite .kd, .codehilite .kn, .codehilite .kp, .codehilite .kr,
.codehilite .ow { color: #c792ea; font-weight: normal; }
.codehilite .kt, .codehilite .nb, .codehilite .bp { color: #82aaff; }
.codehilite .o { color: #89ddff; }
.codehilite .m, .codehilite .mb, .codehilite .mf, .codehilite .mh, .codehilite .mi, .codehilite .mo, .codehilite .il { color: #f78c6c; }
.codehilite .s, .codehilite .s1, .codehilite .s2, .codehilite .sa, .codehilite .sb, .codehilite .sc, .codehilite .dl,
.codehilite .sd, .codehilite .sh, .codehilite .sx, .codehilite .sr { color: #c3e88d; }
.codehilite .se, .codehilite .si { color: #89ddff; }
.codehilite .nf, .codehilite .fm, .codehilite .nc, .codehilite .nn { color: #82aaff; font-weight: normal; }
.codehilite .na, .codehilite .nl { color: #ffcb6b; }
.codehilite .no, .codehilite .ne { color: #ff9e80; }
.codehilite .nv, .codehilite .vc, .codehilite .vg, .codehilite .vi, .codehilite .vm, .codehilite .ss { color: #d7deee; }
.codehilite .nd, .codehilite .nt { color: #c792ea; }
.codehilite .w { color: #3a4566; }
.codehilite .err { border: none; color: #ff6b6b; }
.codehilite .gh, .codehilite .gp { color: #82aaff; }
.codehilite .gd { color: #ff6b6b; }
.codehilite .gi { color: #c3e88d; }
.codehilite .go { color: #8a96b5; }
td.linenos .special, span.linenos.special { color: #e6ecf5; background-color: #2a2412; }

/* the Contents panels' headers (h4.card-header.bg-primary inside a link) */
a > .card-header.bg-primary { border-bottom: 1px solid rgba(169, 139, 208, 0.35); color: #e6ecf5 !important; }
a:hover > .card-header.bg-primary { background-color: #352a5e !important; }
a:has(> .card-header) { text-decoration: none; }

/* buttons (GitHub, and the like): the website's red */
.btn-primary {
  --bs-btn-bg: #e5484d; --bs-btn-border-color: #e5484d;
  --bs-btn-hover-bg: #c43b6b; --bs-btn-hover-border-color: #c43b6b;
  --bs-btn-active-bg: #b0345f; --bs-btn-active-border-color: #b0345f;
}

/* the source pages' line numbers (local.css: .hl pre a::before) */
.hl pre a::before { color: #5d6886; background: #0e1427; border-right-color: var(--bs-border-color); opacity: 1; }

/* the dependency graphs: Graphviz SVGs written into the pages (and their
   legend), drawn for a white page. Their node colors (FORD's, which the legend
   explains) stay; the white background is taken away, and what is drawn in
   black (edges, arrowheads, the page's own entity: unfilled) made light. CSS
   wins over the SVG's fill and stroke attributes. */
.depgraph svg g.graph > polygon:first-of-type,
.modal svg g.graph > polygon:first-of-type { fill: transparent; }
.depgraph svg .edge path[stroke="#000000"],
.modal svg .edge path[stroke="#000000"] { stroke: #8a96b5; }
.depgraph svg .edge polygon[fill="#000000"],
.modal svg .edge polygon[fill="#000000"] { fill: #8a96b5; stroke: #8a96b5; }
.depgraph svg .edge text, .modal svg .edge text { fill: #9aa6c3; }
.depgraph svg .node polygon[fill="none"],
.modal svg .node polygon[fill="none"] { fill: #151d3a; stroke: #a98bd0; }
.depgraph svg .node text:not([fill]),
.modal svg .node text:not([fill]) { fill: #e6ecf5; }

/* large graphs, drawn as tables (local.css: .graph td...) */
.graph td.node { border-color: var(--bs-body-bg); }
.graph td.dashedText, .graph td.solidText { color: #9aa6c3; border-color: #8a96b5; }
.graph td.dashedBottom, .graph td.dashedTop, .graph td.solidTop, .graph td.solidBottom { border-color: #8a96b5; }
.graph td.triangle-left:after { border-right-color: #8a96b5; }

/* the large graphs' zoom controls (svg-pan-zoom) */
.depgraph svg .svg-pan-zoom-control-background { fill: #151d3a; opacity: 0.95; }
.depgraph svg .svg-pan-zoom-control-element { fill: #c7b2e6; }
.depgraph svg .svg-pan-zoom-control:hover .svg-pan-zoom-control-element { fill: #ffffff; }

/* code examples in the documentation (fenced blocks in docstrings): set off
   from the text */
div.codehilite { padding: 12px 16px; margin: 0 0 1rem; border: 1px solid var(--bs-border-color); overflow-x: auto; }
div.codehilite pre { margin: 0; }
