/* xSolia RFQ form. Uses theme presets when available, with fallbacks. */

.xs-rfq {
	--xs-navy: var(--wp--preset--color--navy, #12233F);
	--xs-ink: var(--wp--preset--color--graphite, #17202A);
	--xs-line: var(--wp--preset--color--cool-gray, #D9DEE5);
	--xs-muted: var(--wp--preset--color--slate, #4A5563);
	--xs-accent: var(--wp--preset--color--copper-strong, #B4532A);
	--xs-focus: var(--wp--preset--color--copper, #D66A3A);
	--xs-error: #B42318;
	color: var(--xs-ink);
}

.xs-rfq fieldset {
	border: 0;
	margin: 0 0 2rem;
	padding: 0;
	min-width: 0;
}

.xs-rfq legend {
	font-family: var(--wp--preset--font-family--manrope, inherit);
	font-weight: 750;
	font-size: 1.25rem;
	color: var(--xs-navy);
	margin-bottom: 1rem;
	padding: 0;
}

.xs-rfq .xs-radios legend {
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 0.6rem;
}

.xs-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.15rem 1.25rem;
}

.xs-span-2 {
	grid-column: 1 / -1;
}

@media (max-width: 640px) {
	.xs-grid {
		grid-template-columns: 1fr;
	}
}

.xs-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0;
}

.xs-field > label {
	font-weight: 600;
	font-size: 0.975rem;
	color: var(--xs-ink);
}

.xs-optional {
	font-weight: 400;
	color: var(--xs-muted);
	font-size: 0.875rem;
}

.xs-required {
	color: var(--xs-accent);
	font-weight: 700;
}

.xs-hint {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--xs-muted);
}

.xs-rfq input[type="text"],
.xs-rfq input[type="email"],
.xs-rfq input[type="tel"],
.xs-rfq input[type="date"],
.xs-rfq select,
.xs-rfq textarea {
	width: 100%;
	min-height: 48px;
	padding: 0.7rem 0.85rem;
	font: inherit;
	font-size: 1rem;
	color: var(--xs-ink);
	background: #fff;
	border: 1.5px solid #8C96A3;
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.xs-rfq textarea {
	min-height: 150px;
	resize: vertical;
}

.xs-rfq input:hover,
.xs-rfq select:hover,
.xs-rfq textarea:hover {
	border-color: var(--xs-navy);
}

.xs-rfq input:focus-visible,
.xs-rfq select:focus-visible,
.xs-rfq textarea:focus-visible {
	outline: 3px solid var(--xs-focus);
	outline-offset: 1px;
	border-color: var(--xs-navy);
}

.xs-rfq [aria-invalid="true"] {
	border-color: var(--xs-error) !important;
	box-shadow: 0 0 0 1px var(--xs-error);
}

.xs-rfq input[type="file"] {
	padding: 0.75rem;
	border: 1.5px dashed #8C96A3;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	min-height: 48px;
}

.xs-field-error {
	margin: 0.15rem 0 0;
	color: var(--xs-error);
	font-size: 0.9rem;
	font-weight: 600;
}

.xs-field-error::before {
	content: "! ";
}

.xs-radios {
	margin-top: 1.5rem !important;
	margin-bottom: 0 !important;
}

.xs-radio,
.xs-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	cursor: pointer;
}

.xs-radio {
	display: inline-flex;
	align-items: center;
	margin: 0 1.5rem 0.5rem 0;
	min-height: 44px;
}

.xs-rfq input[type="radio"],
.xs-rfq input[type="checkbox"] {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
	flex: 0 0 auto;
	accent-color: var(--xs-navy);
}

.xs-radio input[type="radio"] {
	margin: 0;
}

.xs-consent {
	margin: 0.5rem 0 1.75rem;
	padding: 1rem 1.1rem;
	background: #fff;
	border: 1px solid var(--xs-line);
	border-radius: 10px;
}

.xs-consent .xs-checkbox {
	font-weight: 400;
}

.xs-consent span {
	font-size: 0.95rem;
	line-height: 1.55;
}

.xs-submit {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: flex-start;
}

.xs-submit-button {
	min-height: 52px;
	padding: 0.9rem 2rem;
	border: 0;
	border-radius: 8px;
	background: var(--xs-accent);
	color: #fff;
	font-family: var(--wp--preset--font-family--manrope, inherit);
	font-weight: 700;
	font-size: 1.0625rem;
	cursor: pointer;
}

.xs-submit-button:hover {
	background: #9A4522;
}

.xs-submit-button[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.xs-rfq-legend-note {
	font-size: 0.9rem;
	color: var(--xs-muted);
	margin: 0 0 1.5rem;
}

.xs-rfq-alert,
.xs-rfq-success {
	border-radius: 10px;
	padding: 1.25rem 1.4rem;
	margin-bottom: 2rem;
}

.xs-rfq-alert {
	border: 2px solid var(--xs-error);
	background: #FEF3F2;
}

.xs-rfq-alert-title,
.xs-rfq-success h2 {
	font-size: 1.2rem !important;
	margin: 0 0 0.5rem;
}

.xs-rfq-alert-title {
	color: var(--xs-error) !important;
}

.xs-rfq-alert ul {
	margin: 0.25rem 0 0;
	padding-left: 1.2rem;
}

.xs-rfq-alert a {
	color: var(--xs-error);
	font-weight: 600;
}

.xs-rfq-success {
	border: 2px solid #1F7A4D;
	background: #F0FAF4;
}

.xs-rfq-success h2 {
	color: #14532D !important;
}

.xs-rfq-alert:focus,
.xs-rfq-success:focus {
	outline: 3px solid var(--xs-focus);
	outline-offset: 3px;
}

.xs-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ---------- Steps (guided intake) ---------- */

.xs-step-panel {
	margin: 0 0 2.5rem;
}

.xs-step-title {
	font-family: var(--wp--preset--font-family--manrope, inherit);
	font-size: clamp(1.35rem, 2.2vw, 1.65rem) !important;
	font-weight: 750;
	color: var(--xs-navy);
	margin: 0 0 1.25rem !important;
	scroll-margin-top: 7rem;
}

.xs-step-title:focus {
	outline: none;
}

.xs-step-title:focus-visible {
	outline: 3px solid var(--xs-focus);
	outline-offset: 4px;
}

.is-wizard .xs-step-panel {
	margin-bottom: 0;
}

.is-wizard .xs-step-panel.is-active {
	animation: xs-step-in 0.25s ease both;
}

@keyframes xs-step-in {
	from { transform: translateY(6px); }
	to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.is-wizard .xs-step-panel.is-active {
		animation: none;
	}
}

.xs-wizard-progress {
	margin: 0 0 1.75rem;
}

.xs-wizard-count {
	margin: 0 0 0.6rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--xs-muted);
}

.xs-wizard-bar {
	height: 6px;
	border-radius: 999px;
	background: var(--xs-line);
	overflow: hidden;
}

.xs-wizard-bar span {
	display: block;
	height: 100%;
	width: 20%;
	border-radius: inherit;
	background: var(--xs-accent);
	transition: width 0.3s ease;
}

.xs-wizard-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
	counter-reset: xs-wstep;
}

.xs-wizard-step {
	counter-increment: xs-wstep;
	min-height: 36px;
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--xs-line);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--xs-navy);
	cursor: pointer;
}

.xs-wizard-step::before {
	content: counter(xs-wstep) ". ";
}

.xs-wizard-step[disabled] {
	color: #5B6470;
	background: transparent;
	cursor: default;
}

.xs-wizard-step.is-done {
	border-color: var(--xs-navy);
}

.xs-wizard-step[aria-current="step"] {
	background: var(--xs-navy);
	border-color: var(--xs-navy);
	color: #fff;
}

@media (max-width: 640px) {
	.xs-wizard-steps {
		display: none;
	}
}

/* Product choice cards */
.xs-choice-group {
	margin: 0 0 1.5rem !important;
}

.xs-choices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

@media (max-width: 640px) {
	.xs-choices {
		grid-template-columns: 1fr;
	}
}

.xs-choice {
	position: relative;
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
	padding: 1rem 1.1rem;
	min-height: 64px;
	border: 1.5px solid var(--xs-line);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.xs-choice:hover {
	border-color: var(--xs-navy);
}

.xs-choice input[type="radio"] {
	margin-top: 0.2rem;
}

.xs-choice:has(input:checked) {
	border-color: var(--xs-navy);
	box-shadow: 0 0 0 1px var(--xs-navy);
	background: #F8F9FB;
}

.xs-choice:has(input:focus-visible) {
	outline: 3px solid var(--xs-focus);
	outline-offset: 2px;
}

.xs-choice-body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.xs-choice-title {
	font-weight: 700;
	color: var(--xs-navy);
	line-height: 1.3;
}

.xs-choice-desc {
	font-size: 0.875rem;
	color: var(--xs-muted);
	line-height: 1.45;
}

.xs-choice-group [aria-invalid="true"] {
	box-shadow: none;
}

.xs-choice-group:has([aria-invalid="true"]) .xs-choice {
	border-color: var(--xs-error);
}

/* Step navigation */
.xs-step-nav,
.xs-submit-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-top: 1.75rem;
}

.xs-submit-row {
	margin-top: 0;
}

.xs-btn {
	min-height: 52px;
	padding: 0.85rem 1.6rem;
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--manrope, inherit);
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
}

.xs-btn-primary {
	border: 0;
	background: var(--xs-navy);
	color: #fff;
}

.xs-btn-primary:hover {
	background: var(--xs-ink);
}

.xs-btn-ghost {
	border: 2px solid var(--xs-navy);
	background: transparent;
	color: var(--xs-navy);
}

.xs-btn-ghost:hover {
	background: var(--xs-navy);
	color: #fff;
}

.xs-btn:focus-visible {
	outline: 3px solid var(--xs-focus);
	outline-offset: 3px;
}

.xs-skip-note {
	margin-top: 1rem !important;
}

/* File list */
.xs-file-list {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
	font-size: 0.9rem;
}

.xs-file-list li {
	padding: 0.45rem 0.7rem;
	margin-bottom: 0.35rem;
	background: #fff;
	border: 1px solid var(--xs-line);
	border-radius: 6px;
	overflow-wrap: anywhere;
}

/* Review */
.xs-review {
	margin: 0 0 1.5rem;
}

.xs-review-group {
	background: #fff;
	border: 1px solid var(--xs-line);
	border-radius: 10px;
	padding: 1rem 1.15rem;
	margin-bottom: 0.75rem;
}

.xs-review-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.xs-review-head h3 {
	margin: 0 !important;
	font-size: 1rem !important;
	color: var(--xs-navy);
}

.xs-review-edit {
	min-height: 40px;
	padding: 0.3rem 0.8rem;
	border: 0;
	background: transparent;
	color: var(--xs-accent);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.xs-review dl {
	display: grid;
	grid-template-columns: minmax(7rem, 30%) 1fr;
	gap: 0.35rem 1rem;
	margin: 0;
	font-size: 0.95rem;
}

.xs-review dt {
	color: var(--xs-muted);
}

.xs-review dd {
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-line;
}

@media (max-width: 480px) {
	.xs-review dl {
		grid-template-columns: 1fr;
		gap: 0.1rem;
	}

	.xs-review dd {
		margin-bottom: 0.5rem;
	}
}
