/* WP Step Form — multi-step Contact Form 7 */

.wpcf7-form .wpsf-multistep {
	--wpsf-gap: 0.75rem;
	--wpsf-radius: 8px;
	--wpsf-border: #d8d8d8;
	--wpsf-border-active: #1a1a1a;
	--wpsf-bg-choice: #fff;
	--wpsf-bg-choice-hover: #f5f5f5;
	--wpsf-bg-choice-selected: #1a1a1a;
	--wpsf-text-choice-selected: #fff;
	--wpsf-title-size: clamp(1.25rem, 2.5vw, 1.75rem);
	--wpsf-max-width: 42rem;
	max-width: var(--wpsf-max-width);
	margin: 0 auto;
}

.wpsf-progress {
	font-size: 0.875rem;
	color: #666;
	margin-bottom: 1.25rem;
	min-height: 1.25em;
}

.wpsf-step {
	display: none;
}

.wpsf-step.is-active {
	display: block;
	animation: wpsf-fade-in 0.25s ease;
}

@keyframes wpsf-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wpsf-step-title {
	font-size: var(--wpsf-title-size);
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 1.25rem;
}

/* Choice steps — hide default CF7 list styling */
.wpsf-step--choice .wpsf-choice-field > span {
	display: contents;
}

.wpsf-step--choice .wpcf7-form-control-wrap {
	display: block;
}

.wpsf-step--choice .wpcf7-radio {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wpsf-gap);
	margin: 0;
	padding: 0;
	border: 0;
}

@media (min-width: 540px) {
	.wpsf-step--choice .wpcf7-radio {
		grid-template-columns: repeat(2, 1fr);
	}
}

.wpsf-step--choice .wpcf7-list-item {
	margin: 0;
	display: block;
}

.wpsf-step--choice .wpcf7-list-item label {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	min-height: 3.25rem;
	padding: 0.875rem 1rem;
	margin: 0;
	border: 1px solid var(--wpsf-border);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
	text-align: left;
	line-height: 1.35;
	font-weight: 500;
}

.wpsf-step--choice .wpcf7-list-item label:hover {
	border-color: #ff98006e;
}

.wpsf-step--choice .wpcf7-list-item input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wpsf-step--choice .wpcf7-list-item-label {
	flex: 1;
}

.wpsf-step--choice .wpcf7-list-item input[type="radio"]:checked + .wpcf7-list-item-label,
.wpsf-step--choice .wpcf7-list-item input[type="radio"]:focus-visible + .wpcf7-list-item-label {
	/* label wraps input first in CF7 — use parent state via :has */
}

.wpsf-step--choice .wpcf7-list-item label:has(input:checked) {
	background: var(--wpsf-bg-choice-selected);
	border-color: #ff98006e;
	color: var(--wpsf-text-choice-selected);
}

.wpsf-step--choice .wpcf7-list-item label:has(input:focus-visible) {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

/* Text / contact steps */
.wpsf-step label {
	display: block;
	margin-bottom: 1rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--color-text);
}

.wpsf-step .wpsf-input,
.wpsf-step input[type="text"],
.wpsf-step input[type="email"],
.wpsf-step input[type="tel"],
.wpsf-step textarea {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.75rem 0.875rem;
	border: 1px solid var(--wpsf-border);
	font-size: 1rem;
	box-sizing: border-box;
}

.wpsf-step textarea {
	min-height: 6rem;
	resize: vertical;
}

.wpsf-step-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
	align-items: center;
}

.wpsf-step--choice .wpsf-step-actions {
	margin-top: 1rem;
}

.wpsf-step--last .wpsf-step-actions--submit {
	margin-top: 1.5rem;
}

.wpsf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.625rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid var(--wpsf-border-active);
	background: transparent;
	color: inherit;
	transition: background 0.15s, color 0.15s;
	color: #e9e4e0;
}

.wpsf-btn--next,
.wpcf7-form .wpsf-step--last input[type="submit"].wpsf-btn {
	background: var(--wpsf-bg-choice-selected);
	color: var(--wpsf-text-choice-selected);
	border-color: var(--wpsf-bg-choice-selected);
}

.wpsf-btn--next:hover,
.wpcf7-form .wpsf-step--last input[type="submit"].wpsf-btn:hover {
	opacity: 0.9;
}

.wpsf-btn--back {
	border-color: var(--wpsf-border);
	font-weight: 500;
}

.wpsf-step--last input[type="submit"].wpsf-btn {
	width: auto;
	padding: 0.625rem 1.5rem;
}

.wpsf-step--last input[type="submit"].wpsf-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Hide submit until last step is active */
.wpsf-multistep:not(.wpsf-on-last-step) .wpsf-step--last input[type="submit"] {
	pointer-events: none;
}

.wpsf-step-error {
	margin: 0 0 1rem;
	padding: 0.65rem 0.875rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: var(--wpsf-radius);
	color: #991b1b;
	font-size: 0.875rem;
}

.wpsf-step-error[hidden] {
	display: none !important;
}

/* CF7 validation on hidden steps */
.wpsf-step .wpcf7-not-valid-tip {
	margin-top: 0.35rem;
	font-size: 0.8125rem;
}

.wpcf7-form.wpsf-submitting .wpsf-multistep {
	opacity: 0.65;
	pointer-events: none;
}

/* Response message spacing */
.wpcf7 form.wpsf-enabled .wpcf7-response-output {
	margin-top: 1.25rem;
}
