/* Popups (Ersatz für Elementor Pro) – siehe inc/popup.php */

.sv-popup {
	--sv-popup-width: 640px;
	--sv-popup-height: auto;

	box-sizing: border-box;
	width: var(--sv-popup-width);
	height: var(--sv-popup-height);
	max-width: 100vw;
	max-height: 100vh;
	max-height: 100dvh;
	margin: auto;
	padding: 0;
	border: 0;
	overflow: auto;
	color: inherit;
	background: #fff;
	box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
}

.sv-popup[open] {
	display: flex;
	align-items: center;
	animation: sv-popup-fade-in 1.2s;
}

.sv-popup::backdrop {
	background-color: rgba(0, 0, 0, 0.8);
}

.sv-popup__content {
	width: 100%;
	max-height: 100%;
}

.sv-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	color: #333;
	background: rgba(255, 255, 255, 0.85);
	cursor: pointer;
}

.sv-popup__close:hover,
.sv-popup__close:focus {
	color: #000;
	background: #fff;
}

/* Seite nicht scrollen, solange ein Popup offen ist. */
html:has(.sv-popup[open]) {
	overflow: hidden;
}

@media (max-width: 767px) {
	.sv-popup {
		width: var(--sv-popup-width-mobile, var(--sv-popup-width));
		height: var(--sv-popup-height-mobile, var(--sv-popup-height));
	}
}

@keyframes sv-popup-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sv-popup[open] {
		animation: none;
	}
}
