/* Configurator buy flow (bt-commerce/cfg.js). Tokens come from the design system (:root:root) with literal fallbacks. */
.bt-cfgbar {
	margin-top: 28px;
	padding: 24px;
	border: 1px solid var(--bt-border, #e3e0da);
	border-radius: var(--bt-radius-md, 8px);
	background: var(--bt-surface-soft, #f1efea);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
	gap: 24px 32px;
	align-items: start;
}
.bt-cfgbar h4 { margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--bt-text, #17191d); }
.bt-cfgbar-list { margin: 0; display: grid; gap: 8px; }
.bt-cfgbar-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; font-size: 14px; line-height: 1.45; }
.bt-cfgbar-row dt { margin: 0; color: var(--bt-text-muted, #6f737c); font-weight: 500; }
.bt-cfgbar-row dd { margin: 0; color: var(--bt-text, #17191d); font-weight: 500; }
.bt-cfgbar-empty { margin: 0; font-size: 14px; color: var(--bt-text-secondary, #4b4f58); }
.bt-cfgbar-missing { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--bt-warning, #9a5b00); min-height: 0; }
.bt-cfgbar-missing:empty { display: none; }
.bt-cfgbar-buy { display: grid; gap: 14px; }
.bt-cfgbar-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--bt-border, #e3e0da); }
.bt-cfgbar-total span { font-size: 14px; color: var(--bt-text-secondary, #4b4f58); }
.bt-cfgbar-total strong { font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--bt-text, #17191d); font-variant-numeric: tabular-nums; }
.bt-cfgbar-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; color: var(--bt-text-secondary, #4b4f58); }
.bt-cfgbar-qty input { width: 88px; height: 44px; padding: 0 12px; text-align: center; border: 1px solid var(--bt-border-strong, #c4c0b8); border-radius: var(--bt-radius-sm, 4px); background: var(--bt-surface, #fff); font-size: 16px; }
.bt-cfgbar-cta { width: 100%; min-height: 56px; margin: 0; }
.bt-cfgbar[data-state="incomplete"] .bt-cfgbar-cta,
.bt-cfgbar[data-state="needs-variation"] .bt-cfgbar-cta {
	background: var(--bt-surface, #fff) !important;
	color: var(--bt-text, #17191d) !important;
	border: 1px solid var(--bt-border-strong, #c4c0b8) !important;
	box-shadow: none !important;
}
.bt-cfgbar[data-state="adding"] .bt-cfgbar-cta { opacity: .7; pointer-events: none; }
.bt-cfgbar[data-state="added"] .bt-cfgbar-cta { background: var(--bt-success, #1b7a4b) !important; border-color: var(--bt-success, #1b7a4b) !important; }
.bt-cfgbar-msg { grid-column: 1 / -1; margin: 0; min-height: 0; font-size: 13px; color: var(--bt-warning, #9a5b00); }
.bt-cfgbar-msg:empty { display: none; }

/* the field the customer still has to fill */
.bt-cfg-missing { outline: 2px solid var(--bt-warning-dot, #d98e04); outline-offset: 6px; border-radius: var(--bt-radius-sm, 4px); }

/* CONFIG_REQUIRED: the real purchase button is only used through the end bar; the top shows the proxy */
body.bt-cfg-req form.cart .single_add_to_cart_button { display: none !important; }
.bt-cfg-proxy { min-height: 56px; flex: 1 1 auto; }
form.cart:has(.bt-cfg-proxy) { align-items: stretch; }
.bt-cfg-toplink { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--bt-brand, #1f2d4d); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 767px) {
	.bt-cfgbar { grid-template-columns: 1fr; padding: 16px; gap: 16px; margin-top: 20px; }
	.bt-cfgbar-row { grid-template-columns: 1fr; gap: 2px; }
	.bt-cfgbar-total strong { font-size: 24px; }
	.bt-cfgbar-cta { min-height: 56px; }
}

/* specificity against the design-system / theme defaults */
body .bt-cfgbar .bt-cfgbar-missing { font-size: 13px; line-height: 1.45; font-weight: 500; color: var(--bt-warning, #9a5b00); }
body .bt-cfgbar .bt-cfgbar-msg { font-size: 13px; color: var(--bt-warning, #9a5b00); }
body.bt-cfg-req form.cart .bt-cfg-proxy { min-height: 56px !important; height: 56px; }
body.bt-cfg-req form.cart .quantity, body.bt-cfg-req form.cart .quantity input { min-height: 56px; }

/* ---- phones: compact sticky buy bar (mirrors the real summary bar; see cfg.js stickySync) ---- */
.bt-cfgsticky { display: none; }
@media (max-width: 767px) {
	.bt-cfgsticky:not([hidden]) {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: flex; align-items: center; gap: 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bt-surface, #fff); border-top: 1px solid var(--bt-border, #e4e1da);
		box-shadow: 0 -4px 16px rgba(23, 25, 29, .08);
	}
	.bt-cfgsticky-total { flex: 0 0 auto; font-size: 17px; font-weight: 600; color: var(--bt-text, #17191d); font-variant-numeric: tabular-nums; white-space: nowrap; }
	.bt-cfgsticky-total:empty { display: none; }
	.bt-cfgsticky-cta { flex: 1 1 auto; min-height: 48px; margin: 0; padding: 0 16px; border-radius: var(--bt-radius-sm, 4px); font-size: 15px; font-weight: 600; }
	.bt-cfgsticky[data-state="incomplete"] .bt-cfgsticky-cta, .bt-cfgsticky[data-state="needs-variation"] .bt-cfgsticky-cta { background: var(--bt-surface, #fff) !important; color: var(--bt-text, #17191d) !important; border: 1px solid var(--bt-text, #17191d) !important; }
	html.bt-cfg-sticky-on #bt-whatsapp-float, html.bt-cfg-sticky-on .back-top { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
	body.single-product.bt-cfg-sticky-pad { padding-bottom: 76px; }
}
/* the sticky buy bar must never sit on top of an open drawer (cart / menu / filter): it would cover the drawer's own buttons and offer a second "add" */
html.bt-drawer-open .bt-cfgsticky { display: none !important; }
