:root {
	--etl-popup-space: 1rem;
	--etl-popup-radius: .25rem;
	--etl-popup-shadow: 0 1rem 3rem rgba(0, 0, 0, .22);
	--etl-popup-focus: #005fcc;
	--etl-popup-overlay-dark: rgba(0, 0, 0, .55);
	--etl-popup-overlay-light: rgba(255, 255, 255, .72);
}

body.etl-popup-modal-open { overflow: hidden; }
.etl-popup-root { position: relative; z-index: 99990; }
.etl-popup-shell[hidden], .etl-popup-restore[hidden] { display: none !important; }

.etl-popup-shell {
	position: fixed;
	inset: 0;
	display: flex;
	padding: var(--etl-popup-space);
	pointer-events: none;
}
.etl-popup-shell.is-document-positioned { position: absolute; }
.etl-popup-shell.has-overlay.etl-popup-overlay-dark { background: var(--etl-popup-overlay-dark); }
.etl-popup-shell.has-overlay.etl-popup-overlay-light { background: var(--etl-popup-overlay-light); }
.etl-popup-shell.etl-popup-mode-modal.has-overlay { pointer-events: auto; }
.etl-popup-position-top-left { align-items: flex-start; justify-content: flex-start; }
.etl-popup-position-top-center { align-items: flex-start; justify-content: center; }
.etl-popup-position-top-right { align-items: flex-start; justify-content: flex-end; }
.etl-popup-position-middle-left { align-items: center; justify-content: flex-start; }
.etl-popup-position-center { align-items: center; justify-content: center; }
.etl-popup-position-middle-right { align-items: center; justify-content: flex-end; }
.etl-popup-position-bottom-left { align-items: flex-end; justify-content: flex-start; }
.etl-popup-position-bottom-center { align-items: flex-end; justify-content: center; }
.etl-popup-position-bottom-right { align-items: flex-end; justify-content: flex-end; }

.etl-popup {
	position: relative;
	box-sizing: border-box;
	width: min(100%, 32.5rem);
	max-height: var(--etl-popup-max-height, 85vh);
	overflow: auto;
	color: var(--text_color, #58585a);
	background: #fff;
	border: var(--etl-popup-border-width, 0) solid var(--etl-popup-border-color, var(--primary_color, #00857d));
	border-radius: var(--etl-popup-radius);
	box-shadow: var(--etl-popup-shadow);
	pointer-events: auto;
	overscroll-behavior: contain;
}
.etl-popup-width-small .etl-popup { width: min(100%, 22.5rem); }
.etl-popup-width-medium .etl-popup { width: min(100%, 32.5rem); }
.etl-popup-width-large .etl-popup { width: min(100%, 45rem); }
.etl-popup-width-xlarge .etl-popup { width: min(100%, 60rem); }
.etl-popup-width-full .etl-popup { width: 100%; }
.etl-popup-width-custom .etl-popup { width: min(100%, var(--etl-popup-custom-width, 42rem)); }

.etl-popup-controls {
	position: absolute;
	top: .5rem;
	right: .5rem;
	z-index: 5;
	display: flex;
	gap: .25rem;
}
.etl-popup-close,
.etl-popup-drag-handle,
.etl-popup-restore {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: .5rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	color: var(--text_color, #58585a);
	background: #fff;
	font: inherit;
	line-height: 1;
	cursor: pointer;
}
.etl-popup-close { font-size: 1.5rem; }
.etl-popup-drag-handle { cursor: grab; }
.etl-popup-drag-handle:active { cursor: grabbing; }
.etl-popup-close:focus-visible,
.etl-popup-drag-handle:focus-visible,
.etl-popup-restore:focus-visible,
.etl-popup a:focus-visible,
.etl-popup button:focus-visible {
	outline: .2rem solid var(--etl-popup-focus);
	outline-offset: .15rem;
}

.etl-popup-content { background: var(--etl-popup-background, #fff); }
.etl-popup-content-inner { padding: clamp(1.25rem, 3vw, 2.25rem); }
.etl-popup-content-inner > :first-child { margin-top: 0; }
.etl-popup-content-inner > :last-child { margin-bottom: 0; }
.etl-popup-content h4 {
	margin: 0 3.5rem .75rem 0;
	color: var(--etl-popup-headline-color, var(--text_color, #58585a));
	font-size: clamp(1.2rem, 2.5vw, 1.6rem);
	line-height: 1.25;
}
.etl-popup-text { line-height: 1.55; }
.etl-popup-text > :last-child { margin-bottom: 0; }
.etl-popup-header-image { display: block; width: 100%; height: auto; }
.etl-popup-content-inner > a[class*="btn-teal-"] { margin-top: 1rem; }

.etl-popup-image-cta { position: relative; }
.etl-popup-image-cta picture,
.etl-popup-image-cta img { display: block; width: 100%; height: auto; }
.etl-popup-image-cta-button {
	position: absolute;
	z-index: 2;
	left: 1rem;
	right: 1rem;
	display: flex;
}

.etl-popup-image-cta-button > a[class*="btn-teal-"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: max-content;
	max-width: 80%;
	box-sizing: border-box;
	white-space: normal;
	overflow-wrap: anywhere;
	text-align: center;
}

/* Oben */
.etl-popup-button-position-top-left {
	top: 1rem;
	justify-content: flex-start;
}

.etl-popup-button-position-top-center {
	top: 1rem;
	justify-content: center;
}

.etl-popup-button-position-top-right {
	top: 1rem;
	justify-content: flex-end;
}

/* Mitte */
.etl-popup-button-position-middle-left {
	top: 50%;
	justify-content: flex-start;
	transform: translateY(-50%);
}

.etl-popup-button-position-center {
	top: 50%;
	justify-content: center;
	transform: translateY(-50%);
}

.etl-popup-button-position-middle-right {
	top: 50%;
	justify-content: flex-end;
	transform: translateY(-50%);
}

/* Unten */
.etl-popup-button-position-bottom-left {
	bottom: 1rem;
	justify-content: flex-start;
}

.etl-popup-button-position-bottom-center {
	bottom: 1rem;
	justify-content: center;
}

.etl-popup-button-position-bottom-right {
	bottom: 1rem;
	justify-content: flex-end;
}

@media (max-width: 575.98px) {
	.etl-popup-image-cta-button {
		left: .75rem;
		right: .75rem;
	}

	.etl-popup-image-cta-button > a[class*="btn-teal-"] {
		max-width: 100%;
	}
}

.etl-popup-restore {
	position: fixed;
	z-index: 99991;
	box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .2);
}
.etl-popup-restore.etl-popup-position-top-left { top: 1rem; left: 1rem; }
.etl-popup-restore.etl-popup-position-top-center { top: 1rem; left: 50%; transform: translateX(-50%); }
.etl-popup-restore.etl-popup-position-top-right { top: 1rem; right: 1rem; }
.etl-popup-restore.etl-popup-position-middle-left { top: 50%; left: 1rem; transform: translateY(-50%); }
.etl-popup-restore.etl-popup-position-center { right: 1rem; bottom: 1rem; }
.etl-popup-restore.etl-popup-position-middle-right { top: 50%; right: 1rem; transform: translateY(-50%); }
.etl-popup-restore.etl-popup-position-bottom-left { bottom: 1rem; left: 1rem; }
.etl-popup-restore.etl-popup-position-bottom-center { bottom: 1rem; left: 50%; transform: translateX(-50%); }
.etl-popup-restore.etl-popup-position-bottom-right { right: 1rem; bottom: 1rem; }

@media (max-width: 767px) {
	.etl-popup-device-desktop { display: none !important; }
	.etl-popup-shell { padding: .75rem; }
	.etl-popup { width: 100%; max-height: min(var(--etl-popup-max-height, 85vh), calc(100vh - 1.5rem)); }
	.etl-popup-drag-handle { display: none; }
	.etl-popup-content h4 { margin-right: 3rem; }
}
@media (min-width: 768px) {
	.etl-popup-device-mobile { display: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
	.etl-popup-shell:not([hidden]) .etl-popup { animation: etl-popup-in .18s ease-out; }
	@keyframes etl-popup-in { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: translateY(0); } }
}

/* Debug-Panel */

.etl-popup-debug-panel {
	position: fixed;
	left: 1rem;
	bottom: 1rem;
	z-index: 100000;
	width: min(32rem, calc(100vw - 2rem));
	max-height: min(75vh, 50rem);
	overflow: auto;
	box-sizing: border-box;
	border: 2px solid #222;
	border-radius: .25rem;
	color: #222;
	background: #fff;
	box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .3);
	font-family: Arial, sans-serif;
	font-size: .875rem;
	line-height: 1.4;
}

.etl-popup-debug-header {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .75rem 1rem;
	color: #fff;
	background: #222;
}

.etl-popup-debug-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	color: inherit;
	background: transparent;
	font: inherit;
	font-size: 1.25rem;
	cursor: pointer;
}

.etl-popup-debug-meta {
	padding: .75rem 1rem;
	border-bottom: 1px solid #ddd;
	background: #f5f5f5;
}

.etl-popup-debug-meta > * + * {
	margin-top: .25rem;
}

.etl-popup-debug-preview-notice {
	margin-top: .5rem;
	padding: .5rem;
	border-left: .25rem solid #b45309;
	background: #fff7ed;
	font-weight: 700;
}

.etl-popup-debug-items {
	padding: 1rem;
}

.etl-popup-debug-item {
	padding: .75rem;
	border: 1px solid #ccc;
	border-radius: .25rem;
}

.etl-popup-debug-item + .etl-popup-debug-item {
	margin-top: .75rem;
}

.etl-popup-debug-item h3 {
	margin: 0 0 .75rem;
	color: #222;
	font-size: 1rem;
}

.etl-popup-debug-item dl {
	margin: 0;
}

.etl-popup-debug-item dl > div {
	display: grid;
	grid-template-columns: 7rem 1fr;
	gap: .5rem;
	padding: .2rem 0;
}

.etl-popup-debug-item dt {
	font-weight: 700;
}

.etl-popup-debug-item dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.etl-popup-debug-item details {
	margin-top: .75rem;
}

.etl-popup-debug-rules {
	margin: .5rem 0 0;
	padding-left: 1.25rem;
}

.etl-popup-debug-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: .75rem;
}

.etl-popup-debug-actions a {
	text-decoration: underline;
}

.etl-popup-debug-ok {
	color: #166534;
	font-weight: 700;
}

.etl-popup-debug-error {
	color: #b91c1c;
	font-weight: 700;
}

.etl-popup-debug-muted {
	color: #666;
}

.etl-popup-debug-empty {
	margin: 0;
	padding: 1rem;
}