/* ══════════════════════════════════════════════════
   energieverbrauch-analyse.css — Seitenspezifische Styles
   Energieverbrauch & Analyse: Ist-Zustand, Lastprofile,
   Spitzenlasten, Einsparpotenziale.
   ══════════════════════════════════════════════════ */

/* ── KPI grid ── */
.hero-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 900px) { .hero-kpi { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .hero-kpi { grid-template-columns: 1fr; } }

/* ── Step panel ── */
.step-panel + .step-panel { margin-top: 18px; }

.step-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.section-sub {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Energy block (Strom / Wärme / Kälte) ── */
.energy-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px 4px;
  margin: 16px 0 0;
  background: var(--surface-translucent);
}

.energy-block legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.legend-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.toggle-inline {
  margin-left: 12px;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.toggle-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Verbrauchsstruktur cards ── */
.structure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 700px) { .structure-grid { grid-template-columns: 1fr; } }

.energy-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.energy-card .ec-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.energy-card .ec-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.energy-card .ec-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.energy-card.highlight {
  border-color: var(--accent);
  background: var(--highlight-bg);
}

.energy-card.highlight .ec-value { color: var(--accent); }

/* ── Charts ── */
.chart-block {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
}

.chart-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 10px;
}

.chart-block .chart {
  height: 220px;
  padding: 0;
  border: none;
  background: transparent;
}

/* ── Heatmap ── */
.heatmap-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#heatmap { height: 220px; }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  justify-content: flex-end;
}

.heatmap-legend .hm-bar {
  flex: 0 0 120px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--surface-soft) 0%,
    var(--accent-soft) 50%,
    var(--accent) 100%
  );
}

/* ── Donut ── */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  min-width: 180px;
}

.donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.donut-legend .dl-label { flex: 1; color: var(--ink); }
.donut-legend .dl-value { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Peak list ── */
.peak-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  counter-reset: peak;
}

.peak-list li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.peak-list li::before {
  counter-increment: peak;
  content: counter(peak);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
}

.peak-list .peak-when { color: var(--muted); }
.peak-list .peak-kw { color: var(--accent); font-weight: 700; }

/* ── Recommendations (Low Hanging Fruits) ── */
.recommendations {
  display: grid;
  gap: 12px;
}

.rec {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  align-items: center;
}

.rec.empty {
  grid-template-columns: 1fr;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.rec-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rec-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rec-body { min-width: 0; }

.rec-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  margin: 0 0 4px;
}

.rec-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
  font-size: 0.78rem;
}

.rec-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}

.rec-pill.savings { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }

.rec-pill.effort-low    { color: #2a9d5a; border-color: rgba(42,157,90,0.25); background: rgba(42,157,90,0.08); }
.rec-pill.effort-mid    { color: #c98a1c; border-color: rgba(201,138,28,0.25); background: rgba(201,138,28,0.08); }
.rec-pill.effort-high   { color: #c4523a; border-color: rgba(196,82,58,0.25); background: rgba(196,82,58,0.08); }

.rec-cta {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.rec-cta:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .rec { grid-template-columns: auto 1fr; }
  .rec-cta { grid-column: 1 / -1; justify-self: stretch; text-align: center; }
}

.disclaimer {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
