/* Jägerhof Status-Player (Webseite + App-Vorschau) */
html.jhs-lock, html.jhs-lock body { overflow: hidden !important; }

.jhs-overlay {
	position: fixed; inset: 0; z-index: 2147483000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(12, 12, 12, .55);
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
	opacity: 0; transition: opacity .25s ease, background-color .5s ease;
	font-family: Montserrat, system-ui, sans-serif;
	-webkit-tap-highlight-color: transparent;
}
.jhs-overlay.is-in { opacity: 1; }

.jhs-stage {
	position: relative; overflow: hidden; background: #141414;
	--r: .5625;
	--jhs-h: min(82vh, 980px, calc(96vw / var(--r)));
	height: var(--jhs-h); width: calc(var(--jhs-h) * var(--r));
	border-radius: 18px;
	box-shadow: 0 0 0 1px rgba(211, 174, 110, .35), 0 30px 80px rgba(0, 0, 0, .65);
	touch-action: pan-x; user-select: none; -webkit-user-select: none;
	-webkit-touch-callout: none;
}
@media (max-width: 640px) {
	.jhs-stage { --jhs-h: min(78vh, 78dvh, calc(88vw / var(--r))); height: var(--jhs-h); width: calc(var(--jhs-h) * var(--r)); border-radius: 16px; }
}

.jhs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

.jhs-stage::before, .jhs-stage::after { content: ""; position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; }
.jhs-stage::before { top: 0; height: 110px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.jhs-stage::after { bottom: 0; height: 60px; background: linear-gradient(transparent, rgba(0, 0, 0, .25)); }

.jhs-bars {
	position: absolute; z-index: 3; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top));
	display: flex; gap: 4px;
}
.jhs-bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.jhs-bar i { display: block; height: 100%; background: #d3ae6e; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* Bedienelemente – mit erhöhter Spezifität, damit Theme/Divi-Button-Stile sie nicht überschreiben */
html body .jhs-overlay button.jhs-close,
html body .jhs-overlay button.jhs-pause,
html body .jhs-overlay button.jhs-nav {
	position: absolute; z-index: 4; margin: 0 !important; padding: 0 !important;
	width: 40px !important; height: 40px !important; min-height: 0 !important; line-height: 1 !important;
	border-radius: 50% !important; border: 1px solid rgba(255, 255, 255, .28) !important; cursor: pointer;
	background: rgba(18, 18, 18, .78) !important; color: #ffffff !important; box-shadow: none !important; text-shadow: none !important;
	font-size: 0 !important; text-transform: none !important; letter-spacing: 0 !important;
	display: grid; place-items: center; opacity: 1;
}
html body .jhs-overlay button.jhs-close { right: 10px; top: calc(24px + env(safe-area-inset-top)); }
html body .jhs-overlay button.jhs-pause { right: 58px; top: calc(24px + env(safe-area-inset-top)); }
html body .jhs-overlay button.jhs-nav { top: 50%; transform: translateY(-50%); width: 46px !important; height: 46px !important; display: none; }
html body .jhs-overlay button.jhs-prev { left: 10px; }
html body .jhs-overlay button.jhs-next { right: 10px; }
@media (hover: hover) and (pointer: fine) {
	html body .jhs-overlay button.jhs-nav { display: grid; }
	html body .jhs-overlay button.jhs-nav[hidden] { display: none; }
}
html body .jhs-overlay button.jhs-close:hover,
html body .jhs-overlay button.jhs-pause:hover,
html body .jhs-overlay button.jhs-nav:hover { background: rgba(50, 50, 50, .95) !important; border-color: #d3ae6e !important; color: #ffffff !important; }
html body .jhs-overlay button:focus-visible, html body button.jhs-info:focus-visible { outline: 2px solid #ffffca !important; outline-offset: 2px; }
/* Icon-Farben direkt am SVG (das Child-Theme erzwingt für Buttons per !important schwarze Schrift) */
.jhs-overlay svg, .jhs-info svg { width: 22px; height: 22px; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
.jhs-overlay svg, .jhs-overlay svg path { fill: none !important; stroke: #ffffff !important; }
.jhs-info svg, .jhs-info svg path { fill: none !important; stroke: #ffffca !important; }
.jhs-pause svg path[d^="M7 4.5"] { fill: #ffffff !important; }

/* Info-Button unten links (Webseite) */
html body button.jhs-info {
	position: fixed; z-index: 99990; margin: 0 !important; padding: 0 !important;
	left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom));
	width: 48px !important; height: 48px !important; min-height: 0 !important; line-height: 1 !important;
	border-radius: 50% !important; cursor: pointer; font-size: 0 !important;
	display: grid; place-items: center;
	background: #262626 !important; color: #ffffca !important; border: 1px solid #d3ae6e !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .45) !important; text-shadow: none !important;
	transition: transform .2s ease, border-color .2s ease;
}
html body button.jhs-info[hidden] { display: none; }
@media (max-width: 767px) {
	html body button.jhs-info { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 40px); left: 14px; width: 40px !important; height: 40px !important; }
	html body button.jhs-info svg { width: 19px; height: 19px; }
}
html body button.jhs-info:hover { background: #333333 !important; border-color: #ffffca !important; transform: scale(1.06); }
html body button.jhs-info:hover svg, html body button.jhs-info:hover svg path { stroke: #ffffff !important; }
.jhs-info::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(211, 174, 110, .5); animation: jhs-pulse 2.6s ease-out 3; pointer-events: none; }
@keyframes jhs-pulse { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

/* Schließen: Fenster schrumpft in den Info-Button */
.jhs-overlay.is-out { background: rgba(12, 12, 12, 0); -webkit-backdrop-filter: none; backdrop-filter: none; }
.jhs-stage.is-fly { transition: transform .9s cubic-bezier(.6, .02, .3, 1), border-radius .9s ease, opacity .4s ease .55s; opacity: 0; transform-origin: 50% 50%; }
.jhs-stage.is-fly > *:not(.jhs-img) { opacity: 0; transition: opacity .15s ease; }
html body button.jhs-info.is-wait { opacity: 0; }
html body button.jhs-info.is-land { animation: jhs-land .6s cubic-bezier(.3, 1.6, .5, 1) 2; }
.jhs-stage.is-grow { transition: transform .9s cubic-bezier(.35, .1, .25, 1), border-radius .9s ease, opacity .3s ease; }
.jhs-stage.is-pre > *:not(.jhs-img) { opacity: 0; }
.jhs-stage.is-grow > *:not(.jhs-img) { transition: opacity .35s ease .5s; }
@keyframes jhs-land { 0% { transform: scale(.7); } 55% { transform: scale(1.3); box-shadow: 0 0 0 8px rgba(211, 174, 110, .35); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
	.jhs-overlay, .jhs-info { transition: none; }
	.jhs-info::after, .jhs-spin { animation: none; }
}
