/**
 * Terminanfrage-Formular Styling
 */

.terminanfrage-form-wrapper {
	max-width: 600px;
	margin: 2rem auto;
	padding: 2rem;
	background-color: #f9f9f9;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.terminanfrage-form-wrapper h2 {
	margin-top: 0;
	color: #333;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 1rem;
}

.terminanfrage-description {
	color: #666;
	margin-bottom: 1.5rem;
	line-height: 1.6;
}

.terminanfrage-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Fieldset Styling */
.terminanfrage-section {
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 1.5rem;
	background-color: #fff;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.terminanfrage-section legend {
	font-weight: 600;
	font-size: 1.1em;
	color: #0073aa;
	padding: 0 0.5rem;
	margin-left: -0.5rem;
	margin-bottom: 1rem;
}

/* Form Groups */
.form-group {
	display: flex;
	flex-direction: column;
	margin-bottom: 1rem;
}

.form-group:last-child {
	margin-bottom: 0;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

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

	.form-group-half {
		grid-column: auto;
	}
}

.form-group-half {
	width: 100%;
}

/* Labels */
.form-group label {
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: #333;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.form-group .required {
	color: #d63638;
	font-weight: 700;
}

.form-group .info {
	font-size: 0.85em;
	color: #999;
	font-weight: 400;
}

/* Input Fields */
input[type='text'],
input[type='email'],
input[type='tel'],
input[type='date'],
select,
textarea {
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1em;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
	resize: vertical;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='tel']:focus,
input[type='date']:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

input[type='text']:invalid,
input[type='email']:invalid,
input[type='tel']:invalid,
input[type='date']:invalid,
select:invalid,
input.invalid {
	border-color: #d63638 !important;
	box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.2);
}

/* Checkboxes und Radio Buttons */
input[type='checkbox'],
input[type='radio'] {
	margin-right: 0.5rem;
	cursor: pointer;
	accent-color: #0073aa;
}

.radio-group {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.radio-label,
.form-group label[for='known_customer'],
.form-group label[for='save_for_next_time'] {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-weight: 400;
	margin-bottom: 0;
	user-select: none;
}

.radio-label input[type='radio']:disabled + text {
	opacity: 0.6;
}

#callback-label.disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

#callback-label.disabled input[type='radio'] {
	cursor: not-allowed;
}

.callback-notice {
	display: none;
	color: #d63638;
	font-size: 0.85em;
	font-weight: 500;
	margin-left: 1.5rem;
}

/* Error Messages */
.form-group .error {
	color: #d63638;
	font-size: 0.85em;
	margin-top: 0.25rem;
	font-weight: 500;
}

.form-message {
	padding: 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
	font-weight: 500;
}

.form-message-success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.form-message-error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

/* Button */
.btn {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

.btn-primary {
	background-color: #0073aa;
	color: white;
	width: 100%;
	margin-top: 1rem;
}

.btn-primary:hover {
	background-color: #005a87;
	box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

.btn-primary:active {
	background-color: #00467f;
}

.btn-primary:disabled {
	background-color: #999;
	cursor: not-allowed;
	opacity: 0.7;
}

/* reCAPTCHA */
.g-recaptcha-group {
	display: flex;
	justify-content: center;
	margin: 1rem 0;
}

.g-recaptcha {
	transform: scale(0.95);
	transform-origin: 0 0;
}

/* Address Fields Toggle */
.address-fields {
	display: grid;
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}

/* Appointment/Callback Fields */
#appointment-fields,
#callback-fields {
	padding: 1rem;
	background-color: #f5f5f5;
	border-left: 3px solid #0073aa;
	border-radius: 4px;
	margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
	.terminanfrage-form-wrapper {
		padding: 1rem;
		margin: 1rem;
	}

	.terminanfrage-section {
		padding: 1rem;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.btn-primary {
		padding: 0.85rem 1rem;
	}
}

/* Print Styles */
@media print {
	.terminanfrage-form-wrapper {
		box-shadow: none;
		border: 1px solid #ddd;
	}

	.btn,
	.g-recaptcha-group {
		display: none;
	}
}
