/**
 * Cart/checkout styling for box relations.
 *
 * @package BoxKonfigurator
 */

.wbc-cart-box-label {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	padding: 2px 7px;
	border-radius: 6px;
	background: #b5341d;
	color: #fff;
	vertical-align: middle;
	margin-right: 4px;
}

.wbc-cart-qty {
	display: inline-block;
	min-width: 28px;
	text-align: center;
	font-weight: 600;
}

/* Indent box content rows slightly for visual grouping. */
.woocommerce-cart-form .cart_item td.product-name .variation .wbc-box-content,
.wbc-box-content {
	color: #6b7280;
	font-size: 0.85rem;
}

/* Box-fill indicator (cart + mini-cart) — flexible so it fits any width. */
.wbc-cart-fill {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 220px;
	margin-top: 4px;
}

.wbc-cart-fill__track {
	flex: 1 1 auto;
	min-width: 48px;
	height: 8px;
	background: #ecedf0;
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.wbc-cart-fill__bar {
	display: block;
	height: 100%;
	min-width: 4px;
	border-radius: 999px;
	background: #b5341d;
	transition: width 0.3s ease;
}

.wbc-cart-fill__txt {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 0.82em;
	color: #1f2329;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* Tidy the meta label/value rows that carry our box info inside the mini-cart. */
.widget_shopping_cart_content .variation,
.woocommerce-mini-cart .variation,
.elementor-menu-cart .variation {
	margin: 4px 0 0;
	font-size: 0.8em;
	line-height: 1.4;
	overflow: hidden;
}

.widget_shopping_cart_content .variation dt,
.woocommerce-mini-cart .variation dt,
.elementor-menu-cart .variation dt {
	font-weight: 600;
	margin: 0;
	color: #6b7280;
}

.widget_shopping_cart_content .variation dd,
.woocommerce-mini-cart .variation dd,
.elementor-menu-cart .variation dd {
	margin: 0 0 3px;
}

/* Box-fill row: stack the bar UNDER its label so it never runs off-screen in
   the narrow mini-cart. Targets any dl/dt/dd that holds the bar — independent
   of theme markup — and overrides the theme's inline float. */
dl:has( .wbc-cart-fill ) {
	display: block !important;
	margin: 4px 0 0 !important;
}

dt:has( + dd .wbc-cart-fill ) {
	display: block !important;
	float: none !important;
	clear: none !important;
	width: 100% !important;
	margin: 0 0 4px !important;
}

dd:has( .wbc-cart-fill ) {
	display: block !important;
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

dd:has( .wbc-cart-fill ) .wbc-cart-fill {
	max-width: 100%;
	margin-top: 0;
}
