/* ee-electrical.css — Elektroplanung in der Konfiguration (project-electrical.js)
 * Werkzeug "Elektro" (Popover), Abschnitt im linken Panel, Inspektor-Reiter "Elektro",
 * Kartenlegende. Farben nur ueber --ees-* (ee-shell-tokens.css, hell/dunkel nach System)
 * plus die Kabelfarben (DC orange, AC blau, MS rot, Graben erdbraun). */

/* ── Popover ─────────────────────────────────────────────────────────── */
.ees-popover.eel-pop { width: 340px; }
.eel-tabs { display: flex; gap: 3px; margin: 0 4px 8px; padding: 3px; border-radius: 10px; background: var(--ees-surface-2); }
.eel-tab { flex: 1; padding: 5px 0; border: 0; border-radius: 8px; background: transparent; color: var(--ees-text-dim); font: inherit; font-size: 11.5px; cursor: pointer; white-space: nowrap; }
.eel-tab.on { background: var(--ees-surface); color: var(--ees-text); font-weight: 600; box-shadow: 0 0 0 1px var(--ees-border); }
.eel-badge { display: inline-block; min-width: 15px; padding: 0 4px; border-radius: 8px; background: var(--ees-warn); color: #000; font-style: normal; font-size: 10px; font-weight: 700; line-height: 15px; }
.eel-body { padding: 0 2px; }
.eel-note { margin: 6px 8px; font-size: 12px; line-height: 1.45; color: var(--ees-text-dim); }
.eel-note.eel-ok { color: var(--ees-accent-strong); }
.eel-stale { margin: 6px 4px; padding: 8px; border-radius: 8px; background: var(--ees-warn-soft); color: var(--ees-text); font-size: 12px; }
.eel-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 4px; }
.eel-kpi { padding: 7px 8px; border-radius: 10px; background: var(--ees-surface-2); border: 1px solid var(--ees-border); min-width: 0; }
.eel-kpi span { display: block; font-size: 10.5px; color: var(--ees-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eel-kpi b { display: block; margin-top: 2px; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.eel-status { margin: 4px 8px; font-size: 11px; color: var(--ees-text-dim); }
.eel-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 4px 4px; }
.eel-btn { padding: 6px 10px; border: 1px solid var(--ees-border-strong); border-radius: var(--ees-radius-sm); background: var(--ees-surface-2); color: var(--ees-text); font: inherit; font-size: 12px; cursor: pointer; }
.eel-btn:hover:not([disabled]) { background: var(--ees-surface-3); }
.eel-btn[disabled] { opacity: .45; cursor: not-allowed; }
.eel-link { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--ees-info); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.eel-user, .eel-assumed, .eel-lock, .eel-auto { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-style: normal; font-size: 10px; font-weight: 600; line-height: 16px; vertical-align: 1px; }
.eel-user { background: var(--ees-warn-soft); color: var(--ees-warn); border: 1px solid var(--ees-warn); }
button.eel-user { cursor: pointer; font-family: inherit; }
.eel-assumed { background: var(--ees-surface-3); color: var(--ees-text-dim); border: 1px dashed var(--ees-border-strong); }
.eel-lock { background: rgba(255, 214, 10, .16); color: var(--ees-sun); border: 1px solid var(--ees-sun); }
.eel-auto { color: var(--ees-text-faint); font-weight: 500; }
.eel-switch.active .ees-sw { background: var(--ees-accent); }
.eel-switch[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Warnungen */
.eel-warns { list-style: none; margin: 6px 4px; padding: 0; display: grid; gap: 5px; }
.eel-w { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 7px 8px; border-radius: 8px; background: var(--ees-surface-2); border-left: 3px solid var(--ees-info); font-size: 12px; line-height: 1.4; }
.eel-w.warning { border-left-color: var(--ees-warn); }
.eel-w.error { border-left-color: var(--ees-danger); }
.eel-wsev { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ees-text-dim); }
.eel-wmsg { flex: 1 1 200px; }

/* Ebenen + Legende */
.eel-legend, .eel-maplegend { display: grid; gap: 5px; margin: 6px 4px 2px; padding: 8px 4px 0; border-top: 1px solid var(--ees-border); font-size: 11px; color: var(--ees-text-dim); }
.eel-maplegend { margin: 0; padding: 0; border: 0; }
.eel-legend > div, .eel-maplegend > div { display: flex; align-items: center; gap: 8px; }
.eel-lg { display: inline-block; flex: none; width: 16px; height: 3px; border-radius: 2px; background: var(--c); }
.eel-lg.band { height: 7px; opacity: .6; }
.eel-lg.dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #fff; }
.eel-lg.dot.locked { border: 2.5px solid #ffd60a; }
.eel-lg.square { width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid #fff; }

/* Einstellungen */
.eel-field { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; margin: 2px 4px; padding: 6px 4px; border-bottom: 1px solid var(--ees-border); }
.eel-fl { font-size: 12px; color: var(--ees-text-2); }
.eel-fc { display: inline-flex; align-items: center; gap: 4px; justify-self: end; }
.eel-fc em { font-style: normal; font-size: 11px; color: var(--ees-text-dim); }
.eel-fh { grid-column: 1 / -1; font-size: 10.5px; color: var(--ees-text-faint); line-height: 1.35; }
.eel-field input, .eel-field select, .eel-ovr input {
    width: 86px; padding: 4px 6px; border: 1px solid var(--ees-border-strong); border-radius: 6px;
    background: var(--ees-field); color: var(--ees-text); font: inherit; font-size: 12px; text-align: right;
}
.eel-field select { width: 170px; text-align: left; }
.eel-field select option { background: var(--ees-menu-bg); color: var(--ees-text); }
.eel-field input:disabled, .eel-field select:disabled, .eel-ovr input:disabled { opacity: .55; }
.ees-prow.eel-inline { width: auto; padding: 2px; }

/* ── linkes Panel ────────────────────────────────────────────────────── */
.ees-left .eel-line, .eel-line { display: block; margin-top: 2px; font-size: 11px; color: var(--ees-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eel-line .eel-type { font-style: normal; color: var(--ees-text-faint); }
.eel-sec .eel-grid { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 2px 4px 4px; font-size: 12px; color: var(--ees-text-dim); }
.eel-sec .eel-grid b { color: var(--ees-text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.eel-warnline { display: block; width: 100%; margin: 4px 0 0; padding: 6px 8px; border: 0; border-radius: 8px; background: var(--ees-warn-soft); color: var(--ees-warn); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }

/* ── Inspektor-Reiter "Elektro" ─────────────────────────────────────── */
.eel-insp { padding: 4px 2px 8px; }
.eel-sub { margin: 12px 2px 6px; font-size: 11px; font-weight: 650; letter-spacing: .5px; text-transform: uppercase; color: var(--ees-text-dim); }
.eel-sub em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ees-text-faint); }
.eel-kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 12.5px; color: var(--ees-text-dim); }
.eel-kv b { color: var(--ees-text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.eel-kv b em { font-style: normal; font-weight: 400; color: var(--ees-text-faint); font-size: 11px; }
.eel-ovr { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.eel-ovr input { width: 64px; }
.eel-site { margin: 4px 0; border: 1px solid var(--ees-border); border-radius: 10px; background: var(--ees-surface-2); overflow: hidden; }
.eel-site.on { border-color: var(--ees-info); }
.eel-site.locked { border-color: var(--ees-sun); }
.eel-sh { display: block; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--ees-text); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.eel-sb { padding: 0 10px 10px; }
.eel-tblw { overflow-x: auto; }
.eel-tbl { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.eel-tbl th, .eel-tbl td { padding: 3px 4px; border-bottom: 1px solid var(--ees-border); text-align: center; }
.eel-tbl th { color: var(--ees-text-dim); font-weight: 600; }
.eel-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 11.5px; }
.eel-runs li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; color: var(--ees-text-dim); }
.eel-runs b { color: var(--ees-text); text-align: right; }
.eel-runs em { grid-column: 1 / -1; font-style: normal; color: var(--ees-text-faint); font-size: 10.5px; }
.ees-inspector .tabs button { white-space: nowrap; }

/* ── Gräben, Kennzahlen je kWp, Stringauslegung, Auswahl (Sammelgraben 20.10.2026) ── */
.eel-kpi small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--ees-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eel-kpi.wide { grid-column: 1 / -1; }
.eel-kpi.wide small { white-space: normal; }
.eel-curve { margin: 4px 6px; font-size: 11px; line-height: 1.4; color: var(--ees-text-dim); font-variant-numeric: tabular-nums; }
.eel-curve b { color: var(--ees-text); font-weight: 600; }
.eel-lg.band.main { height: 9px; opacity: .85; }
.eel-kv b.eel-ok { color: var(--ees-accent-strong); }
.eel-kv b.eel-bad { color: var(--ees-danger); }
.eel-kv b.eel-bad em { color: var(--ees-danger); opacity: .8; }
.eel-clip { margin: 6px 0 2px; padding: 7px 8px; border-radius: 8px; border-left: 3px solid var(--ees-danger); background: var(--ees-warn-soft); color: var(--ees-text); font-size: 12px; line-height: 1.4; }
.eel-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 4px; padding: 7px 8px; border-radius: 10px; background: var(--ees-surface-2); border: 1px solid var(--ees-info); font-size: 12px; }
.eel-selbar > span { flex: 1 1 auto; }
.eel-selbar .eel-link { margin-left: 0; }
.eel-mps { display: flex; flex-wrap: wrap; gap: 3px; width: 100%; }
.eel-mp { display: inline-block; padding: 0 5px; border-radius: 5px; background: var(--c); color: #000; font-style: normal; font-size: 10px; font-weight: 700; line-height: 15px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.eel-tbl th .eel-mp { font-size: 9.5px; }

/* Tooltip über der Karte: Aussehen aus ee-map-card.css (einheitliche Karten-Popups); hier nur die Lage des Glas-div */
.eel-tip { position: absolute; z-index: 30; pointer-events: none; max-width: 290px; }
.eel-tipin { display: grid; gap: 1px; }
.eel-tipin b { font-weight: 650; font-variant-numeric: tabular-nums; }
.eel-tipin span { color: var(--ees-text-dim); font-variant-numeric: tabular-nums; }

/* ── Widget „Elektroplan" (Modul Bau) + Versionsliste Netzanschluss — widget-electrical-plan.js ────
 * Karte, Statusleiste, Reiter, Aktionsleiste und Versionsliste kommen aus den Modul-Widgets
 * (ee-widget-styles.css: ee-module-*). Hier nur, was das Modul zusätzlich zeigt. Nur --ees-*. */
.eep { display: flex; flex-direction: column; gap: 0; font-size: 12.5px; color: var(--ees-text); min-width: 0; }
.eep-rev { display: flex; align-items: baseline; gap: 8px; }
.eep-rev b { font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.eep-meta { display: flex; align-items: center; gap: 8px; margin: 3px 0 2px; font-size: 11.5px; color: var(--ees-text-dim); }
.eep-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 20px; font-size: 10.5px; font-weight: 650; }
.eep-pill.draft { background: var(--ees-surface-3); color: var(--ees-text-dim); }
.eep-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.eep-hint { display: flex; align-items: center; gap: 8px; margin: 3px 0; padding: 6px 8px; border-radius: 9px; font-size: 11.5px; }
.eep-hint svg { width: 14px; height: 14px; flex: none; }
.eep-hint span { color: var(--ees-text); min-width: 0; }
.eep-hint.y { background: var(--ees-warn-soft); color: var(--ees-warn); }
.eep-hint.i { background: color-mix(in srgb, var(--ees-info) 12%, transparent); color: var(--ees-info); }
.eep-act, .eep-lnk { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.eep-act { margin-left: auto; }
.eep-lnk { margin-left: auto; color: var(--ees-info); }
.eep-lnk svg { width: 15px; height: 15px; vertical-align: -2px; }
.eep-no { display: inline-block; width: 34px; color: var(--ees-text-faint); font-variant-numeric: tabular-nums; }
.eep-doclist { margin: 0; padding: 0; list-style: none; font-size: 11.5px; }
.eep-doclist li { padding: 4px 0; border-bottom: 1px solid var(--ees-border); }
.eep-note { margin: 4px 2px; font-size: 11.5px; color: var(--ees-text-dim); }
.eep-note.eep-ok { color: var(--ees-accent-strong); }
.eep-busy { display: flex; align-items: center; gap: 8px; }
.eep-error { margin: 8px 0 0; padding: 8px 10px; border-radius: 9px; font-size: 12px;
    background: color-mix(in srgb, var(--ees-danger) 12%, transparent); color: var(--ees-danger); }
.eep-error ul { margin: 4px 0 0 16px; padding: 0; color: var(--ees-text); font-size: 11.5px; }
.eep-disc { margin: 8px 0 0; font-size: 10px; color: var(--ees-text-faint); text-align: center; }
/* Vollansicht */
.eep-full { max-width: 920px; margin: 0 auto; padding: 4px 4px 24px; }
.eep-pane { display: flex; flex-direction: column; gap: 2px; }
.eep-lbl { margin: 12px 0 4px; font-size: 10px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--ees-text-faint); }
.eep-pane textarea { width: 100%; padding: 8px; border: 1px solid var(--ees-border-strong); border-radius: 8px; background: var(--ees-field); color: var(--ees-text); font: inherit; resize: vertical; }
.ee-electrical-plan-fullscreen .ee-module-fixed-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Normalansicht: Standort-Popover (klickbar, „In Elektro öffnen“) */
.eel-popup--card .mapboxgl-popup-content, .eel-tip--card { pointer-events: auto; }
.eel-card { gap: 2px; }
.eel-card-link { justify-self: start; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--ees-accent, #0a84ff); font: inherit; font-weight: 600; cursor: pointer; }
.eel-card-link:hover, .eel-card-link:focus-visible { text-decoration: underline; }
