/* Ueberdachungs-Konfigurator: Hotspots, Montagewunsch, Druckfassung */

/* ---- 3D-Hotspots ---------------------------------------------------------- */
.kfg-hotspots { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.kfg-hotspots[hidden], .kfg-hot[hidden], .kfg-hot-info[hidden] { display: none; }
.kfg-hot {
  position: absolute; inset-inline-start: 0; top: 0; width: 44px; height: 44px; padding: 0; margin: 0;
  border: 0; background: transparent; cursor: pointer; pointer-events: auto; will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.kfg-hot-punkt {
  position: absolute; inset: 9px; border-radius: 50%;
  background: var(--akzent); border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(15, 16, 18, .35), 0 4px 12px rgba(47, 59, 255, .35);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.kfg-hot-punkt::before, .kfg-hot-punkt::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: #fff; border-radius: 1px;
  transform: translate(-50%, -50%);
}
.kfg-hot-punkt::before { width: 8px; height: 2px; }
.kfg-hot-punkt::after { width: 2px; height: 8px; transition: transform .2s var(--ease); }
.kfg-hot:hover .kfg-hot-punkt { transform: scale(1.12); }
.kfg-hot.ist-aktiv .kfg-hot-punkt { background: var(--graphit); }
.kfg-hot.ist-aktiv .kfg-hot-punkt::after { transform: translate(-50%, -50%) scaleY(0); }
.kfg-hot:focus-visible { outline: none; }
.kfg-hot:focus-visible .kfg-hot-punkt { outline: 3px solid var(--graphit); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .kfg-hot:not(.ist-aktiv) .kfg-hot-punkt { animation: kfg-hot-puls 2.6s ease-out infinite; }
}
@keyframes kfg-hot-puls {
  0% { box-shadow: 0 1px 3px rgba(15, 16, 18, .35), 0 0 0 0 rgba(47, 59, 255, .45); }
  70%, 100% { box-shadow: 0 1px 3px rgba(15, 16, 18, .35), 0 0 0 12px rgba(47, 59, 255, 0); }
}

.kfg-hot-info {
  position: absolute; inset-inline-start: 12px; top: 12px; z-index: 7; width: min(380px, calc(100% - 84px));
  max-height: calc(100% - 24px); overflow: auto; padding: 14px 16px 12px;
  border-radius: 14px; border: 1px solid var(--linie-stark);
  background: color-mix(in srgb, var(--flaeche) 95%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 16, 18, .2); color: var(--tinte);
}
.kfg-hot-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kfg-hot-titel { font-size: 16px; letter-spacing: -.01em; }
.kfg-hot-zu {
  flex: none; width: 36px; height: 36px; margin: -6px 0; margin-inline-end: -8px; border: 0; border-radius: 50%;
  background: transparent; color: var(--tinte-weich); font-size: 22px; line-height: 1; cursor: pointer;
}
.kfg-hot-zu:hover { background: var(--flaeche-2); }
.kfg-hot-zu:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.kfg-hot-liste { margin: 8px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.45; color: var(--tinte-weich); }
.kfg-hot-beleg { margin: 10px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--tinte-blass); }

@media (max-width: 900px) {
  /* Sieben Werkzeuge muessen in die 320 px hohe Buehne passen */
  .kfg-tools { gap: 5px; }
  .kfg-tools .kfg-rund { width: 38px; height: 38px; }
  /* Erklaerung als Blatt am unteren Rand der Buehne, gut mit dem Daumen erreichbar */
  .kfg-hot-info { inset-inline-start: 8px; inset-inline-end: 8px; top: auto; bottom: 8px; width: auto; max-height: 62%; }
}

/* ---- Montage und Lieferung ------------------------------------------------ */
.kfg-montage { display: grid; gap: 16px; margin-bottom: 18px; }
.kfg-gruppe-hilfe { margin: 0; font-size: 13px; line-height: 1.45; color: var(--tinte-weich); }
.kfg-gruppe { display: grid; gap: 8px; }
.kfg-gruppe-titel { margin: 0; font: 600 13px var(--schrift-text); color: var(--tinte); }
.kfg-gruppe .wahl-raster { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kfg-plz input { width: 9ch; max-width: 100%; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.kfg-plz .fehler[hidden] { display: none; }
.kfg-aktion-meldung { align-self: center; font-size: 13px; color: var(--tinte-weich); }
.kfg-aktion-meldung:empty { display: none; }

/* ---- Druckfassung --------------------------------------------------------- */
#kfg-druck { display: none; }

@media print {
  @page { size: A4; margin: 14mm 15mm; }
  html, body { background: #fff !important; color: #111 !important; }
  body > *:not(#kfg-druck) { display: none !important; }
  #kfg-druck {
    display: block !important; font: 400 10.5pt/1.45 "Mona Sans", "Segoe UI", system-ui, sans-serif; color: #111;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  #kfg-druck h1 { font-size: 19pt; line-height: 1.15; letter-spacing: -.01em; margin: 6mm 0 4mm; }
  #kfg-druck h2 {
    font-size: 11.5pt; margin: 0 0 2mm; padding-bottom: 1mm; border-bottom: 1.2pt solid #111;
    text-transform: none; letter-spacing: 0;
  }
  .dr-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10mm; padding-bottom: 4mm; border-bottom: 2pt solid #111; }
  .dr-logo { height: 11mm; width: auto; display: block; }
  .dr-meta { display: grid; justify-items: end; font-size: 9.5pt; color: #333; }
  #kfg-druck section, #kfg-druck header, #kfg-druck footer { padding: 0 !important; min-height: 0 !important; }
  .dr-abschnitt { margin: 0 0 5mm !important; break-inside: avoid; }
  .dr-bild { display: block; width: 100%; max-height: 85mm; object-fit: contain; border: .6pt solid #bbb; border-radius: 2mm; }
  .dr-zeichnung svg { width: 100%; height: auto; max-height: 90mm; }
  .dr-tab { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .dr-tab th { text-align: start; padding: 1.2mm 2mm; background: #ececec; font-weight: 600; border-bottom: .6pt solid #999; }
  .dr-tab td { padding: 1.3mm 2mm; border-bottom: .4pt solid #ccc; vertical-align: top; }
  .dr-tab tr { break-inside: avoid; }
  .dr-kv td:first-child { width: 38%; color: #444; }
  .dr-num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .dr-mono { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 9pt; }
  .dr-summe { font-weight: 700; }
  .dr-klein { margin: 2mm 0 0; font-size: 8.5pt; line-height: 1.4; color: #444; }
  .dr-liste { margin: 0; padding-inline-start: 5mm; font-size: 9pt; line-height: 1.45; }
  .dr-fuss { margin-top: 4mm; padding-top: 3mm; border-top: .6pt solid #999; break-inside: avoid; }
  .dr-link { margin: 0 0 1mm; font-size: 8.5pt; word-break: break-all; }
}

/* Im letzten Schritt gibt es kein "Weiter" mehr (hidden darf nicht von display ueberstimmt werden) */
.kfg-leiste-weiter[hidden] { display: none; }
@media (max-width: 520px) {
  .kfg-gruppe .wahl-raster { grid-template-columns: 1fr; }
}
