/* Raum-Visualisierung: zusätzliche Stile (ergänzt app.css) */

/* Leere Ansicht: "Aus Offerte erstellen" */
.viz-leer { padding: 40px 20px 44px; }
.viz-leer h2 { margin: 0 0 10px; color: var(--fg); font-size: 19px; letter-spacing: -.01em; }
.viz-leer .hinweis { max-width: 560px; margin: 14px auto 18px; }
.vz-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 620px; margin: 0 auto; }
.vz-tag { background: var(--accent-soft); color: var(--fg-2); border: 0; border-radius: var(--r); padding: 3px 10px; font-size: 13px; font-weight: 500; }
.vz-leer-knoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* "Mehr Optionen" (Fuge, Muster, Verschnitt …) */
.vz-mehr { margin: 2px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunk); }
.vz-mehr > summary { cursor: pointer; padding: 8px 12px; font-size: 14px; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.vz-mehr > summary::-webkit-details-marker { display: none; }
.vz-mehr > summary::before { content: "▸"; color: var(--muted); font-weight: 400; transition: transform .15s; display: inline-block; }
.vz-mehr[open] > summary::before { transform: rotate(90deg); }
.vz-mehr > summary .klein-grau { font-weight: 400; }
.vz-mehr > :not(summary) { margin-left: 12px; margin-right: 12px; }
.vz-mehr[open] { padding-bottom: 4px; }

/* Produkte in diesem Raum */
.viz-legende { padding: 14px; }
.viz-legende h2 { margin: 0 0 10px; }
.vl-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.vl-eintrag { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: var(--surface); min-width: 0; }
.vl-eintrag img, .vl-ohne { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.vl-ohne { background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--surface) 6px 12px); }
.vl-eintrag > div { min-width: 0; display: flex; flex-direction: column; }
.vl-eintrag small { color: var(--muted); font-size: 12px; }
.vl-eintrag strong { font-weight: 600; font-size: 13.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 640px) {
  .viz-leer { padding: 28px 14px; }
  .vz-leer-knoepfe .knopf { flex: 1 1 100%; }
  .raum-reiter .knopf { flex: 1 1 auto; }
}

/* 3D: Ansicht wählen, Foto-Rendering */
.ansicht-wahl { margin: 0; display: inline-grid; grid-template-columns: auto auto; }
.ansicht-wahl button { padding: 6px 12px; white-space: nowrap; }
.bild-kopf { align-items: center; }
.foto-tipp { margin: 10px 2px 0; }
.foto-leiste { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.foto-leiste.veraltet { border-color: #e2b46b; background: color-mix(in srgb, #e2b46b 14%, var(--surface)); }
.foto-leiste .foto-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.foto-leiste .ok { color: #2f7a46; }
.foto-leiste .warn { color: #9a5a0c; }
.foto-mini { border: 0; padding: 0; background: none; cursor: zoom-in; flex: 0 0 auto; }
.foto-mini img { display: block; width: 112px; height: 70px; object-fit: cover; border-radius: 6px; }
.foto-gross { display: block; width: 100%; height: auto; border-radius: 8px; }
.fr-bild { position: relative; border-radius: 8px; overflow: hidden; background: #e9e7e2; }
.fr-bild canvas { display: block; width: 100%; height: auto; }
.fr-warte { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.fr-status { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.fr-balken { flex: 1; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.fr-balken div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
@media (max-width: 760px) {
  .foto-leiste { flex-wrap: wrap; }
  .foto-mini img { width: 96px; height: 60px; }
  .ansicht-wahl { width: 100%; grid-template-columns: 1fr 1fr; }
}

/* Fotos des gewählten Produkts (Boden/Wand) */
.foto-streifen { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: -2px 0 10px; }
.foto-streifen img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.foto-streifen > span { flex: 1 1 180px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Gestalten mit KI (Chat unter der 3D-Ansicht) */
.ki-chat { margin-top: 16px; }
.ki-kopf { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ki-kopf h2 { margin: 0; }
.ki-verlauf { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 0 10px; }
.ki-tipp { margin: 0; }
.ki-blase { max-width: 88%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ki-blase.du { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.ki-blase.ki { align-self: flex-start; background: color-mix(in srgb, var(--line) 45%, var(--surface)); border-bottom-left-radius: 4px; }
.ki-blase.fehler { background: var(--bad-bg); color: var(--bad); }
.ki-blase img { display: block; max-width: 180px; max-height: 120px; border-radius: 6px; margin-bottom: 6px; object-fit: cover; }
.ki-blase .ki-n { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; white-space: normal; }
.ki-denkt { opacity: .8; font-style: italic; }
@media (prefers-reduced-motion: no-preference) { .ki-denkt { animation: ki-puls 1.4s ease-in-out infinite; } @keyframes ki-puls { 50% { opacity: .45; } } }
.ki-eingabe { display: flex; gap: 8px; align-items: flex-start; }
.ki-eingabe textarea { flex: 1; margin: 0; resize: vertical; min-height: 46px; }
.ki-knoepfe { display: flex; flex-direction: column; gap: 6px; }
.ki-knoepfe .datei-knopf { text-align: center; }
.ki-fuss { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.vz-gestaltung .zwei { margin-top: 8px; }

/* Einzelne Wand anders belegen (Akzentwand) */
.wand-einzeln { margin: 4px 0 6px; display: grid; gap: 6px; }
.wand-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wand-chips .chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); border-radius: var(--r); padding: 4px 11px; font-size: 13px; cursor: pointer; }
.wand-chips .chip.an { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.wand-chips .chip.an::after { content: " ●"; color: var(--accent); }
.wand-chips .chip.aktiv { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.wand-einzeln-box { background: var(--sunk); border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; }
.vz-teil.vz-einzeln { border: 1px solid var(--accent); border-radius: var(--r); padding: 4px 12px 8px; margin: 0; }
.vz-teil.vz-einzeln legend { padding: 0 6px; margin-left: -6px; }
