/* Schacht – Förderturm Animation
   Reines Dekor über die gesamte Seitenhöhe, blockiert keine Klicks.
   Farben/Tempo kommen aus den Plugin-Einstellungen (CSS-Variablen, mit Fallback).
   Pfade/Höhe werden von assets/js/schacht.js berechnet. */

#schacht-rig {
	/* Fallback-Werte – per Einstellungen überschrieben */
	--schacht-tower: #141414;
	--schacht-cable: #1b1b1b;
	--schacht-rail:  #141414;
	--schacht-speed: 15s;

	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 0;                        /* JS setzt die volle Dokumenthöhe */
	z-index: 9990;
	pointer-events: none;             /* niemals Klicks abfangen */
	overflow: hidden;                 /* keine horizontale Scrollleiste */
}

#schacht-rig .schacht-defs { position: absolute; width: 0; height: 0; }

/* ---------- Seile + Schiene (ganzseitiges SVG) ---------- */
.schacht-lines {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: block;
}
.schacht-cable {
	fill: none;
	stroke: var(--schacht-cable);
	stroke-width: 3.5;
	stroke-linecap: round;
}
.schacht-rail {
	fill: none;
	stroke: var(--schacht-rail);
	stroke-width: 3.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.schacht-tie {
	fill: none;
	stroke: var(--schacht-rail);
	stroke-width: 3;
	stroke-linecap: round;
}

/* ---------- Turm ---------- */
.schacht-tower {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
}
.schacht-fill { fill: var(--schacht-tower); }
.schacht-coal { fill: var(--schacht-tower); }
.schacht-hub  { fill: #f4f4f4; }
.schacht-strut {
	fill: none;
	stroke: var(--schacht-tower);
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.schacht-strut--thin { stroke-width: 2.4; }
.schacht-ring { fill: none; stroke: var(--schacht-tower); stroke-width: 4.5; }
.schacht-spokes path { fill: none; stroke: var(--schacht-tower); stroke-width: 2; stroke-linecap: round; }

/* Seilscheiben drehen mit – kehren an den Umkehrpunkten gemeinsam um */
.schacht-wheel { transform-box: fill-box; transform-origin: center; }
.schacht-wheel--left  { animation: schacht-spin var(--schacht-speed) ease-in-out infinite alternate; }
.schacht-wheel--right { animation: schacht-spin var(--schacht-speed) ease-in-out infinite alternate-reverse; }

@keyframes schacht-spin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(540deg); }
}

/* ---------- Loren: im Wechsel hoch & runter (gegenläufig) ---------- */
.schacht-lore {
	position: absolute;
	top: 0;
	left: 0;
	width: 30px;
	height: 23px;
	display: block;
	offset-rotate: 0deg;             /* Lore bleibt aufrecht */
	offset-anchor: 50% 82%;          /* Räder sitzen auf Seil/Schiene */
	animation: schacht-run var(--schacht-speed) ease-in-out infinite alternate;
}
/* zweite Lore läuft genau gegenläufig: eine runter, während die andere hoch */
.schacht-lore--b { animation-direction: alternate-reverse; }

@keyframes schacht-run {
	from { offset-distance: 0%; }
	to   { offset-distance: 100%; }
}

/* ---------- Sichtbarkeit / Platz ---------- */
@media (max-width: 768px) {
	#schacht-rig { display: none; }   /* nur wenn links Platz ist */
}

/* Akku schonen, wenn Tab im Hintergrund */
#schacht-rig.is-paused * { animation-play-state: paused !important; }

/* Bewegung reduzieren: statisch anzeigen (JS setzt offset-distance) */
@media (prefers-reduced-motion: reduce) {
	#schacht-rig * { animation: none !important; }
}
