/* SPDX-License-Identifier: Apache-2.0
   SPDX-FileCopyrightText: (c) 2026 Tim Bode, PGI-12, Forschungszentrum Jülich

   Quicopt brand overlay for Documenter. Documenter's layout is a left sidebar
   (not a Material-style top bar), so branding lives in three places: the
   self-hosted Fira fonts, the brand-blue link/accent colour (per theme), and the
   sidebar logo (auto-swapped light/dark via logo.svg / logo-dark.svg). */

/* ── self-hosted Fira (no CDN) ─────────────────────────────────────────────── */
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/fira-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/fira-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/fira-sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Code"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/fira-code-400.woff2") format("woff2");
}

/* ── apply the fonts ───────────────────────────────────────────────────────── */
body, button, input, optgroup, select, textarea,
.content, .docstring, .admonition, .breadcrumb, .docs-sidebar {
  font-family: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
}
code, pre, kbd, .docstring code, .content pre, .content code, .hljs {
  font-family: "Fira Code", "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ── brand blue: links + accents ───────────────────────────────────────────── */
:root {
  --quicopt-blue: #2d5faa;
  --quicopt-blue-dark: #24487f;
  --quicopt-blue-light: #8ab3dd;
}

html.theme--documenter-light a,
html.theme--documenter-light .content a { color: var(--quicopt-blue); }
html.theme--documenter-light a:hover,
html.theme--documenter-light .content a:hover { color: var(--quicopt-blue-dark); }

html.theme--documenter-dark a,
html.theme--documenter-dark .content a { color: var(--quicopt-blue-light); }
html.theme--documenter-dark a:hover,
html.theme--documenter-dark .content a:hover { color: #ffffff; }

/* the active sidebar entry, tinted to the brand */
html.theme--documenter-light #documenter .docs-sidebar .docs-menu a.tocitem.is-active,
html.theme--documenter-light #documenter .docs-sidebar .docs-menu .is-active > a.tocitem {
  color: var(--quicopt-blue);
  border-color: var(--quicopt-blue);
}
html.theme--documenter-dark #documenter .docs-sidebar .docs-menu a.tocitem.is-active,
html.theme--documenter-dark #documenter .docs-sidebar .docs-menu .is-active > a.tocitem {
  color: var(--quicopt-blue-light);
  border-color: var(--quicopt-blue-light);
}

/* a docstring's binding header underlined in brand blue, so the API reads Quicopt */
html.theme--documenter-light .docstring > header {
  border-bottom: 2px solid var(--quicopt-blue);
}
html.theme--documenter-dark .docstring > header {
  border-bottom: 2px solid var(--quicopt-blue-light);
}

/* ── sidebar logo ──────────────────────────────────────────────────────────── */
#documenter .docs-sidebar .docs-logo > img { max-height: 5.5rem; }
