/* TSP Pop-up: <dialog>. Mobil Bottom-Sheet ohne Bild, ab 768px 840px Karte mit Bild links. */

html.tsp-popup-open {
	overflow: hidden;
}

.tsp-popup {
	position: fixed;
	inset: auto 0 0 0;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: calc(100dvh - 24px);
	margin: 0;
	padding: 0;
	border: 0;
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--tsp-page);
	color: var(--tsp-text);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}
.tsp-popup:not([open]) {
	display: none;
}
.tsp-popup::backdrop {
	background: rgba(35, 53, 89, 0.45);
}
.tsp-popup[open] {
	animation: tsp-sheet-in 0.28s ease-out;
}
.tsp-popup[open]::backdrop {
	animation: tsp-fade-in 0.28s ease-out;
}

.tsp-popup .tsp-popup__card {
	display: block;
}
.tsp-popup .tsp-popup__media {
	display: none;
}
.tsp-popup .tsp-popup__content {
	padding: 24px 20px 32px;
	background: var(--tsp-page);
}

/* Varianten der Komponente im Pop-up */
.tsp-signup--popup {
	--tsp-gap: 16px;
}
.tsp-signup--popup .tsp-title {
	font-size: 22px;
	line-height: 1.3;
}
.tsp-signup--popup .tsp-lead {
	font-size: 14px;
	line-height: 1.65;
}
.tsp-signup--popup .tsp-form__row {
	gap: 16px;
}
.tsp-signup--popup .tsp-form--profile {
	gap: 16px;
}

@media (min-width: 768px) {
	.tsp-popup {
		inset: 0;
		height: fit-content; /* sonst streckt inset: 0 den Dialog auf Fensterhoehe */
		width: min(840px, calc(100vw - 48px));
		max-height: calc(100dvh - 48px);
		margin: auto;
		box-shadow: 0 16px 24px rgba(0, 0, 0, 0.18);
	}
	.tsp-popup[open] {
		animation: tsp-card-in 0.28s ease-out;
	}
	.tsp-popup .tsp-popup__card {
		display: grid;
		grid-template-columns: 3fr 4fr; /* 360 : 480 */
		min-height: 100%;
	}
	.tsp-popup .tsp-popup__media {
		display: block;
		position: relative;
		overflow: hidden;
	}
	.tsp-popup .tsp-popup__img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		max-width: none;
		object-fit: cover;
		object-position: center 20%;
	}
	.tsp-popup .tsp-popup__content {
		min-width: 0;
		padding: 48px;
	}
	.tsp-signup--popup .tsp-title {
		font-size: 30px;
		line-height: 1.25;
	}
}

@keyframes tsp-sheet-in {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: none; opacity: 1; }
}
@keyframes tsp-card-in {
	from { transform: translateY(12px); opacity: 0; }
	to { transform: none; opacity: 1; }
}
@keyframes tsp-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

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