/* An die ErControl-Homepage (ercontrol.de) angelehnte Farben, Schrift: Source Sans 3 */

/* Variable Font (Latin-Subset), lokal eingebettet - deckt Gewicht 200-900 in
   einer Datei ab, damit funktioniert auch fett/kursiv ohne weitere Dateien. */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-sans-3-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-italic.woff2") format("woff2");
}

:root {
  --erc-red: #d64545;
  --erc-green: #3a9d5d;
  --erc-darkred: #a83232;
  --erc-blue: #2563eb;
  --erc-menu-back: #eef0f2;
  --erc-page-back: #dfe3e8;
  --erc-content-back: #ffffff;
  --erc-font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Das RTD-Theme setzt Ueberschriften (Roboto Slab) und Formularfelder/Schaltflaechen (Lato)
   ueber eigene, direkt auf die Elemente zielende Regeln - eine Vererbung vom
   Elternelement reicht hier nicht, deshalb muessen h1-h6 usw. explizit mit
   aufgefuehrt werden, sonst bleibt dort die Theme-Schrift bestehen. */
body,
.wy-nav-content,
.rst-content,
.wy-menu-vertical,
.wy-side-nav-search,
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6,
.rst-content .toctree-wrapper > p.caption,
.rst-content .sidebar .sidebar-title,
legend,
.btn,
input,
textarea,
select {
  font-family: var(--erc-font) !important;
}

/* Content wie die weisse Karte auf der Homepage: liegt auf grauem Hintergrund */
.wy-nav-content-wrap {
  background: var(--erc-page-back);
}

.wy-nav-content {
  background: var(--erc-content-back);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  margin-top: 1em;
  margin-bottom: 1em;
}

/* Ueberschriften in Dunkelrot, wie auf der Homepage */
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
  color: var(--erc-darkred);
}

/* Links in Homepage-Blau */
.rst-content a:not(.btn):not(.headerlink) {
  color: var(--erc-blue);
}

/* Das RTD-Theme setzt in Tabellen white-space: nowrap - lange Zellentexte
   erzwingen dann horizontales Scrollen. Zeilenumbruch in Zellen wieder erlauben. */
.wy-table-responsive table td,
.wy-table-responsive table th {
  white-space: normal;
}

/* Sidebar-Kopf (Suchfeld/Logo-Bereich) in Homepage-Grau statt RTD-Blau */
.wy-side-nav-search {
  background: var(--erc-menu-back);
}

.wy-side-nav-search input[type="text"] {
  border-color: #ccc;
}

.wy-side-nav-search > a,
.wy-side-nav-search .wy-dropdown > a {
  color: #222;
}

/* Aktueller Menuepunkt in Homepage-Gruen statt RTD-Blau */
.wy-menu-vertical li.current a,
.wy-menu-vertical li.toctree-l1.current > a {
  background: #fff;
}

.wy-menu-vertical li.current > a:hover,
.wy-menu-vertical li a:hover {
  background: var(--erc-green);
  color: #fff;
}

.wy-menu-vertical li.toctree-l2.current > a {
  background: #f3f3f3;
}

/* Mobile Top-Bar in Homepage-Grau statt RTD-Blau */
.wy-nav-top {
  background: var(--erc-menu-back);
}

.wy-nav-top a {
  color: #222;
}

/* Farbfelder in Legenden ({swatch}-Rolle aus conf.py) */
.erc-swatch {
  display: inline-block;
  width: 3.5em;
  height: 1.1em;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 2px;
}
