/* The `builder` product-detail layout · TT-5911
 *
 * Loaded after assets/st-product-detail-kit.css, whose dress `builder` shares.
 * This sheet only says what is different: the panel's order (the live total and
 * Add to cart come AFTER the steps), the swatches that replace the colour
 * dropdown (assets/st-product-builder.js), and the empty print step. The PHP is
 * inc/product-detail-builder.php.
 *
 * As in kit, everything hidden here stays in the DOM: the configurator queries
 * and writes to the dropdown, the rush label and the second Add to cart. Nothing
 * here is a colour literal or a font name.
 */

/* ── The panel, in the builder's order ──────────────────────────────────── */
html[data-st-product-detail-style='builder'] .summary > .st-floor__eyebrow { order: 1; }
html[data-st-product-detail-style='builder'] .summary > .st-floor__name { order: 2; }
html[data-st-product-detail-style='builder'] .summary > .st-builder__from { order: 3; }
html[data-st-product-detail-style='builder'] .summary > .st-floor__facts { order: 4; }
html[data-st-product-detail-style='builder'] .summary > .configurator { order: 5; }
html[data-st-product-detail-style='builder'] .summary > .st-builder__total { order: 6; }
html[data-st-product-detail-style='builder'] .summary > .st-floor__trust { order: 7; }
html[data-st-product-detail-style='builder'] .summary > .st-floor__description { order: 8; }
html[data-st-product-detail-style='builder'] .summary > .st-floor__accordions { order: 9; }

html[data-st-product-detail-style='builder'] .st-builder__from {
	padding-block-start: 12px;
	border-block-start: 1px solid var(--st-kit-rule);
}

/* ── One panel: every step open at once (the 2026-10-05 sketch) ────────────
   The configurator shows one `.step-item` per `.order__container[data-step]`.
   Steps 2-5 (colours and sizes, design, finishing, notes) all show here, each
   under a rule; step 1, Decorated / Blank, stays hidden (blank is no print).
   The stepper, Back and Next go: there is nothing to step through. The second
   price block (`.block-price`) and its Bulk price breaks button go too; their
   numbers are read into the one total below (assets/st-product-builder.js),
   and they stay in the DOM because the configurator writes to them. */
html[data-st-product-detail-style='builder'] .configurator .order__container > .step-item:is([data-step='2'], [data-step='3'], [data-step='4'], [data-step='5']) {
	display: flex !important;
	flex-direction: column;
	padding-block-start: 20px;
	border-block-start: 1px solid var(--wp--preset--color--ti-fg, currentColor);
}

html[data-st-product-detail-style='builder'] .configurator .order__container {
	row-gap: 28px;
}

html[data-st-product-detail-style='builder'] .configurator .order__container > .progressbar,
html[data-st-product-detail-style='builder'] .configurator .order__container > .next-btn,
html[data-st-product-detail-style='builder'] .configurator .order__container > .block-price,
html[data-st-product-detail-style='builder'] .configurator .btns-order {
	display: none !important;
}

/* One voice for the five titles. The configurator styles them three different
   ways (a step heading, a table label, an option title); kit's mono is the one
   the step headings already wear. */
html[data-st-product-detail-style='builder'] .configurator .st-builder__step-title {
	margin: 0 !important;
	font-family: var(--st-kit-mono) !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.02em !important;
	text-transform: none !important;
	color: var(--wp--preset--color--ti-fg, currentColor) !important;
}

/* The configurator's two minimum warnings show only while they explain a
   blocked button: pieces entered and Add to cart still off
   (`.st-builder--short`, set by assets/st-product-builder.js). Before the first
   piece they say nothing, and once the order qualifies they are noise. */
html[data-st-product-detail-style='builder'] .summary:not(.st-builder--short) .configurator .block-popup--bottom {
	display: none !important;
}

/* ── The one total, after the steps ──────────────────────────────────────── */
html[data-st-product-detail-style='builder'] .st-builder__total {
	display: flex;
	flex-direction: column;
	row-gap: 12px;
	padding: 24px;
	border: 1px solid var(--wp--preset--color--ti-fg, currentColor);
}

/* price 1 · pieces 2 · break 3 (kit's order) · button 5 · delivery last, small */
html[data-st-product-detail-style='builder'] .st-kit__cta .st-builder__break { order: 3; }
html[data-st-product-detail-style='builder'] .st-kit__cta .productInfoHeader__delivery { order: 6; }

html[data-st-product-detail-style='builder'] .st-builder__break {
	display: flex;
	flex-direction: column;
	row-gap: 6px;
	margin-block-start: 4px;
}

html[data-st-product-detail-style='builder'] .st-builder__bar {
	block-size: 6px;
	background: var(--st-kit-rule);
}

html[data-st-product-detail-style='builder'] .st-builder__bar > span {
	display: block;
	block-size: 100%;
	inline-size: 0;
	background: var(--wp--preset--color--ti-fg, currentColor);
	transition: inline-size 0.3s ease;
}

html[data-st-product-detail-style='builder'] .st-builder__break-text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.4;
}

html[data-st-product-detail-style='builder'] .st-builder__breaks {
	align-self: flex-start;
	min-block-size: 24px;
	padding: 0;
	font: inherit;
	font-size: 0.8125rem;
	color: inherit;
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	html[data-st-product-detail-style='builder'] .st-builder__bar > span {
		transition: none;
	}
}

/* Rush is chosen at checkout (Diego, 2026-10-05), so the configurator's static
   "Rush available" label has nothing to do on this page. */
html[data-st-product-detail-style='builder'] .st-kit__cta .productInfoHeader__rush {
	display: none !important;
}

/* Below the minimum the configurator leaves its button without `.active`; say
   so with the button instead of letting it look pressable. */
html[data-st-product-detail-style='builder'] .st-kit__cta .productInfoHeader__add_to_cart:not(.active) {
	color: var(--wp--preset--color--ti-fg, currentColor);
	background: transparent;
	border-style: dashed;
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

/* ── Swatches instead of the dropdown and its List / Dropdown switch ───────── */
html[data-st-product-detail-style='builder'] .configurator .choose-colors .dropdown--colors,
html[data-st-product-detail-style='builder'] .configurator .flex.items-center.gap-2:has(> .segmentedControl__wrapper) {
	display: none !important;
}

html[data-st-product-detail-style='builder'] .st-builder__hint,
html[data-st-product-detail-style='builder'] .st-builder__blank {
	margin: 0 0 10px;
	font-family: var(--st-kit-mono);
	font-size: 0.75rem;
	line-height: 1.5;
}

html[data-st-product-detail-style='builder'] .st-builder__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-block-end: 16px;
}

html[data-st-product-detail-style='builder'] .st-builder__swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 44px;
	block-size: 44px;
	padding: 0;
	background: transparent;
	border: 2px solid transparent;
	border-radius: 50%;
	cursor: pointer;
}

html[data-st-product-detail-style='builder'] .st-builder__swatch[aria-pressed='true'] {
	border-color: var(--wp--preset--color--ti-fg, currentColor);
}

html[data-st-product-detail-style='builder'] .st-builder__swatch:focus-visible {
	outline: 2px solid var(--wp--preset--color--ti-fg, currentColor);
	outline-offset: 2px;
}

html[data-st-product-detail-style='builder'] .st-builder__dot {
	display: block;
	inline-size: 32px;
	block-size: 32px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px var(--st-kit-rule);
}

/* ── The print step starts empty ────────────────────────────────────────── */
html[data-st-product-detail-style='builder'] .st-builder__blank {
	display: none;
}

html[data-st-product-detail-style='builder'] .summary.st-builder--blank .st-builder__blank {
	display: block;
}
