/* WSW Quote Builder. Colours and fonts follow the Kadence global palette, with fallbacks. */
.wsw-qb {
	--wqb-gold: var(--global-palette1, #b8965a);
	--wqb-gold-dark: #8f7240;
	--wqb-dark: var(--global-palette3, #1a1612);
	--wqb-muted: var(--global-palette4, #6b6560);
	--wqb-cream: var(--global-palette7, #faf7f2);
	--wqb-cream-2: var(--global-palette8, #f5f0e8);
	--wqb-line: #e3dacb;
	--wqb-error: #a3261b;
	--wqb-heading: var(--global-heading-font-family, 'Cormorant Garamond', Georgia, serif);
	color: var(--wqb-dark);
	font-size: 16px;
	line-height: 1.55;
	margin: 0 auto 2.5rem;
	max-width: 1040px;
}
.wsw-qb *, .wsw-qb *::before, .wsw-qb *::after { box-sizing: border-box; }
.wsw-qb-loading { color: var(--wqb-muted); }

/* Progress */
.wsw-qb-progress {
	display: flex; gap: 6px; list-style: none; margin: 0 0 24px; padding: 0; counter-reset: none;
}
.wsw-qb-progress li {
	flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 0 0;
	border-top: 3px solid var(--wqb-line); color: var(--wqb-muted); font-size: 13px; letter-spacing: .02em;
}
.wsw-qb-progress li.is-done { border-top-color: var(--wqb-gold); }
.wsw-qb-progress li.is-current { border-top-color: var(--wqb-dark); color: var(--wqb-dark); font-weight: 600; }
.wsw-qb-progress-n {
	display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
	border: 1px solid currentColor; font-size: 12px; flex: none;
}
.wsw-qb-progress li.is-done .wsw-qb-progress-n { background: var(--wqb-gold); border-color: var(--wqb-gold); color: #fff; }
@media (max-width: 600px) {
	.wsw-qb-progress li:not(.is-current) .wsw-qb-progress-l { display: none; }
}

/* Panel and headings */
.wsw-qb-panel { background: #fff; border: 1px solid var(--wqb-line); padding: clamp(18px, 4vw, 36px); }
.wsw-qb-head { margin-bottom: 20px; }
.wsw-qb-title {
	font-family: var(--wqb-heading); font-weight: 500; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15;
	margin: 0 0 8px; color: var(--wqb-dark); outline: none;
}
.wsw-qb-subtitle { font-family: var(--wqb-heading); font-weight: 500; font-size: 24px; margin: 24px 0 8px; }
.wsw-qb-lead { margin: 0; color: var(--wqb-muted); }
.wsw-qb-note { color: var(--wqb-muted); font-size: 14px; margin: 14px 0 0; }
.wsw-qb-chip {
	display: inline-block; background: var(--wqb-cream-2); border: 1px solid var(--wqb-line); padding: 2px 10px;
	font-weight: 600; color: var(--wqb-dark); margin-right: 6px;
}
.wsw-qb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wsw-qb-projectlink { margin: -6px 0 18px; }

/* Cards */
.wsw-qb-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
@media (max-width: 420px) { .wsw-qb-designs { grid-template-columns: 1fr 1fr; gap: 10px; } }
.wsw-qb-card {
	position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
	background: var(--wqb-cream); border: 1px solid var(--wqb-line); border-radius: 2px; padding: 16px 12px 14px;
	cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; width: 100%;
	text-transform: none; letter-spacing: normal; line-height: 1.4; box-shadow: none;
}
.wsw-qb-card:hover { border-color: var(--wqb-gold); background: var(--wqb-cream); color: inherit; transform: translateY(-1px); }
.wsw-qb-card:focus-visible, .wsw-qb-card:focus-within { outline: 2px solid var(--wqb-dark); outline-offset: 2px; }
.wsw-qb-card.is-selected { border-color: var(--wqb-gold); box-shadow: inset 0 0 0 1px var(--wqb-gold); background: #fff; }
.wsw-qb-card.is-selected::after {
	content: ''; position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--wqb-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.2'/%3E%3C/svg%3E") center/16px no-repeat;
}
.wsw-qb-drawing-wrap { display: block; height: 150px; margin-bottom: 8px; }
.wsw-qb-drawing { height: 100%; width: auto; display: block; margin: 0 auto; }
.wsw-qb-card-name { font-weight: 600; font-size: 16px; }
.wsw-qb-card-desc { font-size: 13.5px; color: var(--wqb-muted); }
.wsw-qb-card-hint { font-size: 12.5px; color: var(--wqb-muted); font-style: italic; }

/* Sizes */
.wsw-qb-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.wsw-qb-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .wsw-qb-sizes { grid-template-columns: 1fr; } }
.wsw-qb-size input { position: absolute; opacity: 0; pointer-events: none; }
.wsw-qb-size-drawing { height: 140px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 8px; }
.wsw-qb-size-drawing > span { display: block; }
.wsw-qb-size-drawing svg { height: 100%; width: auto; display: block; }
@media (max-width: 640px) {
	.wsw-qb-size { flex-direction: row; text-align: left; align-items: center; gap: 14px; padding: 12px 40px 12px 14px; }
	.wsw-qb-size-drawing { height: 76px; width: 48px; margin: 0; flex: none; }
	.wsw-qb-size .wsw-qb-card-name { min-width: 64px; }
	.wsw-qb-size .wsw-qb-card-hint { display: none; }
}
.wsw-qb-sizes.has-error .wsw-qb-card { border-color: var(--wqb-error); }

/* Fields */
.wsw-qb-row { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 24px; align-items: flex-start; }
.wsw-qb-grow { flex: 1 1 240px; }
.wsw-qb-field { margin: 0 0 16px; }
.wsw-qb-row .wsw-qb-field { margin: 0; }
.wsw-qb-label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.wsw-qb-opt { font-weight: 400; color: var(--wqb-muted); }
.wsw-qb-input {
	width: 100%; font: inherit; font-size: 16px; color: var(--wqb-dark); background: #fff;
	border: 1px solid #cfc5b4; border-radius: 2px; padding: 11px 12px; min-height: 46px; box-shadow: none;
}
.wsw-qb-input:focus { outline: 2px solid var(--wqb-gold); outline-offset: 0; border-color: var(--wqb-gold); }
textarea.wsw-qb-input { min-height: 90px; resize: vertical; }
.wsw-qb-field.has-error .wsw-qb-input { border-color: var(--wqb-error); }
.wsw-qb-error { color: var(--wqb-error); font-size: 14px; margin: 6px 0 0; }
.wsw-qb-hint { color: var(--wqb-muted); font-size: 13px; margin: 6px 0 0; }
.wsw-qb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) { .wsw-qb-grid2 { grid-template-columns: 1fr; } }
.wsw-qb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wsw-qb-alert { background: #fbeeec; border-left: 4px solid var(--wqb-error); padding: 12px 14px; margin: 0 0 18px; outline: none; }

/* Stepper */
.wsw-qb-stepper { display: inline-flex; align-items: stretch; border: 1px solid #cfc5b4; border-radius: 2px; background: #fff; }
.wsw-qb-step {
	width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer;
	color: var(--wqb-dark); padding: 0; box-shadow: none;
}
.wsw-qb-step:hover:not([disabled]) { background: var(--wqb-cream-2); color: var(--wqb-dark); }
.wsw-qb-step[disabled] { color: #c6bdb0; cursor: default; }
.wsw-qb-step:focus-visible { outline: 2px solid var(--wqb-gold); outline-offset: -2px; }
.wsw-qb-qty { display: grid; place-items: center; min-width: 44px; font-weight: 600; border-left: 1px solid #e6ddcf; border-right: 1px solid #e6ddcf; }

/* Buttons */
.wsw-qb-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; }
.wsw-qb-actions:has(> :only-child) { justify-content: flex-end; }
.wsw-qb-btn {
	font: inherit; font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
	background: var(--wqb-gold); color: #fff; border: 1px solid var(--wqb-gold); border-radius: 2px;
	padding: 13px 26px; min-height: 48px; cursor: pointer; transition: background .15s, border-color .15s; box-shadow: none;
}
.wsw-qb-btn:hover, .wsw-qb-btn:focus-visible { background: var(--wqb-gold-dark); border-color: var(--wqb-gold-dark); color: #fff; }
.wsw-qb-btn:focus-visible { outline: 2px solid var(--wqb-dark); outline-offset: 2px; }
.wsw-qb-btn[disabled] { opacity: .7; cursor: progress; }
.wsw-qb-btn-ghost { background: transparent; color: var(--wqb-dark); border-color: #cfc5b4; }
.wsw-qb-btn-ghost:hover, .wsw-qb-btn-ghost:focus-visible { background: var(--wqb-cream-2); color: var(--wqb-dark); border-color: var(--wqb-dark); }
@media (max-width: 480px) {
	.wsw-qb-actions { flex-direction: column-reverse; }
	.wsw-qb-actions .wsw-qb-btn { width: 100%; }
}
.wsw-qb-link {
	background: none; border: 0; padding: 0; font: inherit; font-size: 14.5px; color: var(--wqb-dark); cursor: pointer;
	text-decoration: underline; text-decoration-color: var(--wqb-gold); text-underline-offset: 3px; box-shadow: none;
	text-transform: none; letter-spacing: normal; min-height: 0;
}
.wsw-qb-link:hover { color: var(--wqb-gold-dark); background: none; }

/* Project list */
.wsw-qb-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wqb-line); }
.wsw-qb-item { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--wqb-line); margin: 0; }
.wsw-qb-item-drawing { width: 44px; height: 76px; flex: none; }
.wsw-qb-item-drawing svg { height: 100%; width: auto; display: block; }
.wsw-qb-item-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wsw-qb-item-name { font-weight: 600; }
.wsw-qb-item-room { color: var(--wqb-muted); font-size: 14px; }
.wsw-qb-item-links { display: flex; gap: 16px; margin-top: 4px; }
.wsw-qb-item-qty { flex: none; }
@media (max-width: 480px) {
	.wsw-qb-item { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; row-gap: 10px; align-items: start; }
	.wsw-qb-item-drawing { grid-row: span 2; }
	.wsw-qb-item-qty { grid-column: 2; }
}

/* Done */
.wsw-qb-next { margin: 0 0 16px 1.2em; padding: 0; }
.wsw-qb-next li { margin: 0 0 6px; }

/* Fallback and test banner (outside .wsw-qb) */
.wsw-qb-fallback { border: 1px solid #e3dacb; background: #faf7f2; padding: 18px 20px; margin: 0 0 24px; }
.wsw-qb-testbanner { border-left: 4px solid #f5a524; background: #fff8e8; padding: 10px 14px; margin: 0 auto 18px; max-width: 1040px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
	.wsw-qb-card, .wsw-qb-btn { transition: none; }
	.wsw-qb-card:hover { transform: none; }
}
