/* TG-Mipa Handball - global child styles */

/* ------------------------------------------------------------------ *
 * Project colours used in several places (header, footer, modules).
 * ------------------------------------------------------------------ */
:root {
	--btw_red: #DF1721;
	--btw_navy: #122945;
	--btw_blue: #1D4D8E;
}

/* ------------------------------------------------------------------ *
 * Nexa (BLUE THE WEB typeface), only used by the m57 BTW banner.
 * The parent has no font-file option, so the files live in the child.
 * ------------------------------------------------------------------ */
@font-face {
	font-family: "Nexa";
	src: url("../fonts/nexa-regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Nexa";
	src: url("../fonts/nexa-heavy.woff2") format("woff2");
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

/* ------------------------------------------------------------------ *
 * Header height: menu.js measures the unscrolled header and sets
 * --btw_header_height / --btw_topbar_height on <body>. These are only the
 * first-paint fallbacks (topbar 35 + band), so nothing jumps before the JS runs:
 * solid band 76 -> 111, hero overlay band 121 -> 156 (mobile 125 / 102 / 68).
 * ------------------------------------------------------------------ */
:root {
	--btw_header_height: 111px;
	--btw_topbar_height: 35px;
}

body:has(> main > section:is(.m25_hero, .m47_spielbericht, .mM_404):first-child) {
	--btw_header_height: 156px;
}

@media all and (max-width: 1399px) {
	body:has(> main > section:is(.m25_hero, .m47_spielbericht, .mM_404):first-child) {
		--btw_header_height: 160px;
	}
}

@media all and (max-width: 575px) {
	:root {
		--btw_header_height: 103px;
	}
	body:has(> main > section:is(.m25_hero, .m47_spielbericht, .mM_404):first-child) {
		--btw_header_height: 137px;
	}
}

/* ------------------------------------------------------------------ *
 * Typografie: Display-Schrift SemiSlanted (schräg) für Überschriften
 * und Eyebrow/Untertitel. Salford Sans VF slant-Achse (font-style:italic
 * wirkt bei dieser VF nicht, nur font-variation-settings "slnt").
 * ------------------------------------------------------------------ */
:root :is(h1, h2, h3, .h1, .h2, .h3),
:root [class$="_untertitel"] {
	font-variation-settings: "slnt" -7;
}

/* Eyebrow/Untertitel in der Display-Schrift */
:root [class$="_untertitel"] {
	font-family: var(--h_font_family, var(--font_family));
}

/* ------------------------------------------------------------------ *
 * Buttons: Marken-Geometrie + Schrägschnitt (Slant).
 * Farben + Fuell-Hover kommen aus den Theme-Optionen (--btn_*).
 * a.mM_button: höhere Spezifität als lib/custom/mM_verlinkung.css.
 * ------------------------------------------------------------------ */
a.mM_button,
button.mM_button {
	/* Figma: label 26px from the left, 36px from the right (slanted edge) and
	   2px below the centre (text box 17px from the top of the 54px button).
	   54px for every style: with 15px padding the border came on top (outline
	   2px = 58px, Instagram channels 1px = 56px next to 54px filled buttons).
	   13px + min-height keeps them all at 54px; the label stays centred.
	   (Not calc(15px - var(--btn_border_width)): the theme writes it as a
	   unitless "0" for borderless styles, which makes the padding invalid.) */
	padding: 13px 36px 13px 26px;
	min-height: 54px;
	box-sizing: border-box;
	align-items: center;
	gap: 10px;
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 1rem;      /* 16px */
	line-height: 1.5;
	white-space: nowrap;
	/* Rechte Kante angeschrägt (6px), Marken-Signatur. The polygon reaches 1px
	   beyond the box: borders snap to device pixels, the clip-path does not, so
	   on a fractional position it cut the top/bottom border off. The points
	   stay on the same slant line (6px per 54px = 0.11px per 1px). */
	clip-path: polygon(-1px -1px, calc(100% + 0.11px) -1px, calc(100% - 6.11px) calc(100% + 1px), -1px calc(100% + 1px));
}

.mM_button .mM_button_text {
	font-weight: 700;
}

/* Bordered buttons (outline): the clip-path cuts the right border off along the
   slant. Draw the stroke along the slanted edge as in Figma (2px inner stroke).
   Width = border width, so borderless buttons are not affected. The stroke
   covers the whole border box and is cut on the same line as the button
   (6px over the full height), so it meets the top and bottom border at any
   button height (a fixed skew only fitted 54px). */
a.mM_button::after,
button.mM_button::after {
	content: "";
	position: absolute;
	inset: calc(var(--btn_border_width, 0px) * -1);
	/* 1.5 x the border width: the slanted stroke is anti-aliased along the
	   clip edge and looked thinner than the straight sides */
	--btn_slant_w: calc(var(--btn_border_width, 0px) * 1.5);
	clip-path: polygon(calc(100% - var(--btn_slant_w)) 0, 100% 0, calc(100% - 6px) 100%, calc(100% - 6px - var(--btn_slant_w)) 100%);
	background-color: var(--btn_border_color);
	pointer-events: none;
	transition: background-color .4s;
}

a.mM_button:hover::after,
a.mM_button:focus-visible::after,
button.mM_button:hover::after,
button.mM_button:focus-visible::after {
	background-color: var(--btn_hover_border_color);
}

/* Outline: Figma puts the label 24px / 36px from the outer edge, incl. the 2px stroke */
a.mM_button.outline,
button.mM_button.outline {
	padding-left: 22px;
	padding-right: 34px;
}

/* Kein 5px-Reststreifen links im Ruhezustand (Design hat ihn nicht);
   der Fuell-Effekt waechst beim Hover trotzdem von links auf 100%. */
a.mM_button.mM_btn_fill::before,
button.mM_button.mM_btn_fill::before {
	width: 0;
}

/* Button-Reihe. div.mM_links: the parent's mM_verlinkung.css loads after this
   file and stretches the items - an arrow link next to a button then sat at
   the top of the row instead of on the button's centre */
.mM_links,
.mM_links_container,
div.mM_links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

/* ------------------------------------------------------------------ *
 * Arrow links (Theme-Optionen -> Links, styles "Pfeil ..."): label with
 * the Figma chevron 10px behind it. Colours come from the link style
 * (--lnk_*), the chevron is the SVG from the media library (link_icon).
 * Typography stays with the module (it differs per place in Figma).
 * ------------------------------------------------------------------ */
a.mM_link[class*=" pfeil"] {
	display: inline-flex;
	align-items: center;
}

a.mM_link[class*=" pfeil"] .mM_link_icon_wrap {
	margin-left: 10px;
}

a.mM_link[class*=" pfeil"] .mM_link_icon {
	width: 5.4px;
	min-width: 5.4px;
	height: 9.4px;
}

a.mM_link[class*=" pfeil"].mM_lnk_icon_motion:hover .mM_link_icon_wrap,
a.mM_link[class*=" pfeil"].mM_lnk_icon_motion:focus-visible .mM_link_icon_wrap {
	transform: translateX(4px);
}

/* ------------------------------------------------------------------ *
 * KI-Generiert Badge (sitewide, per-Modul-Schalter) + Hover-Tooltip.
 * ------------------------------------------------------------------ */
.tg_ki {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;           /* club 2026-11-13 "etwas kleiner" (was 34px / 13px); stays >= 24px, WCAG 2.5.8 */
	padding: 0 10px;
	font-family: var(--font_family);
	font-weight: 600;
	font-size: 0.6875rem;   /* 11px */
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(18, 41, 69, .55);
	border: 1px solid rgba(255, 255, 255, .18);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	cursor: default;
}

.tg_ki_icon {
	display: block;
	width: 11px;
	height: 11px;
	flex: 0 0 11px;
	fill: var(--btw_red);
	transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

/* Hover-Tooltip: dunkle Karte über dem Badge */
.tg_ki_pop {
	position: absolute;
	right: 0;
	left: auto;
	bottom: calc(100% + 12px);
	width: 268px;
	max-width: 80vw;
	padding: 14px 16px;
	background: #16263c;
	border: 1px solid rgba(255, 255, 255, .10);
	border-radius: 10px;
	box-shadow: 0 14px 34px rgba(0, 0, 0, .40);
	text-transform: none;
	letter-spacing: normal;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
	z-index: 5;
}

.tg_ki_pop_title {
	display: block;
	font-weight: 700;
	font-size: 0.9375rem;   /* 15px */
	line-height: 1.2;
	color: #fff;
	margin-bottom: 4px;
}

.tg_ki_pop_text {
	display: block;
	font-weight: 400;
	font-size: 0.8125rem;   /* 13px */
	line-height: 1.45;
	color: rgba(255, 255, 255, .72);
}

.tg_ki:hover,
.tg_ki:focus-visible {
	background: rgba(18, 41, 69, .72);
	border-color: rgba(255, 255, 255, .30);
}

.tg_ki:hover .tg_ki_pop,
.tg_ki:focus-within .tg_ki_pop {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.tg_ki:hover .tg_ki_icon,
.tg_ki:focus-within .tg_ki_icon {
	transform: rotate(90deg) scale(1.12);
}

/* ================================================================== *
 * Footer (child footer.php) - built 1:1 from Figma "Footer" (167:1030)
 * ================================================================== */
.btw_footer {
	--font_color: #fff;   /* light text on the dark footer (also reaches sprite clones) */
	position: relative;
	padding: 127px 0 37px;
	overflow: hidden;
	background:
		linear-gradient(270deg, rgba(18, 49, 87, .3) 0%, rgba(18, 49, 87, 0) 50%, rgba(18, 49, 87, .3) 100%),
		linear-gradient(180deg, rgba(18, 49, 87, .8) 0%, rgba(29, 77, 142, .8) 100%),
		#123157;
}

/* The theme's normal container (.mM_container[data-container="container"],
   widths per breakpoint from the backend). We only add the position context for
   the absolute logo / back-to-top. */
.btw_footer .btw_footer_inner {
	position: relative;
}

/* ---- Back-to-top: red slanted square, up-chevron ---- */
.btw_footer .btw_back_to_top {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	padding: 0;
	border: 0;
	cursor: pointer;
	background: var(--btw_red);
	/* Figma: bottom-right pulled up ~6px */
	clip-path: polygon(0 0, 100% 0, 100% 88.8%, 0 100%);
	/* Keep the parent's fade-in (opacity) and hover lift (transform): a bare
	   `background` transition made both jump */
	transition: opacity .4s ease, transform .4s ease, background .2s ease;
	z-index: 2;                      /* above the footer only, never over the fixed header (999) */
}

.btw_footer .btw_back_to_top_i {
	width: 14px;
	height: 8px;
	stroke: #fff;
	fill: none;
}

@media (hover: hover) {
	.btw_footer .btw_back_to_top:hover { background: #b4141c; }
}

.btw_footer .btw_back_to_top:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ---- Crest logo: top-left, mirrors the back-to-top button top-right ---- */
.btw_footer .btw_footer_logo {
	position: absolute;
	top: -23px;                      /* Figma: logo top sits 23px above inner top */
	left: -5px;                      /* Figma: crest sits ~5px left of the text column */
	display: inline-flex;
	line-height: 0;
}

.btw_footer .btw_footer_logo_i {
	width: 130px;
	height: 106px;
	fill: #fff;
}

.btw_footer .btw_footer_logo:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 4px;
}

/* ---- Top row: addresses/social left, nav columns right ---- */
.btw_footer .btw_footer_top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 40px;
	/* Figma: the headings have an 80px line box, their text centre is at 262 from
	   the footer top -> 20px heading box at 252. */
	padding-top: 125px;
}

.btw_footer .btw_footer_addrs {
	display: flex;
	gap: 39px;
	margin-top: 1px;       /* Figma: first address line box at 253 */
}

.btw_footer .btw_footer_addr {
	width: 279px;
}

.btw_footer .btw_footer_addr:nth-child(2) { width: 268px; }

.btw_footer .btw_footer_addr_name {
	margin: 0 0 24px;      /* Figma: one empty 24px line before the person */
	color: #fff;
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 1rem;        /* 16px */
	line-height: 24px;
}

.btw_footer .btw_footer_addr_person {
	margin: 0;
	color: rgba(255, 255, 255, .5);
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 0.875rem;    /* 14px */
	line-height: 20px;
}

.btw_footer .btw_footer_addr_line {
	margin: 0;
	color: rgba(255, 255, 255, .5);
	font-family: var(--font_family);
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 20px;
}

.btw_footer .btw_footer_addr_mail {
	margin: 0;
	font-size: 0.875rem;
	line-height: 20px;
}

.btw_footer .btw_footer_addr_mail a {
	color: #fff;
	font-family: var(--font_family);
	text-decoration: none;
	word-break: break-word;
}

@media (hover: hover) {
	.btw_footer .btw_footer_addr_mail a:hover { text-decoration: underline; }
}

/* ---- Social + search row ---- */
.btw_footer .btw_footer_social {
	display: flex;
	align-items: center;
	gap: 0;                          /* explicit margins below for exact Figma offsets */
	margin-top: 35px;                /* Figma: social row at 420, address block ends at 385 */
}

/* Figma row (160 wide): icon1[0..44] icon2[54..98] divider@123 magnifier[146..160] */
.btw_footer .btw_footer_social_item + .btw_footer_social_item { margin-left: 10px; }

.btw_footer .btw_footer_social_item {
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
}

.btw_footer .btw_footer_social_frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	fill: rgba(255, 255, 255, .08);  /* subtle fill like the hero slab icons */
	stroke: rgba(255, 255, 255, .35);
	stroke-width: 1px;
	transition: fill .25s ease, stroke .25s ease;
}

/* Glyph = 20x20 icon box at its Figma position inside the 44px slab
   (x 11, y 12.15). Coloured via fill, which inherits into the sprite clone. */
.btw_footer .btw_footer_social_i {
	position: absolute;
	left: 11px;
	top: 12px;
	width: 20px;
	height: 20px;
	fill: #fff;
}

@media (hover: hover) {
	.btw_footer .btw_footer_social_item:hover .btw_footer_social_frame {
		fill: var(--btw_red);
		stroke: var(--btw_red);
	}
}

.btw_footer .btw_footer_social_divider {
	display: block;
	width: 1px;
	height: 30px;
	margin-left: 25px;               /* icon2 right (98) + 25 = 123 */
	background: rgba(255, 255, 255, .3);
}

.btw_footer .btw_footer_search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	margin-left: 22px;               /* divider (124) + 22 = magnifier left 146 */
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.btw_footer .btw_footer_search_i { width: 14px; height: 14px; fill: #fff; }

.btw_footer .btw_footer_search:focus-visible,
.btw_footer .btw_footer_social_item:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ---- Nav columns ---- */
.btw_footer .btw_footer_left {
	flex: 0 0 auto;
}

/* Figma column starts 884 / 1113 / 1369 / 1618 -> tracks 229 / 256 / 249
   (= basis + 24px gap). On narrower desktops (container 1320) the columns shrink
   towards their content width instead of running out of the container. */
.btw_footer .btw_footer_nav {
	display: flex;
	flex: 0 1 auto;
	min-width: 0;          /* may shrink below the sum of the column widths */
	gap: 24px;
}

.btw_footer .btw_footer_col {
	display: flex;
	flex-direction: column;
	flex: 0 1 auto;
}

.btw_footer .btw_footer_col:nth-child(1) { width: 205px; }
.btw_footer .btw_footer_col:nth-child(2) { width: 232px; }
.btw_footer .btw_footer_col:nth-child(3) { width: 225px; }

/* Figma heading centres 262 / 312 / 359 -> 50px, then 47px apart */
.btw_footer .btw_footer_item + .btw_footer_item { margin-top: 30px; }
.btw_footer .btw_footer_item:nth-child(3) { margin-top: 27px; }

.btw_footer .btw_footer_h {
	display: flex;          /* block-level: no 24px line box around the 20px heading */
	width: fit-content;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-family: var(--h_font_family, var(--font_family));
	font-size: 1.25rem;     /* 20px */
	line-height: 1;
	letter-spacing: 0.4px;
	font-variation-settings: "slnt" -7;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.btw_footer .btw_footer_col_black .btw_footer_h { font-weight: 900; }
.btw_footer .btw_footer_col_bold .btw_footer_h  { font-weight: 700; }

.btw_footer .btw_footer_h_text { color: #fff; }

@media (hover: hover) {
	.btw_footer .btw_footer_h:hover .btw_footer_h_text { color: rgba(255, 255, 255, .7); }
}

.btw_footer .btw_footer_h_shop { width: 16px; height: 15px; flex: 0 0 auto; fill: var(--btw_red); }
.btw_footer .btw_footer_h_tick { width: 15px; height: 12px; flex: 0 0 auto; fill: var(--btw_red); }

.btw_footer .btw_footer_sub {
	list-style: none;
	margin: 10px 0 0;      /* Figma: first sub line centre ~32px below the heading centre */
	padding: 0;
}

.btw_footer .btw_footer_sub li a {
	display: inline-block;
	padding: 0;
	color: rgba(255, 255, 255, .5);
	font-family: var(--font_family);
	font-weight: 400;
	font-size: 1rem;        /* 16px */
	line-height: 24px;
	text-decoration: none;
	white-space: nowrap;
	transition: color .2s ease;
}

@media (hover: hover) {
	.btw_footer .btw_footer_sub li a:hover { color: #fff; }
}

/* ---- Bottom bar ---- */
.btw_footer .btw_footer_bottom {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 100px;
	padding-top: 44px;
	border-top: 1px solid rgba(255, 255, 255, .3);
}

.btw_footer .btw_footer_copy {
	margin: 0;
	flex: 1 1 auto;
	color: rgba(255, 255, 255, .5);
	font-family: var(--font_family);
	font-size: 0.875rem;    /* 14px */
	line-height: 24px;
}

.btw_footer .btw_footer_legal {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
	/* Centred on the container centre (Figma), independent of the side texts */
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.btw_footer .btw_footer_legal_list {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Figma: "Impressum · Datenschutz · Kontakt" - the dot is decoration only. It
   follows its link, so a wrapped line never starts with a dot */
.btw_footer .btw_footer_legal_list li:not(:last-child):not(:nth-child(3))::after {
	content: "·";
	margin: 0 10px;
	color: rgba(255, 255, 255, .5);
	font-size: 0.875rem;
	line-height: 24px;
}

.btw_footer .btw_footer_legal a {
	color: #fff;
	font-family: var(--font_family);
	font-size: 0.875rem;
	line-height: 24px;
	text-decoration: none;
}

@media (hover: hover) {
	.btw_footer .btw_footer_legal a:hover { text-decoration: underline; }
}

.btw_footer .btw_footer_credit {
	margin: 0;
	flex: 1 1 auto;
	text-align: right;
	color: rgba(255, 255, 255, .5);
	font-family: var(--font_family);
	font-size: 0.875rem;
	line-height: 24px;
}

.btw_footer .btw_footer_credit a {
	color: rgba(255, 255, 255, .5);
	text-decoration: underline;
	text-underline-position: from-font;
}

@media (hover: hover) {
	.btw_footer .btw_footer_credit a:hover { color: #fff; }
}

/* ---- Footer responsive (no Figma below 1920: stacked layout) ---- */
@media all and (max-width: 1399px) {
	.btw_footer { padding-top: 80px; }
	/* Logo joins the flow on top; the back-to-top button stays top-right */
	.btw_footer .btw_footer_logo { position: relative; top: auto; left: auto; }
	.btw_footer .btw_footer_top { flex-direction: column; gap: 56px; padding-top: 48px; }
	.btw_footer .btw_footer_addrs { margin-top: 0; }
	.btw_footer .btw_footer_nav { flex-wrap: wrap; gap: 40px 32px; width: 100%; }
	.btw_footer .btw_footer_col,
	.btw_footer .btw_footer_col:nth-child(n) { flex: 1 1 180px; width: auto; min-width: 180px; }
	.btw_footer .btw_footer_bottom { flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 64px; }
	.btw_footer .btw_footer_copy,
	.btw_footer .btw_footer_credit { flex: 0 0 auto; text-align: left; }
	.btw_footer .btw_footer_legal { position: static; transform: none; }
}

@media all and (max-width: 767px) {
	.btw_footer .btw_footer_addrs { flex-direction: column; gap: 32px; }
	.btw_footer .btw_footer_addr,
	.btw_footer .btw_footer_addr:nth-child(2) { width: 100%; }
}

@media all and (max-width: 575px) {
	.btw_footer { padding: 64px 0 32px; }
	/* Below 576 the container is full width with 20px padding - keep the button
	   off the screen edge (4.2) */
	.btw_footer .btw_back_to_top { right: 20px; }
	/* Columns stay side by side and only wrap when there is no room (User
	   16.11.): 3 columns at 575, 2 at 390, 1 below about 330 */
	.btw_footer .btw_footer_nav { gap: 36px 24px; }
	.btw_footer .btw_footer_col,
	.btw_footer .btw_footer_col:nth-child(n) { flex: 1 1 140px; min-width: 140px; }
	.btw_footer .btw_footer_legal_list { flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ *
 * Formulare (Contact Form 7), Figma "Ansprechpartner" 167:1116.
 * Classes inside the CF7 form (Formulare -> Formular):
 *   btw_form_hinweis  "*Pflichtfelder"
 *   btw_form_feld     label + field (fieldset + legend for radio groups)
 *   [formular_reiter "Worum geht es?*"] tabs between the forms of m35_kontakt
 *   btw_form_abschluss consent left, submit right
 * Two fields side by side: [row] [col 1/2] … [/col] [/row] (all-in-one-for-cf7).
 * Overrides the generic form rules of the parent project.css.
 * ------------------------------------------------------------------ */
/* Parent: display: table - a table grows to its widest unbreakable content
   (a long option in the select) and pushed the form out on phones */
.wpcf7 form.wpcf7-form {
	display: block;
}

.wpcf7 .btw_form_hinweis {
	max-width: none;
	margin: 0 0 26px;
	font-size: 0.875rem;          /* 14px */
	line-height: 24px;
	--font_color: rgba(87, 112, 143, .5);
}

.wpcf7 .btw_form_feld {
	min-width: 0;
	margin: 0 0 20px;
	padding: 0;
	border: 0;
}

.wpcf7 .btw_form_feld > label,
.wpcf7 .btw_form_feld > legend,
.wpcf7 .btw_form_feld > .btw_form_label {
	display: block;
	margin: 0 0 5px;
	padding: 0;
	font-size: 0.875rem;          /* 14px */
	line-height: 24px;
	--font_color: #57708F;
}

/* Rows: 20px between the columns; vertically the fields keep their own 20px */
.wpcf7 .aiocf7-row {
	--aiocf7-row-gap: 20px;
	row-gap: 0;
	margin-bottom: 0;
}

/* Text fields */
.wpcf7 input.wpcf7-text,
.wpcf7 input.wpcf7-email,
.wpcf7 input.wpcf7-tel,
.wpcf7 textarea.wpcf7-textarea {
	display: block;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 25px;
	border: 1px solid rgba(18, 49, 87, .3);
	border-radius: 0;
	background-color: #FFFFFF;
	font-weight: 700;
	font-size: 1rem;
	line-height: 24px;
	--font_color: var(--btw_navy);
	transition: border-color .3s;
}

.wpcf7 textarea.wpcf7-textarea {
	height: 136px;
	padding-top: 16px;
	padding-bottom: 16px;
}

.wpcf7 .wpcf7-form-control::placeholder {
	color: #57708F;
	opacity: 1;
}

.wpcf7 input.wpcf7-form-control:focus-visible,
.wpcf7 textarea.wpcf7-form-control:focus-visible {
	border-color: var(--btw_blue);
	outline: 2px solid var(--btw_blue);
	outline-offset: -2px;
	border-radius: 0;
}

/* Select: theme widget mM_select (the native select stays hidden), in forms
   and in any .btw_select wrapper (e.g. team choice in m37). Its
   wrapper is CF7's inline <span>: Firefox sizes the absolute list by that
   inline box (50px wide), so it has to be a block */
:is(.wpcf7, .btw_select) .mM_custom_select {
	display: block;
}

/* Block (not flex), 54px high with one line; long entries wrap instead of being
   cut off by an ellipsis (also with larger text spacing, WCAG 1.4.12) */
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_selected {
	display: block;
	min-height: 54px;
	padding: 15px 50px 15px 25px;
	border: 1px solid rgba(18, 49, 87, .3);
	background-color: #FFFFFF;
	font-weight: 700;
	line-height: 22px;
	white-space: normal;
	--font_color: var(--btw_navy);
	transition: border-color .3s;
}

/* Nothing chosen yet: "Bitte auswählen" in the placeholder colour */
:is(.wpcf7, .btw_select) .mM_custom_select:has(> select option[value=""]:checked) .mM_select_selected {
	--font_color: #57708F;
}

:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_selected:hover,
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_selected.mM_select_arrow_active {
	border-color: var(--btw_blue);
}

:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_selected:focus-visible {
	outline: 2px solid var(--btw_blue);
	outline-offset: -2px;
	border-radius: 0;
}

/* Figma: chevron 9 x 5, 25px from the right edge */
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_arrows {
	right: 25px;
	width: 9px;
	height: 9px;
}

:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_arrow_down,
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_selected:hover .mM_select_arrow_down,
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_selected.mM_select_arrow_active .mM_select_arrow_down {
	width: 6px;
	height: 6px;
	border-width: 0 1.5px 1.5px 0;
	border-color: var(--btw_navy);
	transform: rotate(45deg) translate(-1px, -1px);
}

/* The parent list shows five options and cuts the rest off: scroll instead */
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_items {
	overflow-y: auto;
	border-color: rgba(18, 49, 87, .3);
	background-color: #FFFFFF;
}

/* Closed: no scroll container, else Chrome/Firefox put it in the tab order */
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_items.mM_select_hide {
	overflow: hidden;
}

/* 42px per option (54px were too big): more entries fit into the open list */
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_item {
	padding: 10px 25px;
	line-height: 22px;
	--font_color: var(--btw_navy);
}

/* Red instead of the parent's orange (#ec7328, set as color on the item) */
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_item:hover,
:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_item:focus-visible {
	background-color: color-mix(in srgb, var(--btw_red) 8%, #FFFFFF);
	outline: none;
	color: var(--btw_red);
	--font_color: var(--btw_red);
}

:is(.wpcf7, .btw_select) .mM_custom_select .mM_select_item.mM_same_as_selected {
	font-weight: 700;
	color: var(--btw_red);
	--font_color: var(--btw_red);
}

/* Tabs between forms: [formular_reiter] (module m35_kontakt), buttons with role tab */
.wpcf7 .btw_form_reiter_liste {
	display: flex;
	gap: 10px;
}

.wpcf7 .btw_form_reiter_tab {
	flex: 1 1 0;
	min-width: 0;
	height: 54px;
	margin: 0;
	padding: 0 8px;
	border: 1px solid rgba(18, 49, 87, .3);
	border-radius: 0;
	background-color: #FFFFFF;
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 1rem;
	line-height: 24px;
	text-align: center;
	overflow-wrap: anywhere;
	cursor: pointer;
	transition: background-color .3s, border-color .3s;
	--font_color: rgba(18, 41, 69, .5);
}

.wpcf7 .btw_form_reiter_tab.is_active {
	background-color: var(--btw_blue);
	border-color: var(--btw_blue);
	cursor: default;
	--font_color: #FFFFFF;
}

@media (hover: hover) {
	.wpcf7 .btw_form_reiter_tab:not(.is_active):hover {
		border-color: var(--btw_blue);
		--font_color: var(--btw_blue);
	}
}

.wpcf7 .btw_form_reiter_tab:focus-visible {
	outline: 2px solid var(--btw_blue);
	outline-offset: 2px;
	border-radius: 0;
}

/* Consent: 19px box, text 9px beside it */
.wpcf7 .wpcf7-acceptance {
	display: block;
	width: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.wpcf7 .wpcf7-acceptance label {
	display: block;
	padding-left: 28px;
	cursor: pointer;
	--font_color: #57708F;
}

.wpcf7 .wpcf7-acceptance label::before {
	top: 1px;
	width: 19px;
	height: 19px;
	border: 1px solid rgba(18, 49, 87, .3);
	background-color: #FFFFFF;
}

.wpcf7 .wpcf7-acceptance label:has(input:checked)::before {
	border-color: var(--btw_blue);
	background-color: var(--btw_blue);
}

.wpcf7 .wpcf7-acceptance label:has(input:focus)::before {
	border-color: rgba(18, 49, 87, .3);
}

.wpcf7 .wpcf7-acceptance label:has(input:focus-visible)::before {
	outline: 2px solid var(--btw_blue);
	outline-offset: 2px;
}

.wpcf7 .wpcf7-acceptance label::after {
	top: 7px;
	left: 4.5px;
}

.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Submit: geometry of a.mM_button, colours of the button style in the form tag
   ([submit class:primary]), so they follow Theme-Optionen -> Buttons */
.wpcf7 input.wpcf7-submit {
	width: auto;
	height: 54px;
	margin: 0;
	padding: 4px 36px 0 26px;
	border: 0;
	border-radius: 0;
	background-color: var(--btn_bg, var(--btw_red));
	color: var(--btn_fg, #FFFFFF);
	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;
	-webkit-appearance: none;
	appearance: none;
}

.wpcf7 input.wpcf7-submit:hover,
.wpcf7 input.wpcf7-submit:focus-visible {
	background-color: var(--btn_hover_bg, #B8101A);
	color: var(--btn_hover_fg, #FFFFFF);
}

/* The clip-path would cut the focus ring: draw it inside */
.wpcf7 input.wpcf7-submit:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: -5px;
}

.wpcf7 .btw_form_abschluss {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px 32px;
	margin-top: 25px;
}

/* Figma: consent text starts 17px below the button's top */
.wpcf7 .btw_form_abschluss .wpcf7-form-control-wrap {
	flex: 0 1 467px;
	margin-top: 17px;
}

.wpcf7 .btw_form_abschluss .wpcf7-spinner {
	position: absolute;
	right: 0;
	bottom: -32px;
	margin: 0;
}

/* Errors: red text under the field, red border on the field */
.wpcf7 form .wpcf7-not-valid-tip {
	margin: 6px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	font-size: 0.875rem;
	line-height: 20px;
	--font_color: var(--btw_red);
}

.wpcf7 .wpcf7-not-valid,
.wpcf7 .mM_custom_select:has(.wpcf7-not-valid) .mM_select_selected {
	border-color: var(--btw_red);
}

.wpcf7 form .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 12px 16px;
	border-radius: 0;
	font-size: 0.875rem;
	line-height: 20px;
}

/* Tabs 2 x 2, on the narrowest screens one below the other */
@media all and (max-width: 767px) {
	.wpcf7 .btw_form_reiter_liste {
		flex-wrap: wrap;
	}
	.wpcf7 .btw_form_reiter_tab {
		flex: 0 0 calc(50% - 5px);
	}
	/* Odd number of tabs: the last one takes the whole row */
	.wpcf7 .btw_form_reiter_tab:last-child:nth-child(odd) {
		flex-basis: 100%;
	}
}

@media all and (max-width: 575px) {
	.wpcf7 .btw_form_abschluss {
		flex-direction: column;
	}
	.wpcf7 .btw_form_abschluss .wpcf7-form-control-wrap {
		flex: 0 0 auto;
		margin-top: 0;
	}
	.wpcf7 .btw_form_abschluss .wpcf7-spinner {
		position: static;
	}
}

@media all and (max-width: 375px) {
	.wpcf7 .btw_form_reiter_tab {
		flex-basis: 100%;
	}
}

/* WCAG 1.4.12: on narrow screens long words (uppercase headings, player names) break with a hyphen instead of overflowing */
@media all and (max-width: 399px) {
	body {
		-webkit-hyphens: auto;
		hyphens: auto;
		overflow-wrap: break-word; /* words joined by non-breaking spaces cannot be hyphenated, they break inside instead of overflowing */
	}
}

/* WCAG 1.4.12 at every width: with larger text spacing a long word in a heading
   breaks inside its box instead of running out of it. With normal spacing every
   word fits, so the layout does not change. */
:root :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4, .m33_fakt_titel) {
	overflow-wrap: break-word;
}

/* Very narrow screens: a button label longer than the line wraps instead of
   pushing the page sideways (e.g. „Am Heimspieltag mithelfen“ at 280px) */
@media all and (max-width: 375px) {
	a.mM_button,
	button.mM_button {
		max-width: 100%;
		white-space: normal;
		text-align: left;
	}
}

/* "Auskragung oben": the box rises into the section above. Fading the whole
   section in (theme scroll effect) left that area looking empty, as if the
   module had not loaded, so the box stays visible; effects inside it start
   early (js/auskragung-appear.js). */
.mM_appear_js [data-auskragung="oben"][data-appear-effect]:not(.mM_in_view) {
	opacity: 1;
	translate: none;
	scale: none;
}

/* OneTap (accessibility plugin) outputs its fixed toggle in a <section> at the
   end of <body>. The parent tags every section for the scroll fade-in, and the
   0px-high box only counted as "in view" at the very bottom of the page, so the
   button stayed at opacity 0 until then. */
html.mM_appear_js section.onetap-container-toggle[data-appear-effect] {
	opacity: 1;
	translate: none;
	scale: none;
}

/* ------------------------------------------------------------------ *
 * Fallback font (html.btw_ersatzschrift, set in functions.php while neither
 * Salford Sans nor Barlow Condensed is loaded, e.g. after declining external
 * media): the system font runs wider, so headings are a bit smaller and the
 * title widths from the backend (in em) are lifted – otherwise words break.
 * The menu has its own sizes in menu.css.
 * ------------------------------------------------------------------ */
html.btw_ersatzschrift :is(h1, h2, h3, .h1, .h2, .h3, .m33_fakt_titel) {
	zoom: .84;
}

html.btw_ersatzschrift section.m25_hero .m25_titel_container :is(h1, .h1),
html.btw_ersatzschrift section.m25_hero.m25_variante_unterseite .m25_titel_container :is(h1, .h1),
html.btw_ersatzschrift section.m26_intro .m26_titel,
html.btw_ersatzschrift section.m45_text_bild .m45_titel {
	max-width: none;
}

/* Narrow fact columns and package cards */
html.btw_ersatzschrift section.m33_stoerer_bild .m33_fakt .m33_fakt_titel,
html.btw_ersatzschrift section.m42_pakete .m42_label {
	zoom: .76;
}
