/* CRT-Terminal-Theme für Forgejo (Issue #22): leitet sich per @import vom
   eingebauten forgejo-dark ab und überschreibt nur die Farb-Leaf-Variablen
   (--steel-*-Palette, --color-primary-Rampe) mit der Farbwelt des Dashboards
   (src/dashboard/styles.css). Alle abgeleiteten Variablen (hover/active,
   secondary, accent, …) referenzieren die Leaves per var() und ziehen
   automatisch nach. Aktivierung über [ui] THEMES / DEFAULT_THEME in
   custom/conf/app.ini, ausgeliefert aus $FORGEJO_CUSTOM/public/assets/css/
   (siehe docker-template.yaml). Wie im Wiki (src/wiki/assets/stylesheets/crt.css)
   sind Scanlines/Vignette ein reines Overlay mit pointer-events: none und
   schwächerer Opazität als im Dashboard — Forgejo ist ein Arbeitswerkzeug. */

@import url("theme-forgejo-dark.css");

/* ── Fonts (self-hosted, SIL OFL 1.1 — siehe ../fonts/OFL.txt) ──────────── */

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Offizieller Font-Override-Mechanismus (Forgejo-Doku: Customizing fonts). */
  --fonts-proportional: "JetBrains Mono" !important;
  --fonts-monospace: "JetBrains Mono", ui-monospace, monospace !important;

  /* ── Steel-Palette → CRT-Grüntöne (dunkel → hell) ─────────────────────── */
  /* 900 = Nav/Footer (Dashboard --bg), 750 ≈ --bg-raised, 650 = --border,
     250 ≈ --text-dim, 100 = Fließtext. */
  --steel-900: #000000;
  --steel-850: #020505;
  --steel-800: #050b09;
  --steel-750: #081210;
  --steel-700: #0d1b17;
  --steel-650: #12211d;
  --steel-600: #19312a;
  --steel-550: #22443a;
  --steel-500: #2c5749;
  --steel-450: #386a59;
  --steel-400: #457c68;
  --steel-350: #568c78;
  --steel-300: #6a9c88;
  --steel-250: #7fab99;
  --steel-200: #97bcac;
  --steel-150: #b6d2c6;
  --steel-100: #dcf5ea;

  /* ── Primary: Orange → Neon-Mint (Dashboard --neon-mint) ──────────────── */
  /* dark-Rampe = heller (Dark-Theme-Konvention), light-Rampe = dunkler. */
  --color-primary: #2bffb0;
  --color-primary-contrast: #000000;
  --color-primary-dark-1: #55ffc0;
  --color-primary-dark-2: #55ffc0;
  --color-primary-dark-3: #80ffd0;
  --color-primary-dark-4: #80ffd0;
  --color-primary-dark-5: #aaffe0;
  --color-primary-dark-6: #aaffe0;
  --color-primary-dark-7: #d5fff0;
  --color-primary-light-1: #17e69b;
  --color-primary-light-2: #14cc8a;
  --color-primary-light-3: #10a670;
  --color-primary-light-4: #0c8056;
  --color-primary-light-5: #0c8056;
  --color-primary-light-6: #095c3e;
  --color-primary-light-7: #095c3e;
  --color-primary-alpha-10: #2bffb019;
  --color-primary-alpha-20: #2bffb033;
  --color-primary-alpha-30: #2bffb04b;
  --color-primary-alpha-40: #2bffb066;
  --color-primary-alpha-50: #2bffb080;
  --color-primary-alpha-60: #2bffb099;
  --color-primary-alpha-70: #2bffb0b3;
  --color-primary-alpha-80: #2bffb0cc;
  --color-primary-alpha-90: #2bffb0e1;

  /* Zeilen-Highlight: die dunkle light-4-Rampe wäre auf Schwarz unlesbar. */
  --color-highlight-fg: #2bffb0;

  /* ── Sekundär-Akzent: Fluorescent-Blue für Info-Elemente ──────────────── */
  --color-info-border: #11ffee66;
  --color-info-bg: #0a2a28;
  --color-info-text: #b8fffa;

  /* ── Konsole (Actions-Logs) in die Farbwelt geholt ────────────────────── */
  --color-console-fg: #dcf5ea;
  --color-console-fg-subtle: #7fab99;
  --color-console-bg: #050b09;
  --color-console-border: #12211d;
  --color-console-active-bg: #19312a;
  --color-console-menu-bg: #0d1b17;
  --color-console-menu-border: #22443a;

  /* ── Details analog Dashboard ─────────────────────────────────────────── */
  --color-selection-bg: #2bffb0;
  --color-selection-fg: #000000;
  --color-tooltip-bg: #030706f0;
  --color-overlay-backdrop: #000000c0;
  --color-expand-button: #19312a;
  --color-light-border: #2bffb028;
}

/* ── CRT-Overlays (Vignette + Scanlines) ────────────────────────────────── */
/* z-index unter Fomantic-Modals (~1000): Dialoge bleiben ungestört. */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background:
    radial-gradient(ellipse 120% 90% at 50% 0%, rgba(43, 255, 176, 0.04), transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(17, 255, 238, 0.03), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  /* Schwächer als Dashboard (0.18) und Wiki (0.1): Diff-Ansichten und
     Code-Reviews müssen uneingeschränkt lesbar bleiben. */
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 4px
  );
}

@media print {
  body::before,
  body::after {
    display: none;
  }
}

/* ── Glow-Akzente ───────────────────────────────────────────────────────── */
/* Nur in gerendertem Markdown (READMEs, Issues), nicht im UI-Chrome. */

.markup h1,
.markup h2 {
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.25);
}

.ui.primary.button {
  box-shadow: 0 0 14px -4px var(--color-primary-alpha-60);
}
