/* Udo Modal – Anpassung über CSS-Variablen im Customizer/Elementor Custom CSS */
:root {
	--udo-modal-bg: #ffffff;
	--udo-modal-color: inherit;
	--udo-modal-backdrop: rgba(20, 24, 30, 0.6);
	--udo-modal-radius: 12px;
	--udo-modal-width: 640px;
	--udo-modal-padding: 2.25rem;
	--udo-modal-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	--udo-modal-duration: 320ms;
}

.udo-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	box-sizing: border-box;
}
.udo-modal[hidden] { display: none; }

.udo-modal__backdrop {
	position: absolute;
	inset: 0;
	background: var(--udo-modal-backdrop);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity var(--udo-modal-duration) ease;
}

.udo-modal__panel {
	position: relative;
	width: 100%;
	max-width: var(--udo-modal-width);
	max-height: calc(100vh - 2.5rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--udo-modal-bg);
	color: var(--udo-modal-color);
	border-radius: var(--udo-modal-radius);
	box-shadow: var(--udo-modal-shadow);
	padding: var(--udo-modal-padding);
	box-sizing: border-box;
	opacity: 0;
	transform: translateY(24px) scale(0.96);
	transition:
		opacity var(--udo-modal-duration) ease,
		transform var(--udo-modal-duration) cubic-bezier(0.22, 1, 0.36, 1);
}
.udo-modal__panel:focus { outline: none; }

/* Sichtbarer Zustand → Animation */
.udo-modal.is-open .udo-modal__backdrop { opacity: 1; }
.udo-modal.is-open .udo-modal__panel {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.udo-modal__close {
	position: absolute;
	z-index: 10;
	top: 0.9rem;
	right: 0.9rem;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	opacity: 0.75;
	background: rgba(255, 255, 255, 0.85);
	transition: opacity 150ms ease, background 150ms ease;
}
.udo-modal__close:hover,
.udo-modal__close:focus-visible {
	opacity: 1;
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.udo-modal__title {
	margin: 0 2.5rem 1rem 0;
	font-size: 1.5rem;
	line-height: 1.25;
}

.udo-modal__content { max-width: 65ch; }
.udo-modal__content > :first-child { margin-top: 0; }
.udo-modal__content > :last-child { margin-bottom: 0; }

/* Trigger als Textlink */
.udo-modal-trigger--link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Body-Scroll sperren, wenn ein Modal offen ist */
body.udo-modal-open { overflow: hidden; }

/* Bewegung reduzieren, wenn vom System gewünscht */
@media (prefers-reduced-motion: reduce) {
	.udo-modal__backdrop,
	.udo-modal__panel { transition: opacity 120ms ease; transform: none; }
}

@media (max-width: 600px) {
	:root { --udo-modal-padding: 1.5rem; }
	.udo-modal { padding: 0.75rem; }
}

/* Mit Elementor gebaute Modals: volle Breite, kein Textmaß */
.udo-modal--elementor .udo-modal__content { max-width: none; }
.udo-modal--elementor .udo-modal__panel { padding: var(--udo-modal-padding-elementor, 1.5rem); }
