/**
 * Contact Form 7 Custom Styling
 * Ensures proper styling and layout for the contact form
 */

/* Form container */
.wpcf7 {
	font-family: inherit;
}

/* Two-column layout for shorter fields */
.wpcf7 .form-row-half {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}

@media (max-width: 768px) {
	.wpcf7 .form-row-half {
		grid-template-columns: 1fr;
	}
}

/* Form fields */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	padding: 0.875rem 1rem;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #1f2937;
	background-color: #f9fafb;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	transition: all 0.2s ease;
	font-family: inherit;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	outline: none;
	background-color: #ffffff;
	border-color: var(--color-primary, #3b82f6);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Labels */
.wpcf7 label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
}

/* Form groups */
.wpcf7 .form-group {
	margin-bottom: 1.5rem;
}

/* Select dropdown styling */
.wpcf7 select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 0.75rem center;
	background-repeat: no-repeat;
	background-size: 1.25rem 1.25rem;
	padding-right: 2.5rem;
}

/* Style the dropdown options - dark navy blue text on white background */
.wpcf7 select option {
	background-color: #ffffff;
	color: #002b5b; /* primary dark navy blue */
	padding: 0.75rem;
	font-weight: 600;
}

.wpcf7 select option:first-child {
	background-color: #ffffff;
	color: #9ca3af;
	font-style: italic;
	font-weight: normal;
}

.wpcf7 select option:hover {
	background-color: #e6eef7; /* primary-50 */
	color: #002b5b;
}

/* Textarea */
.wpcf7 textarea {
	min-height: 120px;
	resize: vertical;
}

/* Submit button - Matching header button exactly */
.wpcf7 input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	font-size: 0.9375rem; /* btn-text size */
	font-weight: 600;
	line-height: 1.5;
	color: #ffffff;
	background-color: #002b5b; /* bg-primary - dark navy blue */
	border: none;
	border-radius: 0.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	width: 100%;
}

.wpcf7 input[type="submit"]:hover {
	background-color: #00224a; /* bg-primary-600 - darker navy */
	transform: scale(1.05); /* hover:scale-105 */
}

.wpcf7 input[type="submit"]:active {
	transform: scale(1);
}

.wpcf7 input[type="submit"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Response messages */
.wpcf7-response-output {
	margin: 1.5rem 0 0;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	border: none;
}

.wpcf7-mail-sent-ok {
	background-color: #d1fae5;
	color: #065f46;
	border-left: 4px solid #10b981;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
	background-color: #fee2e2;
	color: #991b1b;
	border-left: 4px solid #ef4444;
}

/* Validation error messages */
.wpcf7-not-valid-tip {
	color: #dc2626;
	font-size: 0.75rem;
	margin-top: 0.25rem;
	display: block;
}

.wpcf7-not-valid {
	border-color: #dc2626 !important;
}

/* Loading spinner */
.wpcf7 .ajax-loader {
	display: inline-block;
	margin-left: 1rem;
	vertical-align: middle;
}

/* Checkbox and radio styling */
.wpcf7 .wpcf7-list-item {
	margin: 0 0 0.5rem 0;
	display: block;
}

.wpcf7 .wpcf7-list-item-label {
	margin-left: 0.5rem;
	font-weight: normal;
	font-size: 0.9375rem;
	color: #4b5563;
}

/* Required asterisk */
.wpcf7 .wpcf7-form-control-wrap {
	position: relative;
	display: block;
}

/* Acceptance checkbox (terms and conditions) */
.wpcf7 .wpcf7-acceptance {
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

/* Use flexbox to align checkbox and text on same line */
.wpcf7 .form-group p:has(.wpcf7-acceptance) {
	margin: 0 !important;
	font-size: 0.875rem;
	line-height: 1.6;
	color: #4b5563;
	display: flex !important;
	align-items: flex-start !important;
	gap: 0.5rem !important;
}

.wpcf7 .wpcf7-acceptance .wpcf7-form-control-wrap {
	display: inline-flex !important;
	margin: 0 !important;
	padding: 0 !important;
	flex-shrink: 0 !important;
}

.wpcf7 .wpcf7-acceptance .wpcf7-form-control {
	display: inline-flex !important;
	margin: 0 !important;
	padding: 0 !important;
}

.wpcf7 .wpcf7-acceptance .wpcf7-list-item {
	margin: 0 !important;
	padding: 0 !important;
	display: inline-flex !important;
}

.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0.25rem 0 0 0 !important;
	cursor: pointer;
	border: 2px solid #d1d5db;
	border-radius: 0.25rem;
	accent-color: #002b5b; /* Dark navy blue matching button */
	flex-shrink: 0 !important;
}

.wpcf7 .wpcf7-acceptance input[type="checkbox"]:checked {
	background-color: #002b5b;
	border-color: #002b5b;
}

.wpcf7 .wpcf7-acceptance input[type="checkbox"]:focus {
	outline: 2px solid #002b5b;
	outline-offset: 2px;
}

.wpcf7 .wpcf7-acceptance a {
	color: #002b5b;
	text-decoration: underline;
	font-weight: 500;
}

.wpcf7 .wpcf7-acceptance a:hover {
	color: #00224a;
}

/* Privacy text */
.form-privacy-text {
	margin-top: 1rem;
	padding: 1rem;
	background-color: #f9fafb;
	border-radius: 0.5rem;
	border-left: 3px solid var(--color-primary, #3b82f6);
}

.form-privacy-text p {
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #6b7280;
	margin: 0;
}

/* Specific field width adjustments */
.wpcf7 .field-name,
.wpcf7 .field-firma {
	flex: 1;
	min-width: 0;
}

.wpcf7 .field-email,
.wpcf7 .field-telefon {
	flex: 1;
	min-width: 0;
}
