/* Helix Website Quote Builder — customer wizard.
   Everything is namespaced under .hqb-wizard and uses an explicit font stack so
   the wizard reads consistently inside any theme. One accent (--hqb-accent),
   overridable via the shortcode's accent="" attribute or site CSS. */

.hqb-wizard {
	--hqb-ink: #000000;
	--hqb-muted: #4a4a4a;
	--hqb-surface: #ffffff;
	--hqb-bg: #ffffff;
	--hqb-line: #000000;
	--hqb-line-strong: #000000;
	--hqb-accent: #8914BF;         /* Helix purple */
	--hqb-accent-ink: #6a0f95;     /* darker purple for hover/press */
	--hqb-accent-soft: #f6ecfc;    /* pale purple wash for selected rows */
	--hqb-danger: #b3261e;
	--hqb-radius: 14px;
	--hqb-radius-sm: 10px;
	--hqb-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 10px 30px rgba(0, 0, 0, .06);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--hqb-ink);
	line-height: 1.55;
	/* Sized as a proportion of the viewport, but capped by the parent so it can
	   never overflow a padded theme/Elementor container. width:100% + a vw
	   max-width is the safe form: `width:95vw` alone escapes narrow parents and
	   pushes the page sideways on mobile. */
	width: 100%;
	max-width: 95vw;
	min-width: 0;
	margin-left: auto;
	margin-right: auto;
	/* Sticky site headers otherwise cover the step title when the wizard
	   scrolls itself into view. */
	scroll-margin-top: 96px;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
	overflow-wrap: break-word;
}

/* Tablet */
@media (min-width: 768px) {
	.hqb-wizard { max-width: 80vw; }
}

/* Laptop and desktop */
@media (min-width: 1200px) {
	.hqb-wizard { max-width: 50vw; }
}
.hqb-wizard *, .hqb-wizard *::before, .hqb-wizard *::after { box-sizing: inherit; }

.hqb-wizard .hqb-card {
	background: var(--hqb-surface);
	border: 1px solid var(--hqb-line);
	border-radius: var(--hqb-radius);
	box-shadow: var(--hqb-shadow);
	padding: 20px 16px;
	max-width: 100%;
	overflow-wrap: break-word;
}
@media (min-width: 560px) { .hqb-wizard .hqb-card { padding: 34px; } }
@media (max-width: 400px) { .hqb-wizard .hqb-card { padding: 16px 12px; } }

/* ---- progress ---- */
.hqb-wizard .hqb-progress { margin-bottom: 22px; }
.hqb-wizard .hqb-progress-track {
	height: 8px;
	background: #ffffff;
	border: 1px solid var(--hqb-line);
	border-radius: 999px;
	overflow: hidden;
}
.hqb-wizard .hqb-progress-fill {
	height: 100%;
	background: var(--hqb-accent);
	border-radius: 999px;
	transition: width .4s cubic-bezier(.2, .7, .2, 1);
}
.hqb-wizard .hqb-progress-label {
	margin-top: 8px;
	font-size: 12px;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--hqb-muted);
}

/* ---- type ---- */
.hqb-wizard .hqb-title {
	font-size: 24px;
	line-height: 1.2;
	font-weight: 650;
	letter-spacing: -.01em;
	margin: 0 0 6px;
	color: var(--hqb-ink);
}
@media (min-width: 560px) { .hqb-wizard .hqb-title { font-size: 28px; } }
.hqb-wizard .hqb-lead { margin: 0 0 20px; color: var(--hqb-muted); font-size: 16px; }

/* ---- inclusions ---- */
.hqb-wizard .hqb-inclusions {
	background: var(--hqb-bg);
	border: 1px solid var(--hqb-line);
	border-radius: var(--hqb-radius-sm);
	padding: 18px 20px;
	margin-bottom: 8px;
}
.hqb-wizard .hqb-inclusions h3 {
	margin: 0 0 12px;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hqb-accent-ink);
}
.hqb-wizard .hqb-inclusions ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.hqb-wizard .hqb-inclusions li { position: relative; padding-left: 26px; font-size: 15px; }
.hqb-wizard .hqb-inclusions li::before {
	content: "";
	position: absolute;
	left: 0; top: 7px;
	width: 14px; height: 8px;
	border-left: 2px solid var(--hqb-accent);
	border-bottom: 2px solid var(--hqb-accent);
	transform: rotate(-45deg);
}

/* ---- options ---- */
/* Themes (Elementor especially) style bare <button> aggressively. These resets
   are !important because a theme rule can otherwise repaint the selected state
   and make selection look like it "just flashes". */
.hqb-wizard button.hqb-option,
.hqb-wizard button.hqb-btn {
	-webkit-appearance: none !important;
	appearance: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-sizing: border-box !important;
	line-height: 1.45 !important;
	text-shadow: none !important;
	background-image: none !important;
}
/* minmax(0,1fr) is essential: a grid column defaults to `auto`, which refuses
   to shrink below its content's min-content width, so a long option label
   pushes the button wider than the card. Same reason for min-width:0 on the
   flex children below. */
.hqb-wizard .hqb-options {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	margin: 0 0 4px;
}
.hqb-wizard .hqb-option {
	min-width: 0;
	max-width: 100%;
	/* Grid, not flex: the tick gets its own fixed column, so a long label can
	   never run underneath it. The text column is minmax(0,…) so it shrinks and
	   wraps instead of pushing the tick out of the button. */
	display: grid;
	grid-template-columns: minmax(0, 1fr) 22px;
	align-items: center;
	gap: 12px;
	width: 100%;
	text-align: left;
	background: var(--hqb-surface);
	border: 1.5px solid var(--hqb-line-strong);
	border-radius: var(--hqb-radius-sm);
	padding: 15px 16px;
	min-height: 54px;
	font: inherit;
	color: var(--hqb-ink);
	cursor: pointer;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.hqb-wizard .hqb-option:hover { border-color: var(--hqb-accent); }
.hqb-wizard button.hqb-option.is-selected,
.hqb-wizard .hqb-option.is-selected {
	border-color: var(--hqb-accent) !important;
	background: var(--hqb-accent-soft) !important;
	box-shadow: inset 0 0 0 1px var(--hqb-accent) !important;
	color: var(--hqb-ink) !important;
}
.hqb-wizard .hqb-option-lg { align-items: start; padding: 17px 18px; }
.hqb-wizard .hqb-option-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.hqb-wizard .hqb-option-label { font-weight: 550; font-size: 15.5px; min-width: 0; overflow-wrap: break-word; flex: 1 1 auto; }
.hqb-wizard .hqb-option-desc { color: var(--hqb-muted); font-size: 13.5px; line-height: 1.45; min-width: 0; overflow-wrap: break-word; flex: 1 1 100%; }
.hqb-wizard .hqb-check {
	flex: 0 0 auto;
	width: 22px; height: 22px;
	border: 2px solid var(--hqb-line-strong);
	border-radius: 999px;
	position: relative;
	transition: border-color .15s, background .15s;
}
.hqb-wizard .hqb-check-box { border-radius: 6px; }
.hqb-wizard .hqb-option.is-selected .hqb-check { border-color: var(--hqb-accent) !important; background: var(--hqb-accent) !important; }
.hqb-wizard .hqb-option.is-selected .hqb-check::after {
	content: "";
	position: absolute;
	left: 6px; top: 3px;
	width: 6px; height: 10px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
}
.hqb-wizard .hqb-badge {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .03em;
	color: var(--hqb-accent-ink);
	background: var(--hqb-accent-soft);
	border-radius: 999px;
	padding: 3px 9px;
	margin-left: 4px;
}

/* ---- questions ---- */
.hqb-wizard .hqb-questions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }

/* Steps with more than three questions go two-up on laptop and desktop, so a
   long step doesn't become an endless scroll. Questions that need room —
   multi-option choices and textareas — span both columns. */
@media (min-width: 1200px) {
	.hqb-wizard .hqb-questions.is-two-col {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 36px;
		row-gap: 28px;
		align-items: start;
	}
	.hqb-wizard .hqb-questions.is-two-col .hqb-field-wide { grid-column: 1 / -1; }
}
.hqb-wizard .hqb-field { border: 0; padding: 0; margin: 0; min-width: 0; max-width: 100%; }
.hqb-wizard .hqb-q-label { font-weight: 600; font-size: 16px; padding: 0; margin-bottom: 10px; }
.hqb-wizard .hqb-help { margin: -4px 0 12px; color: var(--hqb-muted); font-size: 14px; }
.hqb-wizard .hqb-req { color: var(--hqb-accent); }

.hqb-wizard .hqb-input {
	width: 100%;
	font: inherit;
	color: var(--hqb-ink);
	background: var(--hqb-surface);
	border: 1.5px solid var(--hqb-line-strong);
	border-radius: var(--hqb-radius-sm);
	padding: 12px 14px;
	min-height: 50px;
	max-width: 100%;
}
.hqb-wizard .hqb-input:focus { outline: none; border-color: var(--hqb-accent); box-shadow: 0 0 0 3px var(--hqb-accent-soft); }
textarea.hqb-input { min-height: 84px; resize: vertical; }

/* ---- nav / buttons ---- */
.hqb-wizard .hqb-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 26px;
}
.hqb-wizard .hqb-btn {
	font: inherit;
	font-weight: 600;
	border-radius: var(--hqb-radius-sm);
	padding: 13px 22px;
	min-height: 50px;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: background .15s, border-color .15s, transform .05s;
}
.hqb-wizard .hqb-btn:active { transform: translateY(1px); }
.hqb-wizard .hqb-btn-primary { background: var(--hqb-accent); color: #fff; }
.hqb-wizard .hqb-btn-primary:hover { background: var(--hqb-accent-ink); }
.hqb-wizard .hqb-btn-primary:disabled { opacity: .6; cursor: default; }
.hqb-wizard .hqb-btn-ghost { background: transparent; color: var(--hqb-ink); border-color: var(--hqb-line-strong); }
.hqb-wizard .hqb-btn-ghost:hover { border-color: var(--hqb-ink); }

/* ---- review ---- */
.hqb-wizard .hqb-summary {
	background: var(--hqb-bg);
	border: 1px solid var(--hqb-line);
	border-radius: var(--hqb-radius-sm);
	padding: 18px 20px;
	margin-bottom: 22px;
}
.hqb-wizard .hqb-summary-type { font-weight: 650; font-size: 17px; margin-bottom: 12px; }
.hqb-wizard .hqb-summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hqb-wizard .hqb-summary li {
	/* Two rows on narrow screens. Side-by-side squeezed the value column so
	   hard that short words like "Yes" and "CRM" broke mid-character. */
	display: grid;
	grid-template-columns: 1fr;
	gap: 2px;
	font-size: 14.5px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--hqb-line);
}
@media (min-width: 620px) {
	.hqb-wizard .hqb-summary li {
		grid-template-columns: minmax(0, 1fr) minmax(40%, auto);
		gap: 16px;
		align-items: baseline;
	}
	.hqb-wizard .hqb-summary li span:last-child { text-align: right; }
}
.hqb-wizard .hqb-summary li:last-child { border-bottom: 0; padding-bottom: 0; }
.hqb-wizard .hqb-summary li span:first-child { color: var(--hqb-muted); }
.hqb-wizard .hqb-summary li span:last-child { font-weight: 550; min-width: 0; overflow-wrap: break-word; }

/* ---- locked price teaser ---- */
.hqb-wizard .hqb-reveal-teaser {
	text-align: center;
	padding: 20px;
	border: 1px dashed var(--hqb-line-strong);
	border-radius: var(--hqb-radius-sm);
	margin-bottom: 24px;
}
.hqb-wizard .hqb-locked-price {
	display: inline-block;
	font-size: 34px;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--hqb-ink);
	filter: blur(9px);
	user-select: none;
	pointer-events: none;
}
.hqb-wizard .hqb-reveal-copy { margin: 12px 0 0; color: var(--hqb-muted); font-size: 14.5px; }

/* ---- lead form ---- */
.hqb-wizard .hqb-form-title { font-size: 17px; font-weight: 650; margin: 0 0 16px; }
.hqb-wizard .hqb-field-group { margin-bottom: 15px; }
.hqb-wizard .hqb-field-row { display: grid; gap: 15px; }
@media (min-width: 520px) { .hqb-wizard .hqb-field-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.hqb-wizard .hqb-label { display: block; font-weight: 550; font-size: 14px; margin-bottom: 6px; }
.hqb-wizard .hqb-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
	color: var(--hqb-muted);
	margin-top: 14px;
	cursor: pointer;
}
.hqb-wizard .hqb-consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--hqb-accent); }
.hqb-wizard .hqb-consent a { color: var(--hqb-accent-ink); }
.hqb-wizard .hqb-consent-optional { margin-top: 10px; }
.hqb-wizard .hqb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- notes ---- */
.hqb-wizard .hqb-note {
	border-radius: var(--hqb-radius-sm);
	padding: 12px 15px;
	font-size: 14px;
	margin-top: 18px;
}
.hqb-wizard .hqb-note-error { background: #fdeceb; color: var(--hqb-danger); border: 1px solid #f4c9c6; }
.hqb-wizard .hqb-note-info { background: var(--hqb-accent-soft); color: var(--hqb-accent-ink); border: 1px solid #c7e3dc; }

/* ---- result ---- */
.hqb-wizard .hqb-result { text-align: center; }
.hqb-wizard .hqb-result-ref {
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--hqb-muted);
	margin-bottom: 8px;
}
.hqb-wizard .hqb-result-price {
	font-size: 46px;
	font-weight: 750;
	letter-spacing: -.02em;
	color: var(--hqb-accent-ink);
	margin: 6px 0 20px;
	filter: blur(10px);
	opacity: .5;
	transition: filter .5s ease, opacity .5s ease;
}
.hqb-wizard .hqb-result-price.is-revealed { filter: blur(0); opacity: 1; }
@media (min-width: 560px) { .hqb-wizard .hqb-result-price { font-size: 56px; } }
.hqb-wizard .hqb-result-lines {
	text-align: left;
	max-width: 380px;
	margin: 0 auto 18px;
	display: grid;
	gap: 10px;
}
.hqb-wizard .hqb-result-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; font-size: 15px; text-align: left; }
.hqb-wizard .hqb-result-line span:last-child { font-weight: 600; white-space: nowrap; }
.hqb-wizard .hqb-result-line-total { border-top: 1px solid var(--hqb-line); padding-top: 10px; }
.hqb-wizard .hqb-disclaimer { color: var(--hqb-muted); font-size: 13.5px; max-width: 440px; margin: 8px auto 0; }
.hqb-wizard .hqb-breakdown { text-align: left; margin-top: 22px; }
.hqb-wizard .hqb-breakdown summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--hqb-accent-ink); }
.hqb-wizard .hqb-breakdown ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; }
.hqb-wizard .hqb-breakdown li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; font-size: 14px; border-bottom: 1px solid var(--hqb-line); padding-bottom: 9px; overflow-wrap: break-word; }
.hqb-wizard .hqb-breakdown li.hqb-bd-sub { border-top: 1px solid var(--hqb-line); padding-top: 9px; margin-top: 4px; color: var(--hqb-muted); }
.hqb-wizard .hqb-breakdown li.hqb-bd-total { font-weight: 650; border-bottom: 0; }

.hqb-wizard .hqb-result-actions {
	margin-top: 26px;
	display: flex;
	justify-content: center;
}
.hqb-wizard .hqb-result-actions .hqb-btn { min-width: 220px; }

/* ---- loading skeleton (fallback path only) ---- */
.hqb-wizard .hqb-skeleton {
	height: 14px;
	border-radius: 6px;
	background: linear-gradient(90deg, #eee 25%, #f6f6f6 37%, #eee 63%);
	background-size: 400% 100%;
	animation: hqb-shimmer 1.3s ease infinite;
	margin-bottom: 14px;
}
.hqb-wizard .hqb-skeleton-title { height: 26px; width: 65%; margin-bottom: 22px; }
.hqb-wizard .hqb-skeleton-short { width: 45%; }
@keyframes hqb-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
	.hqb-wizard .hqb-skeleton { animation: none; }
}

/* ---- accessibility ---- */
.hqb-wizard :focus-visible { outline: 2px solid var(--hqb-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	.hqb-wizard .hqb-progress-fill, .hqb-wizard .hqb-result-price, .hqb-wizard .hqb-btn { transition: none; }
}
