/**
 * AIF Download Center - Kontaktformular.
 *
 * Das Erscheinungsbild folgt dem bisherigen Forminator-Formular: Felder nur
 * mit Linie darunter, Vor- und Nachname sowie E-Mail und Telefon
 * nebeneinander, schwarze Schaltflaeche in Grossbuchstaben.
 *
 * Die Selektoren sind bewusst mit .aif-ct eingeleitet: das Theme gestaltet
 * input, select und button seitenweit, und ohne diese Vorsilbe wuerde es
 * gewinnen.
 */

.aif-ct {
	--aif-ct-text: #1d1d1f;
	--aif-ct-grau: #6b6f76;
	--aif-ct-linie: #c9ced6;
	--aif-ct-blau: #3288ce;
	--aif-ct-rot: #c8102e;

	color: var(--aif-ct-text);
	font-size: 15px;
	line-height: 1.5;
}

.aif-ct *,
.aif-ct *::before,
.aif-ct *::after {
	box-sizing: border-box;
}

.aif-ct .aif-ct__form[hidden] {
	display: none;
}

/* --- Raster: zweispaltig wie bisher --- */

.aif-ct .aif-ct__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 28px;
	row-gap: 22px;
	margin: 0 0 24px;
}

.aif-ct .aif-ct__field {
	margin: 0;
	min-width: 0;
}

.aif-ct .aif-ct__field--full {
	grid-column: 1 / -1;
}

.aif-ct .aif-ct__field[hidden] {
	display: none;
}

.aif-ct .aif-ct__field label {
	display: block;
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 400;
	color: var(--aif-ct-text);
}

.aif-ct .aif-ct__req {
	color: var(--aif-ct-rot);
}

/* --- Felder: nur eine Linie darunter --- */

.aif-ct .aif-ct__field input[type="text"],
.aif-ct .aif-ct__field input[type="email"],
.aif-ct .aif-ct__field input[type="tel"],
.aif-ct .aif-ct__field select {
	display: block;
	width: 100%;
	height: auto;
	min-height: 40px;
	margin: 0;
	padding: 8px 0;
	border: 0;
	border-bottom: 1px solid var(--aif-ct-linie);
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
	font: inherit;
	font-size: 15px;
	color: var(--aif-ct-text);
}

.aif-ct .aif-ct__field select {
	padding-right: 28px;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231d1d1f' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 4px center;
	cursor: pointer;
}

.aif-ct .aif-ct__field input::placeholder,
.aif-ct .aif-ct__field textarea::placeholder {
	color: #9aa0a8;
	opacity: 1;
}

.aif-ct .aif-ct__field input:focus,
.aif-ct .aif-ct__field select:focus {
	border-bottom-color: var(--aif-ct-blau);
	outline: none;
	box-shadow: 0 1px 0 0 var(--aif-ct-blau);
}

.aif-ct .aif-ct__field textarea {
	display: block;
	width: 100%;
	min-height: 150px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--aif-ct-linie);
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	font: inherit;
	font-size: 15px;
	color: var(--aif-ct-text);
	resize: vertical;
}

.aif-ct .aif-ct__field textarea:focus {
	border-color: var(--aif-ct-blau);
	outline: none;
}

.aif-ct [aria-invalid="true"] {
	border-bottom-color: var(--aif-ct-rot) !important;
}

.aif-ct .aif-ct__error {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: var(--aif-ct-rot);
}

.aif-ct .aif-ct__error:empty {
	display: none;
}

/* --- Einwilligung und Newsletter --- */

.aif-ct .aif-ct__check {
	margin: 0 0 18px;
}

.aif-ct .aif-ct__checklabel {
	display: block;
	margin: 0 0 6px;
	font-size: 13px;
	color: var(--aif-ct-text);
}

.aif-ct .aif-ct__check label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #444;
	cursor: pointer;
}

.aif-ct .aif-ct__check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
}

.aif-ct .aif-ct__check a {
	color: var(--aif-ct-text);
	font-weight: 600;
	text-decoration: underline;
}

.aif-ct .aif-ct__note {
	margin: 0 0 18px;
	font-size: 12px;
	color: var(--aif-ct-grau);
}

/* --- Schaltflaeche: schwarz, Grossbuchstaben (wie bisher) --- */

.aif-ct .aif-ct__submitrow {
	margin: 0;
}

/*
 * Masse aus dem bisherigen Formular abgenommen (Forminator-Bauform
 * "material", Schaltflaeche des Formulars 24160): schwarze Flaeche, beim
 * Ueberfahren Blau, Schrift durchgehend weiss, 14 px, Schriftschnitt 500,
 * Eckenradius 2 px.
 */

.aif-ct .aif-ct__submit {
	display: inline-block;
	min-height: 0;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 2px;
	background: var(--aif-ct-text);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .25px;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .3s ease-out, color .3s ease-out;
}

/*
 * Das Theme setzt inline button:hover { color: #fff !important }. Hier ist
 * Weiss ohnehin richtig; der Vorrang wird mitgeschrieben, damit die Regel
 * nicht nur zufaellig zum selben Ergebnis fuehrt.
 */
.aif-ct .aif-ct__submit:hover,
.aif-ct .aif-ct__submit:active,
.aif-ct .aif-ct__submit:focus-visible {
	background: var(--aif-ct-blau);
	color: #fff !important;
}

.aif-ct .aif-ct__submit:disabled {
	opacity: .6;
	cursor: default;
}

.aif-ct .aif-ct__formerror {
	margin: 16px 0 0;
	padding: 10px 14px;
	border-left: 3px solid var(--aif-ct-rot);
	background: #fdf3f4;
	font-size: 14px;
	color: var(--aif-ct-rot);
}

.aif-ct .aif-ct__formerror[hidden] {
	display: none;
}

/* --- Bestaetigung --- */

.aif-ct .aif-ct__success {
	padding: 18px 22px;
	border-left: 4px solid #1f7a3f;
	background: #f4f8f5;
	font-size: 16px;
	outline: none;
}

.aif-ct .aif-ct__success[hidden] {
	display: none;
}

.aif-ct .aif-ct__success p {
	margin: 0;
}

/*
 * Honigtopf: aus dem sichtbaren Bereich geschoben statt display:none -
 * manche automatischen Absender erkennen display:none und lassen das Feld
 * dann bewusst leer.
 */
.aif-ct .aif-ct__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.aif-ct .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* --- Schmale Anzeigen: einspaltig --- */

@media (max-width: 600px) {
	.aif-ct .aif-ct__grid {
		grid-template-columns: 1fr;
	}
}

/*
 * Gegen das Theme: es gibt jedem <span> 18 px Schrift und 28 px Zeilenhoehe
 * und Eingabefeldern Abstand nach unten. Ohne diese Ruecksetzung waere der
 * Einwilligungstext groesser als das Formular selbst.
 */
.aif-ct .aif-ct__check label span,
.aif-ct .aif-ct__check a {
	font-size: 13px;
	line-height: 1.55;
}

.aif-ct .aif-ct__field label,
.aif-ct .aif-ct__field label span {
	line-height: 1.35;
}

.aif-ct .aif-ct__field input,
.aif-ct .aif-ct__field select,
.aif-ct .aif-ct__field textarea {
	margin-bottom: 0;
}

/*
 * 2.0.1: iOS Safari vergroessert die Seite, sobald ein Eingabefeld mit
 * weniger als 16 px Schrift den Fokus bekommt. Auf schmalen Anzeigen 16 px -
 * mit !important, weil das Theme unter 1000 px allen Feldern 13 px mit
 * !important gibt.
 */
@media (max-width: 1000px) {
	.aif-ct .aif-ct__field input,
	.aif-ct .aif-ct__field select,
	.aif-ct .aif-ct__field textarea {
		font-size: 16px !important;
	}
}

/*
 * Die Schaltflaeche kommt gesperrt aus dem HTML und wird vom Skript
 * freigegeben. Bis dahin soll sie nicht wie "deaktiviert" aussehen - bei
 * verzoegert geladenen Skripten waere das sonst beim ersten Anblick so.
 */
.aif-ct .aif-ct__submit[data-aif-ct-wait]:disabled {
	opacity: 1;
}
