/* Elektrotechnik Becker – Klima-Konfigurator. Baut auf pv.css auf (Assistent, Kacheln, Schätzung);
   hier steht nur, was es dort nicht gibt: Bild der Anlage, Raumkacheln und Raumkarten. Vorsilbe kk-. */

/* ---------- Bild der Anlage ---------- */
.kk-bild{margin:0 0 1.4rem;background:linear-gradient(180deg,#eef5fd 0%,#fff 75%);border:1px solid var(--line);border-radius:16px;padding:.7rem .7rem .5rem}
.kk-bild svg{display:block;width:100%;height:auto;max-height:320px;font-family:var(--font)}
.kk-bild figcaption{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.35rem .5rem;font-size:.82rem;color:var(--muted);margin-top:.3rem}
.kk-bild--klein{padding:.4rem;margin-bottom:.8rem}
.kk-bild--klein svg{max-height:220px}
.kk-punkt{display:inline-block;width:10px;height:10px;border-radius:50%;margin-left:.5rem}
.kk-punkt--gering{background:#86c4ff}
.kk-punkt--mittel{background:#f5a524}
.kk-punkt--hoch{background:#e5484d}
.kk-boden{stroke:#5d666f;stroke-width:2}
.kk-haus{fill:#fff;stroke:var(--ink);stroke-width:1.6}
.kk-dach{fill:#e3e6e9;stroke:var(--ink);stroke-width:1.6;stroke-linejoin:round}
.kk-decke{stroke:#c9cfd5;stroke-width:1.2}
.kk-garage{fill:#e3e6e9;stroke:var(--ink);stroke-width:1.4}
.kk-balkon{fill:none;stroke:var(--ink);stroke-width:2.4;stroke-linecap:round}
.kk-leitung{fill:none;stroke:var(--blue);stroke-width:2;stroke-linejoin:round;stroke-dasharray:5 5;animation:kk-fluss 1.1s linear infinite}
@keyframes kk-fluss{to{stroke-dashoffset:-20}}
@media (prefers-reduced-motion:reduce){.kk-leitung{animation:none}}
.kk-raum rect:first-child{fill:#eef5fd;stroke:#86c4ff;stroke-width:1.4;transition:fill .3s,stroke .3s}
.kk-raum--mittel rect:first-child{fill:#fff4e0;stroke:#f5a524}
.kk-raum--hoch rect:first-child{fill:#fde8e8;stroke:#e5484d}
.kk-innen{fill:#fff;stroke:var(--ink);stroke-width:1}
.kk-raum__name{font-size:11px;font-weight:600;fill:var(--ink)}
.kk-raum__kw{font-size:12px;font-weight:800;fill:var(--blue)}
.kk-aussen rect{fill:#fff;stroke:var(--ink);stroke-width:1.6}
.kk-aussen circle{fill:none;stroke:var(--blue);stroke-width:1.6}
.kk-aussen path{fill:none;stroke:#5d666f;stroke-width:1.4;stroke-linecap:round}
.kk-aussen__text{font-size:10px;font-weight:700;fill:var(--ink)}
.kk-leer{font-size:13px;font-weight:600;fill:var(--muted)}

/* ---------- Raum hinzufügen ---------- */
.kk-neu{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;margin:.6rem 0 1.2rem}
.kk-neu button{display:flex;align-items:center;gap:.6rem;padding:.75rem .9rem;border:2px dashed #b9c7d6;border-radius:14px;background:#fff;color:var(--ink);font:inherit;font-weight:600;font-size:.93rem;cursor:pointer;text-align:left}
.kk-neu button .ic{flex:none;width:22px;height:22px;color:var(--blue)}
.kk-neu button:hover{border-color:var(--blue);border-style:solid;background:#eef5fd}
.kk-neu button:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.kk-neu button:disabled{opacity:.45;cursor:not-allowed;background:#fff;border-style:dashed;border-color:#b9c7d6}

/* ---------- Raumkarten ---------- */
.kk-raeume{display:grid;gap:.8rem}
.kk-karte{border:1px solid var(--line);border-radius:16px;padding:1rem 1.1rem;background:#fff;box-shadow:0 2px 8px rgba(20,24,28,.05)}
.kk-karte--neu{animation:kk-neu .35s ease-out}
@keyframes kk-neu{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.kk-karte--neu{animation:none}}
.kk-karte__kopf{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:.7rem;margin-bottom:.2rem}
.kk-karte__kopf strong{font-size:1.05rem}
.kk-karte__ic{width:38px;height:38px;border-radius:10px;background:#eef5fd;color:var(--blue);display:grid;place-items:center}
.kk-karte .pk-regler input[type=range]{margin-top:.5rem}
.kk-karte__zeile{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin-top:.6rem;flex-wrap:wrap}
.kk-chip{display:inline-block;padding:.3rem .7rem;border-radius:999px;font-weight:700;font-size:.85rem;white-space:nowrap;background:#eef5fd;color:var(--blue-d)}
.kk-chip--mittel{background:#fff4e0;color:#8a5a00}
.kk-chip--hoch{background:#fde8e8;color:#a3191e}

/* Drei Möglichkeiten als Segmentleiste: weniger Platz als Kacheln, eine Zeile je Frage */
.kk-segment{display:inline-flex;border:2px solid var(--line);border-radius:999px;padding:2px;background:var(--alt)}
.kk-segment label{position:relative;cursor:pointer}
.kk-segment input{position:absolute;opacity:0;width:1px;height:1px}
.kk-segment span{display:block;padding:.4rem .85rem;border-radius:999px;font-size:.88rem;font-weight:600;color:var(--muted);white-space:nowrap}
.kk-segment label:hover span{color:var(--ink)}
.kk-segment input:checked+span{background:var(--blue);color:#fff}
.kk-segment input:focus-visible+span{outline:3px solid var(--blue);outline-offset:1px}

/* ---------- Komfort ---------- */
.kk-kacheln--drei{grid-template-columns:repeat(3,1fr)}
.kk-klein{display:block;font-weight:400;font-size:.8rem;color:var(--muted)}

/* ---------- Ergebnis ---------- */
.kk-vorteile{margin-bottom:1rem}
.kk-vorteile h3{display:flex;align-items:center;gap:.5rem}
.kk-vorteile h3 .ic{color:var(--blue)}
.kk-vorteile ul{margin:0;padding-left:1.1rem;display:grid;gap:.5rem}

/* Alle Spalten mit minmax(0,…): Mit 1fr zählt die Mindestbreite des Inhalts („Arbeitszimmer“, drei
   Segmentknöpfe nebeneinander), und Kacheln und Raumkarten ragten am iPhone über den Rand. */
.kk-raeume{grid-template-columns:minmax(0,1fr)}
.kk-karte{min-width:0}

@media (max-width:760px){
  .pk-bilanzleiste strong{white-space:nowrap;font-size:.95rem}
  #klima .pk-kennzahl strong{font-size:1.15rem}
  .kk-neu{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
  .kk-neu button{flex-direction:column;justify-content:center;text-align:center;gap:.3rem;padding:.6rem .4rem;font-size:.88rem;line-height:1.2}
  .kk-karte{padding:.85rem .8rem}
  .kk-kacheln--drei{grid-template-columns:1fr}
  .kk-kacheln--drei .pk-kachel label{flex-direction:row;text-align:left;justify-content:flex-start}
  .kk-karte__kopf{grid-template-columns:auto 1fr auto}
  .kk-karte__kopf .kk-chip{grid-column:2/3;grid-row:2;justify-self:start}
  .kk-karte__zeile{flex-direction:column;align-items:flex-start;gap:.35rem}
  .kk-segment{width:100%;display:flex}
  .kk-segment label{flex:1 1 0;min-width:0}
  .kk-segment span{text-align:center;padding:.45rem .2rem;font-size:.8rem;white-space:normal;line-height:1.15;height:100%;display:flex;align-items:center;justify-content:center}
}
