/* Theme Part M52 - Antrag (prototype "Mitglied werden")
   Form column 981 of 1486, 76px gap, help cards 429. Progress bar above the
   white form card (4px lines, 14px bold labels, current red), card padding
   44/48/40. Cards for the choice 10px apart, the chosen one blue. Back /
   next / send below a 1px line. Classes btw_form_* are used in the form
   markup (Formulare -> Online-Antrag). */

section.m52_antrag .m52_antrag_main {
	display: flex;
	align-items: flex-start;
	gap: 76px;
}

section.m52_antrag .m52_formular {
	flex: 0 0 calc((100% - 76px) * .6958);  /* 981 of 1410 */
	min-width: 0;
}

section.m52_antrag .m52_seite {
	flex: 1 1 0;
	min-width: 0;
}

/* ---- Form: progress above the white card ---- */
section.m52_antrag .wpcf7 form.wpcf7-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 76px;             /* room for the progress bar (42 + 34) */
	padding: 44px 48px 40px;
	background-color: #FFFFFF;
}

section.m52_antrag .wpcf7-form > * {
	flex: 0 0 100%;
	min-width: 0;
}

section.m52_antrag .wpcf7-form > .aiocf7-steps__progress {
	flex-basis: calc(100% + 96px);  /* out over the card padding */
}

section.m52_antrag .aiocf7-steps__progress {
	display: flex;
	gap: 10px;
	margin: -120px -48px 78px;
	padding: 0;
	list-style: none;
}

section.m52_antrag .aiocf7-steps__item {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
}

section.m52_antrag .aiocf7-steps__item[hidden] {
	display: none;
}

section.m52_antrag .aiocf7-steps__item::before {
	content: none;
}

section.m52_antrag .aiocf7-steps__crumb {
	display: block;
	width: 100%;
	margin: 0;
	padding: 14px 0 0;
	border: 0;
	border-top: 4px solid rgba(18, 49, 87, .3);
	border-radius: 0;
	background: none;
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 0.875rem;          /* 14px */
	line-height: 24px;
	text-align: left;
	cursor: pointer;
	--font_color: #57708F;
}

section.m52_antrag .aiocf7-steps__crumb:disabled {
	cursor: default;
	opacity: 1;
}

section.m52_antrag .aiocf7-steps__crumb:is(.is-current, .is-done) {
	border-top-color: var(--btw_red, #DF1721);
	--font_color: var(--btw_navy, #122945);
}

section.m52_antrag .aiocf7-steps__crumb:focus-visible {
	outline: 2px solid var(--btw_blue, #1D4D8E);
	outline-offset: 2px;
}

section.m52_antrag .aiocf7-steps__num,
section.m52_antrag .aiocf7-steps__label {
	display: inline;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--font_color);
	font: inherit;
}

/* "1. Anliegen" */
section.m52_antrag .aiocf7-steps__num::after {
	content: ". ";
	position: static;
	display: inline;
	width: auto;
	height: auto;
	border: 0;
	background: none;
	transform: none;
}

/* Done step: "✓ Anliegen". The plugin lays the check mark over the hidden
   digit (absolute, width of the digit), so it touched the label; here it
   replaces the digit in the text flow and keeps a space to the label. The
   digit stays in the markup (font-size 0) for the reading order. */
section.m52_antrag .aiocf7-steps__crumb.is-done .aiocf7-steps__num {
	position: static;
	font-size: 0;
	color: var(--font_color);
}

section.m52_antrag .aiocf7-steps__crumb.is-done .aiocf7-steps__num::after {
	content: "\2713";
	position: static;
	inset: auto;
	display: inline-block;
	margin-right: .4em;
	font-size: 0.875rem;          /* 14px, as the label */
	color: var(--font_color);
}

/* ---- Step contents ---- */
section.m52_antrag .btw_form_titel {
	margin: 0 0 14px;
	line-height: 0.8;
}

section.m52_antrag .btw_form_lead {
	max-width: 482px;
	margin: 20px 0 26px;
}

section.m52_antrag .btw_form_feld {
	margin-bottom: 23px;
}

section.m52_antrag .btw_form_hilfe {
	display: block;
	margin-top: 4px;
	font-size: 0.8125rem;         /* 13px */
	line-height: 18px;
	--font_color: #57708F;
}

/* Number and date fields look like the text fields (project.css) */
section.m52_antrag .wpcf7 input:is(.wpcf7-number, .wpcf7-date) {
	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-family: var(--font_family);
	font-weight: 700;
	font-size: 1rem;
	line-height: 24px;
	--font_color: var(--btw_navy);
}

section.m52_antrag .wpcf7 input:is(.wpcf7-number, .wpcf7-date):focus-visible {
	border-color: var(--btw_blue);
	outline: 2px solid var(--btw_blue);
	outline-offset: -2px;
}

/* ---- Choice cards [auswahlkarten] ---- */
section.m52_antrag .btw_form_karten {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	border: 0;
}

section.m52_antrag .btw_form_karte {
	position: relative;
	flex: 1 1 calc((100% - 30px) / 4);
	min-width: 0;
	margin: 0;
	padding: 18px 18px 19px;
	border: 1px solid rgba(18, 49, 87, .3);
	background-color: #FFFFFF;
	cursor: pointer;
	transition: border-color .25s, background-color .25s;
}

/* The radio stays in the page for keyboard and screen readers */
section.m52_antrag .btw_form_karte input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

section.m52_antrag .btw_form_karte_text b,
section.m52_antrag .btw_form_karte_text small {
	display: block;
}

section.m52_antrag .btw_form_karte_text b {
	font-weight: 700;
	font-size: 1rem;
	line-height: 24px;
	--font_color: var(--btw_navy, #122945);
}

section.m52_antrag .btw_form_karte_text small {
	margin-top: 2px;
	font-size: 0.8125rem;         /* 13px */
	line-height: 18px;
	--font_color: #57708F;
}

@media (hover: hover) {
	section.m52_antrag .btw_form_karte:hover {
		border-color: var(--btw_blue, #1D4D8E);
	}
}

section.m52_antrag .btw_form_karte:has(input:checked) {
	border-color: var(--btw_blue, #1D4D8E);
	background-color: var(--btw_blue, #1D4D8E);
}

section.m52_antrag .btw_form_karte:has(input:checked) b {
	--font_color: #FFFFFF;
}

section.m52_antrag .btw_form_karte:has(input:checked) small {
	--font_color: rgba(255, 255, 255, .7);
}

section.m52_antrag .btw_form_karte:has(input:focus-visible) {
	outline: 2px solid var(--btw_blue, #1D4D8E);
	outline-offset: 2px;
}

/* ---- Check step ---- */
section.m52_antrag .btw_form_zusammenfassung {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 26px;
	border-top: 2px solid #57708F;
}

section.m52_antrag .btw_form_zusammenfassung :is(dt, dd) {
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid rgba(113, 113, 118, .3);
	overflow-wrap: anywhere;
}

section.m52_antrag .btw_form_zusammenfassung dt {
	flex: 0 0 34%;
	padding-right: 16px;
	font-size: 0.875rem;
	--font_color: #57708F;
}

section.m52_antrag .btw_form_zusammenfassung dd {
	flex: 0 0 66%;
	font-weight: 700;
	white-space: pre-line;
	--font_color: var(--btw_navy, #122945);
}

section.m52_antrag .wpcf7 .wpcf7-acceptance + .wpcf7-acceptance,
section.m52_antrag .btw_form_einwilligung + .btw_form_einwilligung {
	margin-top: 14px;
}

/* ---- Secure note, navigation ---- */
section.m52_antrag .btw_form_sicher {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: none;
	margin: 22px 0 0;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 24px;
	order: 1;
	--font_color: var(--btw_blue, #1D4D8E);
}

section.m52_antrag .btw_form_sicher svg {
	flex: 0 0 12px;
	width: 12px;
	height: 14px;
	fill: currentColor;
}

section.m52_antrag .aiocf7-steps__nav {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	order: 2;
	margin: 36px 0 0;
	padding: 28px 0 0;
	border-top: 1px solid rgba(113, 113, 118, .3);
}

/* The send button: moved into the navigation line by m52_antrag.js */
section.m52_antrag .btw_form_senden {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: auto;
}

section.m52_antrag .btw_form_senden:not(:has(.wpcf7-submit:not(.aiocf7-step-away))) {
	display: none;
}

section.m52_antrag .wpcf7-response-output {
	order: 4;
}

section.m52_antrag .aiocf7-steps__count {
	display: none;
}

section.m52_antrag :is(.aiocf7-step-prev, .aiocf7-step-next) {
	height: 54px;
	margin: 0;
	padding: 4px 32px 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(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
	transition: background-color .3s, box-shadow .3s;
}

section.m52_antrag .aiocf7-step-next {
	margin-left: auto;
	background-color: var(--btw_red, #DF1721);
	--font_color: #FFFFFF;
}

section.m52_antrag .aiocf7-step-prev {
	background-color: transparent;
	box-shadow: inset 0 0 0 1px #57708F;
	clip-path: none;
	--font_color: var(--btw_navy, #122945);
}

section.m52_antrag :is(.aiocf7-step-prev, .aiocf7-step-next) {
	color: var(--font_color);
}

@media (hover: hover) {
	section.m52_antrag .aiocf7-step-next:hover { background-color: #B8101A; }
	section.m52_antrag .aiocf7-step-prev:hover { box-shadow: inset 0 0 0 2px var(--btw_navy, #122945); }
}

section.m52_antrag :is(.aiocf7-step-prev, .aiocf7-step-next):focus-visible {
	outline: 2px solid var(--btw_blue, #1D4D8E);
	outline-offset: 2px;
}

section.m52_antrag .aiocf7-step-next:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: -5px;
}

section.m52_antrag :is(.aiocf7-step-prev, .aiocf7-step-next)[hidden] {
	display: none;
}

section.m52_antrag .btw_form_senden .wpcf7-spinner {
	position: absolute;
	top: 15px;
	right: calc(100% + 8px);
	margin: 0;
}

/* ---- Mailto note below the form after "Abschicken" (m52_antrag.js) ---- */
section.m52_antrag .btw_mailto_hinweis {
	margin-top: 24px;
	padding: 18px 22px;
	border-left: 4px solid var(--btw_blue, #1D4D8E);
	background: #FFFFFF;
	--font_color: var(--btw_navy, #122945);
}

section.m52_antrag .btw_mailto_hinweis p {
	max-width: none;
	margin: 0 0 8px;
	font-size: 0.9375rem;         /* 15px */
	line-height: 24px;
}

section.m52_antrag .btw_mailto_hinweis a {
	font-weight: 700;
	text-decoration: underline;
	overflow-wrap: anywhere;
}

section.m52_antrag .btw_mailto_kopieren {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 24px;
	text-decoration: underline;
	cursor: pointer;
	--font_color: var(--btw_blue, #1D4D8E);
	color: var(--font_color);
}

section.m52_antrag .btw_mailto_hinweis:focus-visible,
section.m52_antrag .btw_mailto_kopieren:focus-visible {
	outline: 2px solid var(--btw_navy, #122945);
	outline-offset: 2px;
}

/* ---- Success ---- */
section.m52_antrag .m52_erfolg {
	margin-top: 76px;
	padding: 44px 48px 48px;
	background-color: var(--btw_blue, #1D4D8E);
	--font_color: #FFFFFF;
	--h_color: #FFFFFF;
	--h_sub_color: #FFFFFF;
}

section.m52_antrag .m52_erfolg:focus {
	outline: none;
}

section.m52_antrag .m52_erfolg .m52_untertitel_container,
section.m52_antrag .m52_erfolg .m52_titel_container {
	margin: 0;
}

section.m52_antrag .m52_erfolg .m52_untertitel {
	max-width: none;
	margin: 0 0 2px;
}

section.m52_antrag .m52_erfolg .m52_titel {
	margin: 0;
}

section.m52_antrag .m52_erfolg_text_container {
	max-width: 520px;
	margin-top: 20px;
}

section.m52_antrag .m52_erfolg_text_container > :last-child {
	margin-bottom: 0;
}

section.m52_antrag .m52_erfolg_aktionen {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 20px;
	margin-top: 28px;
}

section.m52_antrag .m52_erfolg_aktionen .m52_links_container {
	margin: 0;
}

section.m52_antrag .m52_neu {
	height: 54px;
	margin: 0;
	padding: 4px 32px 0 26px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
	font-family: var(--font_family);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.5;
	color: #FFFFFF;
	cursor: pointer;
}

@media (hover: hover) {
	section.m52_antrag .m52_neu:hover { box-shadow: inset 0 0 0 2px #FFFFFF; }
}

section.m52_antrag .m52_neu:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 2px;
}

/* ---- Help cards ---- */
section.m52_antrag .m52_karte {
	padding: 40px 44px 42px;
	background-color: #FFFFFF;
	--font_color: #57708F;
}

section.m52_antrag .m52_karte + .m52_karte {
	margin-top: 20px;
}

section.m52_antrag .m52_karte_titel {
	margin: 0 0 16px;
	line-height: 0.95;
}

section.m52_antrag .m52_karte_text p {
	max-width: none;
	margin: 0 0 14px;
}

section.m52_antrag .m52_karte_text > :last-child {
	margin-bottom: 0;
}

/* Numbered list: navy slanted boxes */
section.m52_antrag .m52_karte_text ol {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: m52_nr;
}

section.m52_antrag .m52_karte_text ol li {
	position: relative;
	margin: 0;
	padding: 2px 0 0 46px;
	counter-increment: m52_nr;
	--font_color: var(--btw_navy, #122945);
}

section.m52_antrag .m52_karte_text ol li::before {
	content: counter(m52_nr);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: 0;
	border-radius: 0;
	background-color: #123157;
	font-family: var(--h_font_family, var(--font_family));
	font-weight: 900;
	font-size: 0.8125rem;
	line-height: 1;
	color: #FFFFFF;
	font-variation-settings: "slnt" -7;
	clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}

section.m52_antrag .m52_karte_mail_container {
	margin-top: 14px;
	--font_color: var(--btw_blue, #1D4D8E);
}

section.m52_antrag .m52_karte_mail {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

section.m52_antrag .m52_hinweis {
	max-width: none;
	margin: 18px 0 0;
	font-size: 0.875rem;
	line-height: 22px;
}

/* ---- Responsive ---- */
@media all and (max-width: 1399px) {
	section.m52_antrag .m52_antrag_main { gap: 48px; }
	section.m52_antrag .m52_formular { flex-basis: calc((100% - 48px) * .66); }
	section.m52_antrag .m52_karte { padding: 34px 32px 36px; }
	section.m52_antrag .btw_form_karte { flex-basis: calc((100% - 10px) / 2); }
}

/* Help cards below the form, side by side */
@media all and (max-width: 1199px) {
	section.m52_antrag .m52_antrag_main {
		flex-direction: column;
		align-items: stretch;
	}
	section.m52_antrag .m52_formular {
		flex: 0 0 auto;
	}
	section.m52_antrag .m52_seite {
		display: flex;
		flex-wrap: wrap;
		gap: 20px;
		flex: 0 0 auto;
	}
	section.m52_antrag .m52_karte {
		flex: 1 1 calc((100% - 20px) / 2);
		min-width: 0;
	}
	section.m52_antrag .m52_karte + .m52_karte {
		margin-top: 0;
	}
	section.m52_antrag .m52_hinweis {
		flex: 0 0 100%;
		margin: 0;
	}
}

@media all and (max-width: 767px) {
	section.m52_antrag .wpcf7 form.wpcf7-form {
		padding: 34px 26px 32px;
	}
	section.m52_antrag .aiocf7-steps__progress {
		margin: -110px -26px 76px;
	}
	section.m52_antrag .wpcf7-form > .aiocf7-steps__progress {
		flex-basis: calc(100% + 52px);
	}
	section.m52_antrag .m52_karte {
		flex-basis: 100%;
	}
	section.m52_antrag .m52_erfolg {
		padding: 34px 26px 38px;
	}
}

@media all and (max-width: 575px) {
	section.m52_antrag .wpcf7 form.wpcf7-form {
		margin-top: 68px;
		padding: 28px 18px 28px;
	}
	section.m52_antrag .aiocf7-steps__progress {
		gap: 6px;
		margin: -96px -18px 68px;
	}
	section.m52_antrag .wpcf7-form > .aiocf7-steps__progress {
		flex-basis: calc(100% + 36px);
	}
	section.m52_antrag .aiocf7-steps__crumb {
		padding-top: 10px;
		font-size: 0.75rem;
		line-height: 18px;
	}
	/* Only the number on phones, the label of the current step stays */
	section.m52_antrag .aiocf7-steps__crumb:not(.is-current) .aiocf7-steps__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	section.m52_antrag .btw_form_karte {
		flex-basis: 100%;
	}
	section.m52_antrag .btw_form_zusammenfassung dt {
		flex-basis: 100%;
		padding-bottom: 0;
		border-bottom: 0;
	}
	section.m52_antrag .btw_form_zusammenfassung dd {
		flex-basis: 100%;
		padding-top: 2px;
	}
	section.m52_antrag .m52_karte {
		padding: 28px 22px 30px;
	}
}

/* Narrow screens: buttons may wrap, with room above and below */
@media all and (max-width: 375px) {
	section.m52_antrag :is(.aiocf7-step-prev, .aiocf7-step-next, .m52_neu) {
		padding-left: 18px;
		padding-right: 22px;
	}
	section.m52_antrag .wpcf7 input.wpcf7-submit {
		padding-left: 18px;
		padding-right: 24px;
	}
}
