/**
 * Kontaktseite: Abstand unter fixem Header + CF7 (Schriften wie Theme: Oswald, PT Sans Narrow, PT Mono, Roboto)
 */

.kontakt-page {
	overflow-x: clip;
}

.contact-form-wrap {
	width: 100%;
	max-width: 42rem; /* = max-w-2xl, fallback wenn Utility nicht greift */
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

.kontakt-page-inner {
	box-sizing: border-box;
	padding-top: max(5rem, calc(env(safe-area-inset-top, 0px) + 4.5rem));
}

@media (min-width: 901px) {
	.kontakt-page-inner {
		/* Desktop: höhere Header-Zeile (md:h-28) */
		padding-top: max(7rem, calc(env(safe-area-inset-top, 0px) + 5.5rem));
	}
}

@media (max-width: 900px) {
	.kontakt-page-inner {
		padding-top: max(6.75rem, calc(env(safe-area-inset-top, 0px) + 5.75rem));
	}
}

/* ——— Formular ——— */
.contact-form-wrap .wpcf7 {
	font-family: 'PT Sans Narrow', 'Roboto', sans-serif;
	font-size: 1rem;
	color: #111827;
	line-height: 1.5;
}

.contact-form-wrap .wpcf7-form {
	margin: 0;
}

.contact-form-wrap .cf7-question p {
	margin: 0 0 1.25rem;
}

.contact-form-wrap .cf7-question p:last-of-type {
	margin-bottom: 0;
}

/* Inputs / Textarea (an Checkout angelehnt) */
.contact-form-wrap .wpcf7-form-control-wrap {
	display: block;
}

.contact-form-wrap input[type='text'],
.contact-form-wrap input[type='email'],
.contact-form-wrap input[type='url'],
.contact-form-wrap input[type='tel'],
.contact-form-wrap textarea {
	width: 100%;
	box-sizing: border-box;
	font-family: 'PT Sans Narrow', 'Roboto', sans-serif;
	font-size: 15px;
	min-height: 48px;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid #e5e5e5;
	background: #fafafa;
	color: #111827;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-wrap textarea {
	min-height: 140px;
	resize: vertical;
	line-height: 1.5;
}

.contact-form-wrap input::placeholder,
.contact-form-wrap textarea::placeholder {
	color: #9ca3af;
}

.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus {
	outline: none;
	border-color: #000;
	background: #fff;
	box-shadow: 0 0 0 1px #000;
}

/* Fehlerzustand Felder */
.contact-form-wrap .wpcf7-form-control.wpcf7-not-valid {
	border-color: #f87171;
	background: #fff;
}

.contact-form-wrap .wpcf7-form-control.wpcf7-not-valid:focus {
	border-color: #b91c1c;
	box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.35);
}

.contact-form-wrap .wpcf7-not-valid-tip {
	font-family: 'PT Sans Narrow', 'Roboto', sans-serif;
	font-size: 13px;
	color: #b91c1c;
	margin-top: 6px;
	display: block;
	line-height: 1.35;
}

/* Checkbox + Einwilligung */
.contact-form-wrap .wpcf7-checkbox .wpcf7-list-item {
	margin: 0;
}

.contact-form-wrap .wpcf7-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-family: 'PT Sans Narrow', 'Roboto', sans-serif;
	font-size: 14px;
	line-height: 1.45;
	color: #374151;
	cursor: pointer;
}

.contact-form-wrap .wpcf7-checkbox input[type='checkbox'] {
	width: 18px;
	height: 18px;
	min-height: 0;
	margin-top: 2px;
	flex-shrink: 0;
	accent-color: #111;
	cursor: pointer;
}

/* reCAPTCHA Abstand */
.contact-form-wrap .wpcf7-form-control-wrap .g-recaptcha,
.contact-form-wrap .wpcf7-recaptcha {
	margin-top: 0.5rem;
	margin-bottom: 0.25rem;
}

/* Submit */
.contact-form-wrap input.wpcf7-submit {
	appearance: none;
	display: block;
	font-family: 'Oswald', 'Roboto', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 15px;
	font-weight: 500;
	min-height: 52px;
	padding: 14px 28px;
	width: 100%;
	max-width: 280px;
	margin-top: 0.5rem;
	margin-left: auto;
	margin-right: auto;
	background: #000;
	color: #fff;
	border: 1px solid #000;
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-wrap input.wpcf7-submit:hover {
	background: #fff;
	color: #000;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.contact-form-wrap input.wpcf7-submit:active {
	transform: translateY(0);
}

.contact-form-wrap input.wpcf7-submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Spinner */
.contact-form-wrap .wpcf7-spinner {
	margin-left: 8px;
	vertical-align: middle;
}

/* Globale Meldung unter dem Formular (Validierung / Erfolg) */
.contact-form-wrap .wpcf7-response-output {
	font-family: 'PT Sans Narrow', 'Roboto', sans-serif;
	font-size: 14px;
	line-height: 1.45;
	margin: 1.25rem 0 0;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	background: #f9fafb;
	color: #374151;
}

.contact-form-wrap form.wpcf7-form.invalid .wpcf7-response-output,
.contact-form-wrap .wpcf7-response-output.wpcf7-validation-errors {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.contact-form-wrap form.sent .wpcf7-response-output,
.contact-form-wrap .wpcf7-response-output.wpcf7-mail-sent-ok {
	border-color: #86efac;
	background: #f0fdf4;
	color: #166534;
}

.contact-form-wrap .wpcf7-response-output.wpcf7-mail-sent-ng,
.contact-form-wrap .wpcf7-response-output.wpcf7-aborted,
.contact-form-wrap .wpcf7-response-output.wpcf7-spam-blocked {
	border-color: #fed7aa;
	background: #fffbeb;
	color: #9a3412;
}

/* Screen-reader-Block: nicht umgestalten (CF7 / A11y) */

@media (min-width: 768px) {
	.contact-form-wrap input.wpcf7-submit {
		margin-left: 0;
		margin-right: 0;
	}
}

@media (max-width: 480px) {
	.contact-form-wrap input[type='text'],
	.contact-form-wrap input[type='email'],
	.contact-form-wrap input[type='url'],
	.contact-form-wrap input[type='tel'],
	.contact-form-wrap textarea {
		font-size: 16px; /* verhindert iOS-Zoom bei Fokus */
	}

	.contact-form-wrap input.wpcf7-submit {
		max-width: none;
	}
}
