/* Event-Popup – Frontend. Alle Klassen mit snep- Präfix, damit das Theme nicht hineinfunkt. */

html.snep-lock { overflow: hidden; }

.snep-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.72);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.snep-overlay.snep-visible { opacity: 1; }

.snep-dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 720px;
	max-height: 100%;
	overflow: auto;
	padding: 20px 20px 16px;
	background: #fff;
	color: #222;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
	text-align: center;
	transform: translateY(12px);
	transition: transform 0.25s ease;
}
.snep-visible .snep-dialog { transform: none; }
.snep-dialog:focus { outline: none; }

.snep-title {
	margin: 0 44px 14px;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1.25;
	color: inherit;
}

.snep-media {
	display: block;
	margin: 0 auto;
	text-decoration: none;
	border: 0;
}
a.snep-media:focus-visible { outline: 3px solid #1e73be; outline-offset: 3px; }

.snep-img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: calc(100vh - 200px);
	margin: 0 auto;
	object-fit: contain;
	border-radius: 4px;
}
a.snep-media .snep-img { cursor: pointer; }

.snep-slide[hidden] { display: none; }

.snep-overlay button {
	font: inherit;
	line-height: 1;
	margin: 0;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}

.snep-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	padding: 0;
	font-size: 38px;
	color: #222;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.7;
	z-index: 2;
}
.snep-close:hover { background: transparent; opacity: 1; }
.snep-close:focus-visible,
.snep-arrow:focus-visible,
.snep-dot:focus-visible { outline: 3px solid #1e73be; outline-offset: 2px; }

.snep-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 14px;
}

.snep-stage { position: relative; }

/* Pfeile leicht transparent links/rechts mittig über dem Bild */
.snep-arrow {
	position: absolute;
	top: 50%;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	font-size: 30px;
	color: #fff;
	background: rgba(0, 0, 0, 0.35);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.15s ease, background 0.15s ease;
}
.snep-arrow:hover { background: rgba(0, 0, 0, 0.6); opacity: 1; }
.snep-prev { left: 10px; }
.snep-next { right: 10px; }

.snep-dots { display: flex; gap: 4px; align-items: center; }

/* Große Klickfläche, kleiner sichtbarer Punkt */
.snep-dot {
	position: relative;
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
}
.snep-dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	background: #bbb;
	border-radius: 50%;
}
.snep-dot[aria-current="true"]::before { background: #222; }

.snep-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 480px) {
	.snep-dialog { padding: 16px 12px 12px; }
	.snep-title { font-size: 1.2rem; margin: 0 40px 10px; }
	.snep-img { max-height: calc(100vh - 180px); }
	.snep-arrow { width: 36px; height: 36px; margin-top: -18px; font-size: 24px; }
	.snep-prev { left: 6px; }
	.snep-next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.snep-overlay,
	.snep-dialog { transition: none; }
}
