/* Form fields shared by the quote form and contact form. */

.form-field {
	display: flex;
	flex-direction: column;
	gap: var(--space-3xs);
	margin-bottom: var(--space-sm);
	text-align: left;
}

.form-field label {
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
	color: var(--input-label-color);
}

.form-field input,
.form-field textarea,
.form-field select {
	font-family: var(--font-body);
	font-size: var(--fs-body);
	color: var(--input-text);
	background: var(--input-bg);
	border: 1px solid var(--input-border);
	border-radius: var(--input-radius);
	padding: var(--input-padding-y) var(--input-padding-x);
	width: 100%;
}

.form-field select:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Display only — doesn't affect the submitted value, see ucwords() in
 * inc/helpers.php for that. Scoped to this one field on purpose. */
[data-name-input] {
	text-transform: capitalize;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
	color: var(--input-placeholder);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
	outline: none;
	border-color: var(--input-border-focus);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--input-border-focus) 20%, transparent);
}

.form-field textarea {
	resize: vertical;
	min-height: 120px;
}

.form-row {
	display: grid;
	gap: var(--space-sm);
}

@media (min-width: 560px) {
	.form-row--2 {
		grid-template-columns: 1fr 1fr;
	}
}

.form-note {
	font-size: var(--fs-small);
	color: var(--color-text-muted);
}

.form-note--icon {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: var(--space-2xs);
}

.form-note--icon .icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	color: var(--color-text-muted);
}

.form-success,
.form-error {
	border-radius: var(--radius-md);
	padding: var(--space-sm);
	font-size: var(--fs-small);
	margin-bottom: var(--space-sm);
	display: none;
}

.form-success {
	background: var(--color-success-light);
	color: var(--color-success);
}

.form-error {
	background: #FDEAEA;
	color: var(--color-error);
}

.form-success.is-visible,
.form-error.is-visible {
	display: block;
}

/* Quote form card (used in the hero) */
.quote-form-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: var(--card-radius);
	box-shadow: var(--shadow-lg);
	padding: var(--space-lg);
}

/* Smooths out the height jump between wizard steps (and when a
 * conditional block reveals/collapses) instead of the page snapping to
 * a new size — see animateHeightChange() in quote-form.js, which drives
 * this by setting an explicit pixel height for the transition to run
 * against. Opted in via `no-preference` rather than the usual
 * `reduce` override, so motion-sensitive visitors get the instant,
 * un-animated behavior by default. */
@media (prefers-reduced-motion: no-preference) {
	.quote-wizard-form {
		transition: height 260ms ease;
	}
}

.quote-step__actions {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.quote-step__actions .btn--primary {
	flex: 1 1 auto;
}

.quote-step__actions .btn--outline {
	flex: 0 0 auto;
}

.quote-form-card__title {
	font-size: var(--fs-h4);
	margin-bottom: var(--space-md);
}

/* ---------- Quote wizard: progress bar ---------- */
.quote-progress {
	display: flex;
	gap: 10px;
	margin-top: var(--space-md);
}

.quote-progress__bar {
	flex: 1 1 0;
	height: 6px;
	border-radius: var(--radius-full);
	background: var(--color-border);
	transition: background-color 200ms ease;
}

.quote-progress__bar.is-active {
	background: var(--color-success);
}

/* ---------- Quote wizard: checkbox / radio groups ---------- */
.form-checkbox-group,
.form-radio-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	margin-bottom: var(--space-md);
}

.form-checkbox,
.form-radio {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2xs);
	font-size: var(--fs-body);
	color: var(--color-text);
	cursor: pointer;
}

.form-checkbox input,
.form-radio input {
	flex-shrink: 0;
	margin-top: 0.2em;
	width: 18px;
	height: 18px;
	accent-color: var(--color-primary);
}

.quote-form__label {
	font-size: var(--fs-small);
	font-weight: var(--fw-semibold);
	color: var(--color-text);
	margin-bottom: var(--space-xs);
}

.quote-conditional {
	padding-left: var(--space-md);
	border-left: 2px solid var(--color-border);
	margin-bottom: var(--space-md);
}

.quote-divider {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: var(--space-md) 0;
}

.quote-vin-status {
	display: block;
	font-size: var(--fs-small);
	color: var(--color-text-muted);
	margin-top: var(--space-3xs);
	min-height: 1.4em;
}

/* ---------- Quote wizard: result view ---------- */
.quote-result {
	text-align: center;
}

.quote-result__icon {
	font-size: 2rem;
	line-height: 1;
	margin-bottom: var(--space-sm);
}

.quote-result__title {
	font-size: var(--fs-h4);
	margin-bottom: var(--space-sm);
}

.quote-result__body p {
	color: var(--color-text-muted);
	margin-bottom: var(--space-xs);
}

.quote-result__actions {
	margin-top: var(--space-md);
}
