/**
 * PO Availability — cart / checkout delivery line styling.
 *
 * The line is injected as a `<span class="ch-po-delivery">` inside the cart
 * item's `item_data` value (block + classic cart/checkout + mini-cart). We
 * style it as a subtle info pill, and — only on rows where our line actually
 * shows — hide WooCommerce's own "Available on backorder" badge so the two
 * don't duplicate. `:has()` scopes the hide to the right line; a backorder
 * line WITHOUT a resolved date keeps WC's native badge.
 */

.ch-po-delivery {
	display: inline-block;
	padding: 0.15em 0.55em;
	border-radius: 0.3em;
	background: var( --ch-po-cart-bg, #eaf3ff );
	color: var( --ch-po-cart-color, inherit );
	font-size: 0.95em;
	line-height: 1.45;
}

:where(
	.wc-block-cart-items__row,
	.wc-block-components-order-summary-item,
	.wc-block-cart-item,
	.wc-block-mini-cart-item,
	.woocommerce-cart-form__cart-item,
	.cart_item
):has( .ch-po-delivery )
	:where(
		.wc-block-components-product-backorder-badge,
		.backorder_notification
	) {
	display: none !important;
}
