/* Gasyco – Schema (Aufgabe 1.20, anforderungen/schema.md)
   Teile, die schema.js erzeugt (Halte-Zone, aufspringendes Produktbild, geöffnetes Popup, Bottom-Sheet, Schleier) und die
   Zustände der SVG-Gruppen. Die Bricks-Elemente der Komponente (Grafik, Daten, Popup-Inhalt) tragen globale Klassen schema*
   (tools/komponenten-1.20.py). Lädt nach Bricks und ACSS über das Modul-Register (inc/schema.php).
   Modus-Klassen setzt das Skript: .schema--maus (Hover-Gerät ≥ 900 px) / .schema--touch (Touch oder < 900 px). */

@keyframes schemaPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1.16); } }
@keyframes schemaFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes schemaSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes schemaVeilIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Zustände der Gerätegruppen ------------------------------------------------------------ */
/* Geräte-Schema am Desktop: aktives Gerät blendet aus (das Produktbild springt an seiner Stelle auf) */
.schema--maus[data-art="geraete"] g[data-hotspot].ist-aktiv { opacity: 0; }
/* Touch/Mobil: Glühen statt Ausblenden (Vorlage „Schema … - Mobil“) */
.schema--touch g[data-hotspot].ist-aktiv { filter: drop-shadow(0 0 9px color-mix(in srgb, var(--primary) 60%, transparent)); }
/* Einsatzgebiete (Speziallösungen): roter Ring der Gruppe 0 → .18 */
.schema g[data-hotspot].ist-aktiv circle[data-ring],
.schema g[data-hotspot].ist-fokus circle[data-ring] { opacity: .18; }
/* Fokus-Modus (Produktseite): Gerät des aktuellen Produkts ausgeblendet, Bild steht statisch an seiner Box */
.schema g[data-hotspot].ist-fokus { opacity: 0; }

/* --- Overlay im Schema (Kinder von .schema, Prozentwerte aus ACF positionen) ----------------- */
.schema__zone { position: absolute; z-index: 2; }
.schema__bild {
  position: absolute;
  z-index: 3;
  object-fit: contain;
  pointer-events: none;
  transform-origin: 50% 60%;
  filter: var(--schatten-schema-bild);
  animation: schemaPop .5s cubic-bezier(.2, .7, .2, 1) both;
}
.schema__bild--fokus { animation: none; transform: scale(1.16); }
.schema__popup--offen {
  position: absolute;
  z-index: 4;
  animation: schemaFade .45s .08s cubic-bezier(.2, .7, .2, 1) both;
}
.schema__popup--offen:focus { outline: none; }

/* --- Bottom-Sheet (Touch oder < 900 px), hängt am body ----------------------------------- */
.schema-schleier {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--base) 32%, transparent);
  animation: schemaVeilIn .3s ease both;
}
.schema-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 91;
  box-sizing: border-box;
  max-height: 78%;
  overflow-y: auto;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--white);
  color: var(--base);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--schatten-sheet);
  hyphens: manual;   /* Vorlage trennt nicht (ACSS setzt hyphens auto) */
  animation: schemaSheetUp .45s cubic-bezier(.2, .7, .2, 1) both;
}
.schema-sheet:focus { outline: none; }
.schema-sheet__griff { width: 36px; height: 4px; margin: 0 auto; border-radius: 999px; background: var(--linie-3); }
.schema-sheet__kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.schema-sheet__kopf .schema__eyebrow { font-size: 10px; line-height: 1.3; letter-spacing: .16em; }
/* Schließen-Knopf 36 px, Trefferfläche 44 px über ::before; „body button.…“ wegen ACSS-Button-Regeln (0,1,1) */
body button.schema-sheet__schliessen {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--linie-2);
  border-radius: 999px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--base);
  box-shadow: none;
}
body button.schema-sheet__schliessen::before { content: ""; position: absolute; inset: -4px; border-radius: 999px; }
body button.schema-sheet__schliessen svg { width: 14px; height: 14px; display: block; stroke: currentColor; }
body button.schema-sheet__schliessen:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.schema-sheet__bildflaeche {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--verlauf-produktkarte);
}
.schema-sheet__bild { height: 130px; width: auto; max-width: 80%; object-fit: contain; filter: var(--schatten-sheet-bild); }
.schema-sheet .schema__name { font-size: 20px; line-height: 1.25; }
.schema-sheet .schema__text { font-size: 14px; line-height: 1.5; }
.schema-sheet .schema__varianten,
.schema-sheet .schema__kennzahlen { gap: 6px; border-top-color: var(--linie-hell); padding-top: 10px; }
.schema-sheet .schema__varianten-titel { font-size: 10px; letter-spacing: .14em; }
.schema-sheet .schema__variante,
.schema-sheet .schema__kennzahl { font-size: var(--text-s); line-height: 1.35; }
/* Link als Pill-Button mit Verlauf (Vorlage „Zur Produktseite →“ / „Mehr erfahren →“) */
.schema-sheet .schema__link,
.schema-sheet .schema__link:hover,
.schema-sheet .schema__link:focus-visible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  margin-top: 0;
  border-radius: 999px;
  background: var(--verlauf-rot);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
}
.schema-sheet .schema__link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.schema-sheet .schema__popup > :empty { display: none; }

/* --- EN-Beschriftung im SVG (3b.14) -------------------------------------------------------- */
/* TranslatePress übersetzt die Textknoten der Inline-SVGs über ein Wörterbuch (eine Fassung je DE-Text). „Kalibriergase“ →
   „Calibration gases“ ist im Lebensmittel-Schema (desktop, mittig bei x 1515) 30 Einheiten breiter und schnitte rechts den
   Rahmen (x 1570); schema-svg.md LMD11 sah dort „Cal. gases“ vor. Nur diese Beschriftung unter /en/ 12 Einheiten nach links. */
html[lang|="en"] svg text[x="1515"][y="416"] { transform: translateX(-12px); }

/* --- Reduzierte Bewegung ------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .schema__bild { animation: none; transform: scale(1.16); }
  .schema__popup--offen, .schema-sheet, .schema-schleier { animation: none; }
}
