/**
 * sb-cart.css — Smart Bundle Builder
 * Loaded on cart, checkout, order-received, and my-account pages.
 * Styles the bundle contents toggle and item list in the cart table.
 */

/* ── Cart bundle wrapper ── */
.sb-cart-bundle {
	margin-top : 6px;
}

/* ── Toggle button ── */
.sb-cart-toggle {
	display         : inline-flex !important;
	align-items     : center !important;
	gap             : 4px !important;
	background      : none !important;
	border          : 1px solid #d1d5db !important;
	border-radius   : 4px !important;
	padding         : 3px 8px !important;
	font-size       : 12px !important;
	font-weight     : 500 !important;
	color           : #374151 !important;
	cursor          : pointer !important;
	text-decoration : none !important;
	box-shadow      : none !important;
	line-height     : 1.4 !important;
	transition      : background 0.15s, color 0.15s !important;
}
.sb-cart-toggle:hover {
	background : #f3f4f6 !important;
	color      : #111827 !important;
}
.sb-cart-toggle[aria-expanded="true"] {
	background : #eff6ff !important;
	border-color: #93c5fd !important;
	color      : #1d4ed8 !important;
}

/* ── Bundle items list ── */
.sb-cart-bundle-items {
	list-style    : none !important;
	padding       : 8px 0 4px 0 !important;
	margin        : 6px 0 0 !important;
	border-top    : 1px dashed #e5e7eb;
	display       : block; /* open by default */
}

.sb-cart-bundle-item {
	display     : flex !important;
	flex-wrap   : wrap !important;
	align-items : baseline !important;
	gap         : 5px !important;
	padding     : 4px 0 !important;
	font-size   : 13px !important;
	color       : #374151 !important;
	border-bottom: 1px solid #f3f4f6;
	line-height : 1.4;
}

.sb-cart-bundle-item:last-child {
	border-bottom : none;
}

.sb-item-qty {
	font-weight  : 700 !important;
	color        : #2271b1 !important;
	flex-shrink  : 0 !important;
	min-width    : 24px;
}

.sb-item-name {
	font-weight : 500 !important;
	color       : #111827 !important;
}

.sb-item-attrs {
	font-size   : 12px !important;
	color       : #6b7280 !important;
}

.sb-item-attrs strong {
	color       : #374151;
	font-weight : 600;
}

.sb-item-attr-label {
	color       : #9ca3af;
	font-size   : 12px;
}

.sb-toggle-arrow {
	font-size   : 10px;
	margin-left : 3px;
}

/* ── Mini-cart (widget) ── */
.widget_shopping_cart .sb-cart-bundle {
	margin-top : 4px;
}
.widget_shopping_cart .sb-cart-toggle {
	font-size  : 11px !important;
	padding    : 2px 6px !important;
}
.widget_shopping_cart .sb-cart-bundle-item {
	font-size  : 11px !important;
	padding    : 2px 0 !important;
}

/* ── Order received / My account ── */
.woocommerce-order-details .sb-cart-bundle,
.woocommerce-table--order-details .sb-cart-bundle {
	margin-top : 6px;
}

/* Show bundle items expanded by default on order pages (no toggle needed) */
.woocommerce-order-details .sb-cart-bundle-items,
.woocommerce-table--order-details .sb-cart-bundle-items {
	display : block !important;
}
.woocommerce-order-details .sb-cart-toggle,
.woocommerce-table--order-details .sb-cart-toggle {
	display : none !important;
}

/* ── Re-select notice for old cart items ── */
.sb-cart-reselect {
	font-size   : 12px;
	color       : #92400e;
	background  : #fef3c7;
	border      : 1px solid #fde68a;
	border-radius: 4px;
	padding     : 4px 8px;
	margin      : 4px 0 0;
}
