/* ═══════════════════════════════════════════════════════════════════════════
   Waldfilm Karte – CI (Farben, Schrift) und Klima-Thema
   Lädt nach style.css und überschreibt dort nur die Grundfarben.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #121212;
  --bg-2: #181818;
  --panel: #1f1f1f;
  --panel-2: #282828;
  --line: #343434;
  --text: #f2f2f2;
  --muted: #a7a7a7;
  --accent: #43a83e;
  --accent-2: #5cc457;
  --trocken: #c2410c;
  --nass: #3b82f6;
}

body { font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); }

/* ── Kopfzeile ──────────────────────────────────────────────────────────── */
.brand-logo-link { display: flex; align-items: center; flex: none; }
.brand-logo { height: 34px; width: auto; display: block; }
.tab.is-active { color: #fff; }

.themen {
  display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line); flex: none;
}
.thema {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700;
  font-size: .86rem; padding: .38rem .9rem; border-radius: 999px; cursor: pointer;
}
.thema:hover { color: var(--text); }
.thema.is-active { background: var(--text); color: #121212; }

/* Reiter und Werkzeuge des jeweils anderen Themas ausblenden */
body[data-thema="klima"] .tab[data-thema="energie"],
body[data-thema="energie"] .tab[data-thema="klima"],
body:not([data-thema]) .tab[data-thema="klima"],
body[data-thema="klima"] .nur-energie { display: none !important; }

/* ── Klima-Karte ────────────────────────────────────────────────────────── */
#kmap { position: absolute; inset: 0; background: #0d0d0d; }
.kebenen { display: flex; flex-direction: column; gap: 4px; margin-bottom: .8rem; }
.kebene {
  text-align: left; border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  font: inherit; font-size: .88rem; padding: .45rem .65rem; border-radius: 9px; cursor: pointer;
}
.kebene small { display: block; color: var(--muted); font-size: .76rem; }
.kebene.is-active { border-color: var(--accent); background: rgba(67, 168, 62, .14); }
.klegende { display: grid; grid-template-columns: 18px 1fr; gap: 3px 8px; font-size: .8rem; align-items: center; margin-bottom: .5rem; }
.klegende i { width: 18px; height: 12px; border-radius: 3px; display: block; }

.kbl { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.kbl button {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
  border: 0; background: transparent; color: var(--text); font: inherit; padding: .28rem .2rem;
  border-radius: 6px; cursor: pointer; text-align: left;
}
.kbl button:hover { background: var(--panel-2); }
.kbl .wert { font-variant-numeric: tabular-nums; color: var(--muted); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

.kort-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.kort-kopf h2 { margin: 0; }
.kort-zu { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.kwerte { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: .7rem 0; }
.kwert { background: var(--bg-2); border-radius: 9px; padding: .45rem .6rem; }
.kwert b { display: block; font-size: 1.15rem; }
.kwert span { font-size: .74rem; color: var(--muted); }
.kstufe { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #121212; }

.leaflet-tooltip.ktip {
  background: #1f1f1f; color: #f2f2f2; border: 1px solid #3a3a3a; border-radius: 8px;
  font-family: 'Manrope', sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.leaflet-tooltip.ktip::before { display: none; }

/* ── Diagramme ──────────────────────────────────────────────────────────── */
.kchart { width: 100%; height: auto; display: block; overflow: visible; }
.kchart text { fill: var(--muted); font-size: 11px; font-family: 'Manrope', sans-serif; }
.kchart .achse { stroke: var(--line); }
.kchart .norm { stroke: var(--text); stroke-width: 1.6; fill: none; stroke-dasharray: 4 3; }
.kchart .linie { stroke: var(--accent); stroke-width: 2; fill: none; }
.kchart .hl { fill: var(--text); font-weight: 700; }
.kchart rect:hover, .kchart circle:hover { opacity: .75; }
.kchart-legende { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.kchart-legende i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.kchart-legende i.strich { height: 0; border-top: 2px dashed var(--text); border-radius: 0; }

.kgross { font-size: 2rem; font-weight: 800; line-height: 1.1; margin: .2rem 0 .3rem; }
.hero.trocken { border-left: 4px solid var(--trocken); }
.hero.warm { border-left: 4px solid #dc2626; }
.hero.gruen { border-left: 4px solid var(--accent); }

.ktab { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.ktab th, .ktab td { padding: .42rem .5rem; border-bottom: 1px solid var(--line); text-align: right; }
.ktab th:first-child, .ktab td:first-child { text-align: left; }
.ktab th { color: var(--muted); font-weight: 600; font-size: .78rem; }
.ktab-wrap { overflow-x: auto; }

.e-schalter { display: flex; flex-wrap: wrap; gap: 6px; margin: .3rem 0 .8rem; }
.e-schalter button {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit;
  font-size: .84rem; padding: .3rem .75rem; border-radius: 999px; cursor: pointer;
}
.e-schalter button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.deflist dl { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: .7rem 1.2rem; margin: 0; }
.deflist dt { font-weight: 700; }
.deflist dd { margin: 0; color: var(--muted); }
.deflist a { color: var(--accent-2); }
@media (max-width: 640px) {
  .deflist dl { grid-template-columns: 1fr; gap: .2rem; }
  .deflist dd { margin-bottom: .7rem; }
  .brand-logo { height: 26px; }
}
