/**
 * Teaser-Popup (Gaeste) – z-index über .popup (1000)
 */

.tpop-overlay {
	position: fixed;
	inset: 0;
	z-index: 2000;
	background: rgba(30, 34, 38, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tpop-overlay.tpop-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.tpop-lock {
	overflow: hidden;
}

.tpop-dialog {
	position: relative;
	background: #3d4349;
	color: #e8eef2;
	border-radius: 12px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
	max-width: 720px;
	width: 100%;
	max-height: 92vh;
	overflow: auto;
	padding: 44px 28px 28px;
	box-sizing: border-box;
}

/* Nur das X direkt über dem dunklen Haupt-Popup */
.tpop-dialog > .tpop-close {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 2;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 40px;
	line-height: 1;
	color: #ffffff;
	cursor: pointer;
	opacity: 0.9;
	padding: 0;
}

.tpop-dialog > .tpop-close:hover,
.tpop-dialog > .tpop-close:focus {
	opacity: 1;
	outline: none;
	color: #ffffff;
}

.tpop-close {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 2;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 40px;
	line-height: 1;
	color: #535353;
	cursor: pointer;
	opacity: 0.75;
	padding: 0;
}

.tpop-detail-overlay .tpop-close {
	color: #535353;
}

.tpop-close:hover,
.tpop-close:focus {
	opacity: 1;
	outline: none;
}

.tpop-br-mobile {
	display: none;
}

.tpop-h2 {
	margin: 0 0 14px 0;
	font-size: 1.35rem;
	line-height: 1.25;
	font-weight: 700;
	color: #2c3e50;
}

.tpop-dialog .tpop-h2 {
	color: #ffffff;
}

.tpop-intro,
.tpop-lead {
	font-size: 1.05rem;
	line-height: 1.45;
	color: #34434d;
	margin: 0 0 18px 0;
}

.tpop-dialog .tpop-intro,
.tpop-dialog .tpop-lead {
	color: #e8eef2;
}

.tpop-muted {
	font-size: 0.9rem;
	color: #708090;
	margin: 0 0 12px 0;
}

.tpop-dialog .tpop-muted {
	color: #b8c5ce;
}

.tpop-thanks-event {
	margin: 14px 0 20px;
	padding: 14px 16px;
	background: #f7f9fa;
	border-radius: 8px;
	border: 1px solid #e4e8ea;
}

.tpop-thanks-datetime {
	margin: 0 0 10px 0 !important;
}

.tpop-thanks-title-p {
	margin: 0 0 10px 0;
	font-size: 1.06rem;
	line-height: 1.35;
}

.tpop-thanks-details-p {
	margin: 0;
	font-size: 1rem;
	line-height: 1.35;
	color: #34434d;
}

.tpop-thanks-event-link {
	color: #236b8e;
	font-weight: 600;
	text-decoration: underline;
}

.tpop-thanks-event-link:hover,
.tpop-thanks-event-link:focus {
	color: #1a5470;
}

.tpop-hidden {
	display: none !important;
}

.tpop-actions-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 22px;
}

.tpop-btn-snooze {
	display: block;
	width: 100%;
	max-width: 420px;
	margin: 14px auto 0;
	box-sizing: border-box;
	padding: 10px 16px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	border-radius: 8px;
	border: 2px solid #cdd5db;
	background: #fff;
	color: #445563;
	transition: border-color 0.15s, background 0.15s;
}

.tpop-btn-snooze:hover,
.tpop-btn-snooze:focus {
	outline: none;
	border-color: #93b512;
	background: #fafcf5;
}

.tpop-btn {
	cursor: pointer;
	border-radius: 8px;
	padding: 12px 22px;
	font-size: 1rem;
	font-weight: 600;
	border: 2px solid #595959;
	transition: background 0.15s, color 0.15s;
}

.tpop-btn-primary {
	background: #93b512;
	border-color: #75920e;
	color: #fff;
}

.tpop-btn-primary:hover,
.tpop-btn-primary:focus {
	background: #7ea00f;
}

.tpop-btn-secondary {
	background: #f1f4f6;
	color: #34434d;
}

.tpop-btn-block {
	display: block;
	width: 100%;
	margin-top: 12px;
	box-sizing: border-box;
}

.tpop-btn-link {
	display: block;
	width: 100%;
	margin-top: 16px;
	padding: 10px;
	background: transparent;
	border: none;
	color: #236b8e;
	text-decoration: underline;
	cursor: pointer;
	font-size: 0.95rem;
}

.tpop-dialog .tpop-btn-link {
	color: #9fd3ff;
	text-decoration-color: rgba(159, 211, 255, 0.7);
}

.tpop-dialog .tpop-btn-link:hover,
.tpop-dialog .tpop-btn-link:focus {
	color: #c5e7ff;
}

.tpop-events-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 8px;
}

.tpop-ev-card {
	flex: 1 1 160px;
	max-width: 200px;
	box-sizing: border-box;
	border: 2px solid #e4e8ea;
	border-radius: 10px;
	padding: 10px 10px 12px;
	cursor: pointer;
	text-align: center;
	background: #ffffff;
	transition: border-color 0.15s, box-shadow 0.15s;
	overflow: hidden;
}

.tpop-ev-card:hover,
.tpop-ev-card:focus {
	outline: none;
	border-color: #93b512;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.tpop-ev-selected {
	border-color: #93b512;
	box-shadow: 0 0 0 2px rgba(147, 181, 18, 0.35);
	background: #ffffff;
}

.tpop-ev-photo-wrap {
	display: block;
	width: calc(100% + 20px);
	margin: -10px -10px 8px -10px;
	box-sizing: border-box;
	overflow: hidden;
	border-radius: 8px 8px 0 0;
}

.tpop-ev-photo-wrap img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	object-fit: cover;
	aspect-ratio: 178 / 100;
	border-radius: 0;
}

.tpop-ev-date {
	font-size: 0.8rem;
	color: #708090;
	margin-bottom: 4px;
}

.tpop-ev-title {
	font-weight: 700;
	font-size: 0.9rem;
	line-height: 1.25;
	color: #2c3e50;
	min-height: 2.5em;
	overflow: hidden;
	cursor: pointer;
}

.tpop-btn-details {
	display: inline-block;
	margin-top: 8px;
	padding: 4px 10px;
	font-size: 0.85rem;
	background: transparent;
	border: none;
	color: #236b8e;
	text-decoration: underline;
	cursor: pointer;
}

.tpop-label {
	display: block;
	font-size: 0.88rem;
	font-weight: 600;
	margin-top: 10px;
	margin-bottom: 4px;
	color: #445;
}

.tpop-dialog .tpop-label {
	color: #dbe4ea;
}

.tpop-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 2px solid #afafaf;
	border-radius: 6px;
	font-size: 1rem;
}

.tpop-error {
	color: #8b1a1a;
	font-size: 0.9rem;
	margin-top: 10px;
}

.tpop-dialog .tpop-error {
	margin: 0 0 12px 0;
	color: #ffffff;
	background: #c41e3a;
	border: 1px solid #9e1830;
	border-radius: 6px;
	padding: 10px 12px;
	line-height: 1.4;
}

.tpop-detail-overlay {
	position: fixed;
	inset: 0;
	z-index: 2100;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	box-sizing: border-box;
}

.tpop-detail-box {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 96%;
	max-width: 900px;
	height: 85vh;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.tpop-detail-iframe {
	display: block;
	width: 100%;
	height: calc(100% - 0px);
	border: 0;
	border-radius: 10px;
	background: #fff;
}

.tpop-detail-overlay .tpop-close {
	top: 4px;
	right: 8px;
	z-index: 3;
}

.tpop-sib-wrap .tpop-sib-captcha {
	margin: 14px 0 6px;
}

.tpop-sib-wrap .tpop-recaptcha-note {
	display: block;
	margin-top: 8px;
}

/* Newsletter (Brevo) im Popup – kompakter */
.tpop-sib-wrap .tpop-divnewsletter {
	box-sizing: border-box;
	max-width: 100%;
	margin: 16px 0 0 0;
	padding: 16px;
	border: 2px solid #d0d8de;
	border-radius: 8px;
	text-align: left;
}

.tpop-sib-wrap .newsletter-p2,
.tpop-nl-legalese {
	margin: 14px 0 0 0;
	font-size: 0.82rem;
	line-height: 1.35;
	color: #8899a6;
}

.tpop-sib-wrap .input.sib-input {
	width: 100%;
	box-sizing: border-box;
}

.tpop-optin-row {
	font-size: 0.88rem;
	line-height: 1.35;
	margin-top: 10px;
}

.tpop-opt-span {
	margin-left: 6px;
}

.tpop-optin-row label {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	cursor: pointer;
}

@media (max-width: 520px) {
	.tpop-br-mobile {
		display: block;
	}

	.tpop-dialog {
		padding: 42px 14px 18px;
		max-height: 94vh;
	}

	.tpop-h2 {
		line-height: 1.3;
	}

	.tpop-events-grid {
		flex-direction: column;
		align-items: stretch;
	}

	/* Karten nicht per flex-grow verzerren; Text unter dem Foto sichtbar lassen */
	.tpop-ev-card {
		flex: 0 0 auto;
		width: 100%;
		max-width: none;
		overflow: visible;
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.tpop-ev-photo-wrap {
		flex-shrink: 0;
	}

	.tpop-ev-date,
	.tpop-ev-title,
	.tpop-btn-details {
		display: block;
		position: relative;
		z-index: 1;
		width: 100%;
		box-sizing: border-box;
	}

	.tpop-ev-date {
		margin-top: 2px;
	}

	.tpop-ev-title {
		min-height: 0;
		max-height: none;
		overflow: visible;
		-webkit-line-clamp: unset;
		line-clamp: unset;
		display: block;
	}
}
