/*
 * Termin-Modalfenster (16.11.2026) – geladen von hooks/termin-modal.php zusammen mit css/termin.css
 * (Infokasten und Knöpfe kommen von dort bzw. aus body.css). Farben und Schriften nur über Kit-Globals.
 */

html.lm-tm-offen{ overflow: hidden; }

.lm-tm{
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.lm-tm[hidden]{ display: none; }
.lm-tm-hintergrund{
	position: fixed;
	inset: 0;
	background: rgba(30, 27, 27, .72);
}
.lm-tm-fenster{
	position: relative;
	width: 100%;
	max-width: 1000px;
	margin: auto;
	background: var(--e-global-color-c9a4f81);
	color: var(--e-global-color-3d5fc400);
	border-radius: 3px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	outline: 0;
	animation: lm-tm-ein .22s ease-out;
}
@keyframes lm-tm-ein{
	from{ opacity: 0; transform: translateY(12px); }
	to{ opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce){
	.lm-tm-fenster{ animation: none; }
}

/* Schließen (Theme und Elementor färben jeden button rot – deshalb hier ausdrücklich) */
.lm-tm button.lm-tm-zu{
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-width: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--e-global-color-c9a4f81) !important;
	color: var(--e-global-color-3d5fc400) !important;
	font-family: Arial, sans-serif;
	font-size: 28px !important;
	font-weight: 400;
	line-height: 1 !important;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
	transition: background-color .2s, color .2s;
}
.lm-tm button.lm-tm-zu span{ display: block; margin-top: -3px; }
.lm-tm button.lm-tm-zu:hover,
.lm-tm button.lm-tm-zu:focus-visible{
	background: var(--e-global-color-3d5fc400) !important;
	color: var(--e-global-color-c9a4f81) !important;
}
.lm-tm button.lm-tm-zu:focus-visible{ outline: 2px solid var(--e-global-color-c9a4f81); outline-offset: 2px; }

.lm-tm-laedt{
	margin: 0;
	padding: 70px 24px;
	text-align: center;
	color: var(--e-global-color-79b6df38);
}

/* Kopf: rote Titelbox | Bild (wie auf der Termin-Detailseite) */
.lm-tm-kopf{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	border-radius: 3px 3px 0 0;
	overflow: hidden;
}
.lm-tm-rot{
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
	padding: 36px 32px;
	background: var(--e-global-color-ff51695);
	color: var(--e-global-color-c9a4f81);
	text-align: center;
}
.lm-tm-kopf > .lm-tm-rot:only-child{ grid-column: 1 / -1; padding-right: 64px; padding-left: 64px; }
.lm-tm-rot .lm-termin-dach{
	margin: 0;
	color: rgba(255, 255, 255, .85);
	font-size: var(--e-global-typography-lmdach-font-size);
	font-weight: var(--e-global-typography-lmdach-font-weight);
	letter-spacing: .1em;
	text-transform: uppercase;
}
.lm-tm-rot .lm-termin-status{
	align-self: center;
	margin: 0;
	padding: 2px 10px;
	border-radius: 3px;
	background: var(--e-global-color-c9a4f81);
	color: var(--e-global-color-ff51695);
	font-size: var(--e-global-typography-lmklein-font-size);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.lm-tm-rot .lm-tm-titel{
	margin: 0;
	color: var(--e-global-color-c9a4f81);
	font-family: var(--e-global-typography-lmh2-font-family), sans-serif;
	font-size: var(--e-global-typography-lmh2-font-size);
	font-weight: var(--e-global-typography-lmh2-font-weight);
	line-height: var(--e-global-typography-lmh2-line-height, 1.2);
	hyphens: auto;
	overflow-wrap: break-word;
}
.lm-tm-rot .lm-termin-wann{
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	color: var(--e-global-color-c9a4f81);
	font-size: var(--e-global-typography-lmintro-font-size);
	line-height: 1.35;
}
.lm-tm-bild{
	min-height: 260px;
	background: var(--e-global-color-e859e7d);
}
.lm-tm-bild img{
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Inhalt: Beschreibung | Infokasten */
.lm-tm-inhalt{
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	padding: 36px 32px 40px;
}
.lm-tm-inhalt.lm-tm-ohne-text{
	grid-template-columns: minmax(0, 420px);
	justify-content: center;
}
.lm-tm-inhalt .lm-termin-text{
	font-size: var(--e-global-typography-text-font-size, inherit);
	line-height: 1.6;
}
.lm-tm-inhalt .lm-termin-text > :first-child{ margin-top: 0; }
.lm-tm-inhalt .lm-termin-text > :last-child{ margin-bottom: 0; }
.lm-tm-inhalt .lm-termin-text a{ color: var(--e-global-color-ff51695); }
.lm-tm-inhalt .lm-termin-text img{ max-width: 100%; height: auto; }

/* Tablet und Handy: alles untereinander, Fenster bis an den Rand */
@media (max-width: 767px){
	.lm-tm{ padding: 0; }
	.lm-tm-fenster{ min-height: 100%; border-radius: 0; box-shadow: none; }
	.lm-tm-kopf{ grid-template-columns: minmax(0, 1fr); border-radius: 0; }
	.lm-tm-rot{ padding: 56px 20px 28px; }
	.lm-tm-kopf > .lm-tm-rot:only-child{ padding-right: 20px; padding-left: 20px; }
	.lm-tm-bild{ min-height: 0; aspect-ratio: 16 / 10; }
	.lm-tm-inhalt{ grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 20px 36px; }
	.lm-tm-inhalt .lm-tm-infos{ order: -1; }
	.lm-tm button.lm-tm-zu{ position: fixed; top: 10px; right: 10px; }
}
