/* ==========================================================
   Reisemängel – Kontaktformular (CF7)
   1:1 an das Corona-Hilfe-Formular angeglichen.
   Ersetzt die komplette bisherige Reisemängel-CSS-Datei.
   ========================================================== */

/* ---------- Container ---------- */
#cf7-contactForm {
	box-sizing: border-box;
	width: 100%;
	padding: 28px;
	margin-top: 28px;
	border: 2px solid #e8ecf0;
	border-radius: 16px;
	background: #f8f9fb;
	box-shadow: 0 2px 12px rgba(29, 52, 93, 0.08);
	color: #333;
	text-align: left;
	font-family: 'Quicksand', sans-serif;
}

#cf7-contactForm h3 {
	margin: 0 0 20px;
	color: #1D345D;
	font-family: 'Quicksand', sans-serif;
	font-size: 24px;
	font-weight: 700;
	text-align: center;
}

/* ---------- Zeilen / Gruppen ---------- */
#cf7-contactForm .form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

#cf7-contactForm .form-group {
	min-width: 0;
	margin-bottom: 20px;
}

#cf7-contactForm .form-row .form-group {
	margin-bottom: 0;
}

#cf7-contactForm .form-group > label {
	display: block;
	margin-bottom: 8px;
	color: #333;
	font-size: 14px;
	font-weight: 600;
}

#cf7-contactForm .wpcf7-form-control-wrap {
	display: block;
}

/* ---------- Eingabefelder (identisch zu Corona) ---------- */
#cf7-contactForm input.wpcf7-form-control:not([type="hidden"]):not([type="file"]):not([type="checkbox"]):not([type="submit"]),
#cf7-contactForm select.wpcf7-form-control,
#cf7-contactForm textarea.wpcf7-form-control {
	box-sizing: border-box;
	width: 100%;
	padding: 16px 20px;
	border: 2px solid #e0e0e0;
	border-radius: 12px;
	background: #f8f9fb;
	color: #333;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	transition: all 0.3s ease;
}

#cf7-contactForm textarea.wpcf7-form-control {
	height: 100px; /* entspricht rows:3 beim Corona-Formular */
	resize: vertical;
}

#cf7-contactForm input.wpcf7-form-control:not([type="hidden"]):not([type="file"]):not([type="checkbox"]):not([type="submit"]):focus,
#cf7-contactForm select.wpcf7-form-control:focus,
#cf7-contactForm textarea.wpcf7-form-control:focus {
	outline: none;
	border-color: #1D345D;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(29, 52, 93, 0.1);
}

/* Hidden-Felder nehmen keinen Platz ein */
#cf7-contactForm input[type="hidden"] {
	display: none;
}

/* ---------- Upload-Bereiche (Corona-Dropzone) ---------- */
#cf7-contactForm .cf7-upload-group {
	margin-bottom: 24px;
}

#cf7-contactForm .cf7-reisemaengel-dropzone {
	position: relative;
	box-sizing: border-box;
	display: block;
	min-height: 0;
	overflow: hidden;
	padding: 28px;
	margin-bottom: 0;
	border: 2px dashed #d6d6d6;
	border-radius: 12px;
	background: #fafafa;
	text-align: center;
	cursor: pointer;
	transition: 0.3s;
}

#cf7-contactForm .cf7-reisemaengel-dropzone:hover {
	background: #f0f4ff;
	border-color: #0057d9;
}

#cf7-contactForm .cf7-reisemaengel-dropzone.dragover {
	background: #e7eefc !important;
	border-color: #0057d9 !important;
}

#cf7-contactForm .cf7-reisemaengel-dropzone:focus-within {
	border-color: #1D345D;
	box-shadow: 0 0 0 3px rgba(29, 52, 93, 0.1);
}

#cf7-contactForm .cf7-reisemaengel-dropzone .dz-icon {
	height: auto;
	margin: 0;
}

#cf7-contactForm .cf7-reisemaengel-dropzone .dz-icon svg {
	display: inline-block;
	width: 24px;
	height: 24px;
	margin-bottom: 10px;
}

#cf7-contactForm .cf7-reisemaengel-dropzone p.upload-text {
	margin: 0 0 6px;
	color: #333;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.6;
}

/* Hinweistext + Formate: wie <small> im Corona-Formular */
#cf7-contactForm .cf7-reisemaengel-dropzone .cf7-upload-note,
#cf7-contactForm .cf7-reisemaengel-dropzone .cf7-upload-formats {
	display: block;
	max-width: 100%;
	margin: 0 auto 4px;
	color: #777;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

#cf7-contactForm .cf7-reisemaengel-dropzone .cf7-upload-note {
	font-weight: 500;
}

/* Natives Datei-Input unsichtbar über die ganze Fläche */
#cf7-contactForm .cf7-reisemaengel-dropzone .wpcf7-form-control-wrap {
	position: static;
	display: contents;
}

#cf7-contactForm .cf7-reisemaengel-dropzone input[type="file"] {
	position: absolute;
	z-index: 2;
	inset: 0;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	opacity: 0;
	cursor: pointer;
}

/* Fallback, falls das JS die Dropzone nicht aufbaut */
#cf7-contactForm .cf7-upload-group > .cf7-upload-note {
	margin: 8px 0 0;
	color: #6b7280;
	font-size: 12px;
	line-height: 1.5;
}

/* ---------- Dateiliste (wie .file-item bei Corona) ---------- */
#cf7-contactForm .cf7-upload-file-list:empty {
	display: none;
}

#cf7-contactForm .cf7-upload-file-list {
	margin-top: 12px;
}

#cf7-contactForm .cf7-upload-file-list-items {
	margin: 0;
	padding: 0;
	list-style: none;
}

#cf7-contactForm .cf7-upload-file-list-items li {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 3px 0;
	padding: 6px 8px;
	overflow-wrap: anywhere;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #f8f9fb;
	color: #333;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

/* ---------- AGB / Datenschutz (wie Corona) ---------- */
#cf7-contactForm .checkbox-container {
	margin: 24px 0;
}

/* Text fließt normal (inline) – die Checkbox sitzt absolut links.
   Kein Flex mehr, sonst werden Text und Links einzeln auseinandergezogen. */
#cf7-contactForm .checkbox-item {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin-bottom: 16px;
	padding: 16px 20px 16px 50px;
	text-align: left;
	overflow-wrap: break-word;
	word-break: normal;
	border: 2px solid #e0e0e0;
	border-radius: 12px;
	background: #f8f9fb;
	color: #333;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	transition: all 0.3s ease;
}

#cf7-contactForm .checkbox-item:hover {
	border-color: #1D345D;
	background: #fff;
	box-shadow: 0 2px 8px rgba(29, 52, 93, 0.08);
}

/* Wrapper der Checkbox: absolut links, nimmt keinen Textfluss ein */
#cf7-contactForm .checkbox-item .wpcf7-form-control-wrap {
	position: absolute;
	top: 18px;
	left: 20px;
	display: block;
	width: 18px;
	height: 18px;
	margin: 0 !important;
}

#cf7-contactForm .checkbox-item .wpcf7-acceptance,
#cf7-contactForm .checkbox-item .wpcf7-list-item {
	display: block;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

#cf7-contactForm .checkbox-item .wpcf7-list-item-label {
	display: none;
}

/* Links bleiben im Satz, mit normalem Wortabstand */
#cf7-contactForm .checkbox-item a {
	display: inline;
	margin: 0;
	color: #1D345D;
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: break-word;
}

#cf7-contactForm .checkbox-item a:hover {
	text-decoration: underline;
}

#cf7-contactForm .checkbox-item input[type="checkbox"] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	position: relative;
	z-index: 1;
	display: block;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 2px solid #1D345D;
	border-radius: 3px;
	background-color: #fff;
	cursor: pointer;
	transition: all 0.3s ease;
}

#cf7-contactForm .checkbox-item input[type="checkbox"]:checked {
	background-color: #1D345D;
	border-color: #1D345D;
}

#cf7-contactForm .checkbox-item input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 6px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

#cf7-contactForm .checkbox-item input[type="checkbox"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(29, 52, 93, 0.1);
}

/* ---------- Absenden-Button ---------- */
#cf7-contactForm button.submit-btn {
	box-sizing: border-box;
	width: 100%;
	margin-top: 24px;
	padding: 16px 32px;
	border: none;
	border-radius: 12px;
	background: #1D345D;
	box-shadow: 0 2px 8px rgba(29, 52, 93, 0.2);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

#cf7-contactForm button.submit-btn:hover {
	transform: translateY(-1px);
	background: #152a4a;
	box-shadow: 0 4px 12px rgba(29, 52, 93, 0.3);
}

#cf7-contactForm button.submit-btn:disabled {
	cursor: wait;
}

#cf7-contactForm .footer-note {
	margin-top: 20px;
	color: #6b7280;
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

/* ---------- Validierung / Rückmeldung ---------- */
#cf7-contactForm .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	color: #d32f2f;
	font-size: 12px;
}

#cf7-contactForm .wpcf7-not-valid.wpcf7-form-control {
	border-color: #d32f2f;
}

#cf7-contactForm .wpcf7-response-output {
	box-sizing: border-box;
	max-width: 600px;
	margin: 20px auto 0 !important;
	padding: 16px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	#cf7-contactForm {
		padding: 20px;
	}

	#cf7-contactForm .form-row {
		grid-template-columns: 1fr;
		gap: 0;
		margin-bottom: 0;
	}

	#cf7-contactForm .form-row .form-group {
		margin-bottom: 20px;
	}
}

@media (max-width: 480px) {
	#cf7-contactForm {
		padding: 16px;
	}

	#cf7-contactForm h3 {
		font-size: 20px;
	}

	#cf7-contactForm .cf7-reisemaengel-dropzone {
		padding: 20px 14px;
	}

	#cf7-contactForm .cf7-reisemaengel-dropzone p.upload-text {
		font-size: 14px;
	}

	#cf7-contactForm .cf7-reisemaengel-dropzone .cf7-upload-note,
	#cf7-contactForm .cf7-reisemaengel-dropzone .cf7-upload-formats {
		font-size: 13px;
	}

	/* Basis-CSS setzt hier display:inline-block – wieder auf block, sonst bricht der Text */
	#cf7-contactForm .checkbox-item {
		display: block;
		padding: 14px 14px 14px 44px;
		font-size: 13px;
		line-height: 1.55;
	}

	#cf7-contactForm .checkbox-item .wpcf7-form-control-wrap {
		top: 16px;
		left: 14px;
	}

	/* Lange Hinweis-/Formattexte in den Dropzones sauber umbrechen */
	#cf7-contactForm .cf7-reisemaengel-dropzone .upload-text,
	#cf7-contactForm .cf7-reisemaengel-dropzone .cf7-upload-note,
	#cf7-contactForm .cf7-reisemaengel-dropzone .cf7-upload-formats {
		overflow-wrap: break-word;
		word-break: normal;
		hyphens: auto;
	}
}