/* Theme Part M46 - Text & Karte (prototype "Spielplan": Halle & Anfahrt)
   Text column 837 of 1486 (text max 482, facts across the column), map in
   the 649 column, as high as the text column (at least 416px). */

section.m46_text_karte .m46_text_karte_main {
	display: flex;
	align-items: stretch;
}

section.m46_text_karte .m46_text_spalte {
	flex: 0 0 56.33%;             /* 837 / 1486 */
	min-width: 0;
	padding-right: 48px;          /* gap between the fact lines and the map (User 16.11.) */
}

section.m46_text_karte .m46_untertitel_container,
section.m46_text_karte .m46_titel_container {
	margin: 0;
}

section.m46_text_karte .m46_untertitel {
	max-width: none;
	margin: 0 0 2px;
}

section.m46_text_karte .m46_titel {
	margin: 0;
}

section.m46_text_karte .m46_text_container {
	max-width: 482px;
	margin-top: 20px;
}

section.m46_text_karte .m46_text_container p {
	max-width: none;
}

section.m46_text_karte .m46_text_container > :last-child {
	margin-bottom: 0;
}

/* ---- Facts ---- */
section.m46_text_karte .m46_infos {
	margin: 28px 0 0;
	border-top: 2px solid #57708F;
}

section.m46_text_karte .m46_info {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 53px;
	padding: 12px 0;
	border-bottom: 1px solid rgba(113, 113, 118, .3);
}

section.m46_text_karte .m46_info_bezeichnung {
	flex: 0 0 150px;
	margin: 0;
	font-weight: 400;
	--font_color: #57708F;
}

section.m46_text_karte .m46_info_wert {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-weight: 700;
}

section.m46_text_karte .m46_links_container {
	margin-top: 32px;
}

/* ---- Map (plugin markup) ---- */
section.m46_text_karte .m46_karte_spalte {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
}

section.m46_text_karte .m46_karte_container {
	flex: 1 1 auto;
	display: flex;
	min-height: 416px;
}

/* The plugin sets a fixed height per map; here it follows the text column */
section.m46_text_karte .m46_karte_container .btw_maps {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	margin: 0;
}

section.m46_text_karte .m46_karte_container .btw_maps_map_wrap {
	flex: 1 1 auto;
	height: auto;
	min-height: 416px;
}

/* Placeholder before consent (plugin markup): brand blue, theme button */
section.m46_text_karte .m46_karte_container .btw_maps {
	--btw-maps-accent: var(--btw_red, #DF1721);
	--btw-maps-accent-text: #FFFFFF;
}

section.m46_text_karte .m46_karte_container .btw_maps_map_wrap {
	background-color: var(--btw_blue, #1D4D8E);
}

/* Same look as the map placeholder of the layout: grid, two streets, dark towards the bottom */
section.m46_text_karte .btw_maps_consent {
	align-items: flex-start;
	padding: 32px 32px 0;
	padding-top: 22%;
	background:
		linear-gradient(0deg, rgba(18, 49, 87, .92), rgba(18, 49, 87, .25) 70%),
		repeating-linear-gradient(0deg, transparent 0 46px, rgba(255, 255, 255, .06) 46px 47px),
		repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, .06) 46px 47px),
		linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, .12) 44% 46%, transparent 46%),
		linear-gradient(28deg, transparent 0 62%, rgba(255, 255, 255, .1) 62% 63.5%, transparent 63.5%),
		#1D4D8E;
	--font_color: #FFFFFF;
}

section.m46_text_karte .btw_maps_consent_inner {
	gap: 18px;
}

/* White like the text around it: the plugin's accent red was hard to read on blue */
section.m46_text_karte .btw_maps .btw_maps_consent a.btw_maps_link {
	color: #FFFFFF;
	text-decoration: underline;
}

section.m46_text_karte .btw_maps_consent_btn {
	flex: 0 0 auto;
	height: 54px;
	padding: 4px 36px 0 26px;
	border: 0;
	border-radius: 0;
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.5;
	cursor: pointer;
	clip-path: polygon(-1px -1px, calc(100% + 0.11px) -1px, calc(100% - 6.11px) calc(100% + 1px), -1px calc(100% + 1px));
	transition: background-color .4s;
}

section.m46_text_karte .btw_maps_consent_btn:hover,
section.m46_text_karte .btw_maps_consent_btn:focus-visible {
	opacity: 1;
	background-color: #B8101A;
}

/* The clip-path would cut the focus ring: draw it inside */
section.m46_text_karte .btw_maps_consent_btn:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: -4px;
}

/* Caption bottom left (layout), above the map and the placeholder, clear of
   the Google logo; only the link takes clicks */
section.m46_text_karte .m46_karte_container {
	position: relative;
}

section.m46_text_karte .m46_karte_beschriftung {
	position: absolute;
	left: 40px;
	right: 40px;
	bottom: 40px;
	z-index: 3;
	pointer-events: none;
	--font_color: #FFFFFF;
}

section.m46_text_karte .m46_karte_titel {
	max-width: none;
	margin: 0;
	font-family: var(--h_font_family, var(--font_family));
	font-weight: 900;
	font-size: 1.75rem;           /* 28px */
	line-height: 1;
	text-transform: uppercase;
	font-variation-settings: "slnt" -7;
}

section.m46_text_karte .m46_karte_text {
	max-width: none;
	margin: 6px 0 0;
	opacity: .75;
}

section.m46_text_karte .m46_karte_link_container {
	margin-top: 20px;
}

section.m46_text_karte .m46_karte_link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--h_font_family, var(--font_family));
	font-weight: 700;
	font-size: 1.125rem;          /* 18px */
	line-height: 24px;
	text-transform: uppercase;
	text-decoration: none;
	font-variation-settings: "slnt" -7;
	pointer-events: auto;
}

section.m46_text_karte .m46_pfeil {
	flex: 0 0 5.4px;
	width: 5.4px;
	height: 9.4px;
	fill: currentColor;
	transition: transform .3s;
}

@media (hover: hover) {
	section.m46_text_karte .m46_karte_link:hover .m46_pfeil {
		transform: translateX(4px);
	}
}

section.m46_text_karte .m46_karte_link:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 4px;
}

/* Placeholder visible (no map yet): the caption leaves the overlay and
   follows the placeholder in the flow, else they cover each other when the
   box is low or narrow. The blue map look moves to the whole box, so
   placeholder and caption stay one surface. Once the map loads, the plugin
   hides the placeholder and the caption sits on the map again. */
section.m46_text_karte .m46_karte_container:has(.btw_maps_consent:not([hidden])) {
	flex-direction: column;
	border-radius: var(--btw-maps-radius, 4px);
	background:
		linear-gradient(0deg, rgba(18, 49, 87, .92), rgba(18, 49, 87, .25) 70%),
		repeating-linear-gradient(0deg, transparent 0 46px, rgba(255, 255, 255, .06) 46px 47px),
		repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, .06) 46px 47px),
		linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, .12) 44% 46%, transparent 46%),
		linear-gradient(28deg, transparent 0 62%, rgba(255, 255, 255, .1) 62% 63.5%, transparent 63.5%),
		#1D4D8E;
}

section.m46_text_karte .m46_karte_container:has(.btw_maps_consent:not([hidden])) .btw_maps_map_wrap {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: none;
}

/* The map's own dark edge (plugin setting) would end above the caption as a
   seam; the box background already darkens towards the bottom */
section.m46_text_karte .m46_karte_container:has(.btw_maps_consent:not([hidden])) .btw_maps_gradient {
	display: none;
}

section.m46_text_karte .m46_karte_container:has(.btw_maps_consent:not([hidden])) .btw_maps_consent {
	position: relative;
	inset: auto;
	flex: 1 1 auto;
	align-items: center;
	padding: 48px 40px 32px;
	background: none;
}

section.m46_text_karte .m46_karte_container:has(.btw_maps_consent:not([hidden])) .m46_karte_beschriftung {
	position: static;
	padding: 0 40px 40px;
	background: none;
}

/* ---- Responsive ---- */
@media all and (max-width: 991px) {
	section.m46_text_karte .m46_text_karte_main {
		flex-direction: column;
	}
	section.m46_text_karte .m46_text_spalte {
		flex: 0 0 auto;
		padding-right: 0;
	}
	section.m46_text_karte .m46_karte_spalte {
		flex: 0 0 auto;
		margin-top: 40px;
	}
	section.m46_text_karte .m46_text_container { max-width: 600px; }
}

@media all and (max-width: 575px) {
	section.m46_text_karte .m46_info {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
	section.m46_text_karte .m46_info_bezeichnung {
		flex: 0 0 auto;
		font-size: 0.875rem;
	}
	section.m46_text_karte .m46_links_container { margin-top: 28px; }
	section.m46_text_karte .m46_karte_spalte { margin-top: 32px; }
	section.m46_text_karte .m46_karte_container,
	section.m46_text_karte .m46_karte_container .btw_maps_map_wrap { min-height: 360px; }
	/* Small map: the caption goes below it, else it covers the placeholder */
	section.m46_text_karte .m46_karte_container { flex-direction: column; }
	section.m46_text_karte .m46_karte_beschriftung {
		position: static;
		padding: 22px 20px 24px;
		background-color: #123157;
	}
	section.m46_text_karte .m46_karte_titel { font-size: 1.5rem; }
	section.m46_text_karte .btw_maps_consent { padding: 24px 20px; align-items: center; }
	section.m46_text_karte .m46_karte_container:has(.btw_maps_consent:not([hidden])) .btw_maps_consent { padding: 32px 20px 24px; }
	section.m46_text_karte .m46_karte_container:has(.btw_maps_consent:not([hidden])) .m46_karte_beschriftung { padding: 0 20px 24px; }
}

/* Narrow screens: long buttons may wrap, with room above and below (as m37) */
@media all and (max-width: 375px) {
	section.m46_text_karte .m46_links_container .mM_button {
		height: auto;
		min-height: 54px;
		padding-top: 14px;
		padding-bottom: 12px;
		white-space: normal;
		text-align: left;
	}
}
