/* B.01 – Freiflächen-Solar-Planer · App-Stylesheet
   Modular: eine Datei = eine Aufgabe (Layout/Komponenten).
   Karte selbst bleibt im zugehörigen JS-Modul (js/map.js). */

:root{
  --bg:#ffffff;
  --fg:#1b2733;
  --muted:#6b7683;
  --line:#e6eaf0;
  --brand:#12507b;      /* Kopfleiste / Akzent */
  --brand-2:#0b6cf5;    /* aktive Elemente */
  --radius:12px;
  --shadow:0 6px 22px rgba(16,32,52,.18);
}

html,body,#map{height:100%;margin:0}
body{font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--fg)}

/* ---------- Panel links ---------- */
#panel{
  position:absolute;z-index:6;top:10px;left:10px;width:340px;
  max-height:calc(100% - 20px);overflow:auto;
  background:var(--bg);border-radius:var(--radius);box-shadow:var(--shadow);font-size:13px;
}
#panel h1{
  font-size:15px;margin:0;padding:12px 14px;background:var(--brand);color:#fff;
  border-radius:var(--radius) var(--radius) 0 0;letter-spacing:.2px;
}
.sec{padding:11px 14px;border-top:1px solid var(--line)}
.sec:first-of-type{border-top:0}
input,select,button{font:inherit}
#q{width:172px;padding:5px 7px;border:1px solid var(--line);border-radius:8px}
button{
  padding:5px 11px;border:1px solid var(--brand);background:var(--brand);color:#fff;
  border-radius:8px;cursor:pointer
}
button:hover{background:#0e4368}
button.ghost{background:#fff;color:var(--brand)}
#info{white-space:pre-wrap}
.row{display:flex;justify-content:space-between;gap:8px;padding:2px 0}
.row b{font-weight:600}
.muted{color:var(--muted)}
.hint{font-size:11px;color:#5a6472;line-height:1.35}
.pill{display:inline-block;padding:1px 7px;border-radius:10px;font-size:11px;color:#fff}
.pill.verified{background:#2e7d32}.pill.unavailable{background:#b00020}
table.attrs{width:100%;border-collapse:collapse}
table.attrs td{padding:2px 0;vertical-align:top}
table.attrs td:first-child{color:#5a6472;padding-right:8px;white-space:nowrap}
#legend span{cursor:pointer}
.cl h4{margin:10px 0 4px;font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--brand)}
.st{display:inline-block;min-width:34px;text-align:center;padding:1px 6px;border-radius:9px;font-size:11px;color:#fff}
.st.ja{background:#2e7d32}.st.nein{background:#9e9e9e}.st.na{background:#ef6c00}
.cl .t{border-top:1px dashed #ddd;padding:5px 0}
.cl .t .tt{font-weight:600}

/* ---------- Ebenen-Umschalter (oben rechts) ---------- */
.layerctl{
  position:absolute;z-index:7;top:10px;right:10px;width:236px;
  background:var(--bg);border-radius:var(--radius);box-shadow:var(--shadow);
  font-size:13px;overflow:hidden;
}
.layerctl .lc-head{
  display:flex;align-items:center;gap:8px;justify-content:space-between;
  padding:10px 12px;background:var(--brand);color:#fff;cursor:pointer;user-select:none;
}
.layerctl .lc-head .t{font-weight:600;letter-spacing:.2px}
.layerctl .lc-head .chev{transition:transform .18s}
.layerctl.collapsed .lc-head .chev{transform:rotate(-90deg)}
.layerctl .lc-body{padding:8px 12px 12px}
.layerctl.collapsed .lc-body{display:none}
.lc-group{margin:6px 0 2px}
.lc-group .gl{
  font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--brand);
  font-weight:600;margin:8px 0 4px
}
.lc-opt{display:flex;align-items:center;gap:8px;padding:3px 0;cursor:pointer}
.lc-opt input{margin:0;accent-color:var(--brand-2)}
.lc-opt .lbl{flex:1;line-height:1.25}
.lc-status{
  margin-top:8px;padding:7px 9px;border-radius:8px;background:#f3f6fa;color:#42505f;
  font-size:11.5px;line-height:1.35;border:1px solid var(--line)
}
.lc-status.warn{background:#fff6e6;border-color:#f4d9a6;color:#7a5410}
.lc-status.err{background:#fdecec;border-color:#f3c2c2;color:#8a1f1f}
.lc-status.ok{background:#eef7ef;border-color:#c7e3ca;color:#245c2b}

/* kleiner Lade-Spinner */
.spin{
  width:13px;height:13px;border:2px solid #cfd8e3;border-top-color:var(--brand-2);
  border-radius:50%;display:inline-block;vertical-align:-2px;animation:sp .8s linear infinite
}
@keyframes sp{to{transform:rotate(360deg)}}

/* ---------- Karten-Popup (Flurstücks-Info am Klick) ---------- */
#b01-popup{
  position:absolute;z-index:5;min-width:190px;max-width:280px;
  background:rgba(255,255,255,.97);border-radius:10px;box-shadow:var(--shadow);
  padding:9px 11px;font-size:12px;line-height:1.45;display:none
}
#b01-popup .pt{font-weight:600;color:var(--brand);margin-bottom:3px;font-size:12px}
#b01-popup .pg{color:#33404e}
#b01-popup .px{
  position:absolute;top:5px;right:8px;cursor:pointer;color:#98a2b0;font-weight:700
}
#b01-popup:before{
  content:"";position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);
  border:7px solid transparent;border-top-color:rgba(255,255,255,.97);border-bottom:0
}


/* ---- B.01 Mehrfachauswahl + Grenz-Editor (27.10.2026) ---- */
#auswahl ul.aw { list-style: none; margin: 0; padding: 0; }
#auswahl ul.aw li {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 6px; margin-bottom: 2px; border-radius: 4px;
  background: #f1f5f9; font-size: 12px;
}
#auswahl ul.aw li .idx {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: 8px; background: #1d3550; color: #fff;
  font-size: 10px; font-weight: 700;
}
#auswahl ul.aw li .rm { margin-left: auto; color: #b91c1c; text-decoration: none; font-weight: 700; }
#edBtn:disabled { opacity: .45; cursor: not-allowed; }
.hecku { }
