/**
 * Visual hierarchy for NudgeSells add-on line items on the WooCommerce
 * cart and checkout pages. WooCommerce renders every cart item as an
 * independent table row with no native nesting, so this styles each
 * add-on row to read as "belonging to" the host product immediately
 * above it, rather than as an unrelated separate purchase -- just the
 * arrow indent, no cell padding. Upgrades are deliberately excluded --
 * they render as regular cart items, with no special styling at all.
 */

/* These two spans are inserted into WooCommerce's own cart/checkout
   templates (item name, item totals), so - unlike the widget above -
   there's no "nudgesells-upsell-wrap" ancestor to root the selector on.
   Specificity is instead raised by qualifying the element tag and
   doubling the class itself, which is enough to beat the generic
   `span`/text styling most themes apply to cart rows without needing
   `!important`. */
span.nudgesells-cart-item-indent.nudgesells-cart-item-indent {
	display: inline-block;
	margin-inline-end: 6px;
	color: var( --nudgesells-accent, #1E5F46 );
	font-weight: 700;
}

span.nudgesells-cart-savings-note.nudgesells-cart-savings-note {
	font-weight: 600;
	color: var( --nudgesells-success, #2a7d2a );
}

/* Cart messages: "Add 1 more to get a free …" under the item's name,
   in the cart and mini-cart (classic and block). The item data label
   ("NudgeSells") is hidden; only the message shows. */
dl.variation dt.variation-NudgeSells,
.wc-block-components-product-details__nudge-sells .wc-block-components-product-details__name,
.wc-block-components-product-details > span:has(.nudgesells-cart-tip) > .wc-block-components-product-details__name { display: none !important; }
dl.variation dd.variation-NudgeSells { margin: 0; float: none; clear: both; }
dl.variation dd.variation-NudgeSells p { margin: 0; }
.wc-block-components-product-details span.wc-block-components-product-details__nudge-sells { display: block; margin-top: 4px; }
/* The " / " WooCommerce puts between details doesn't lead into the message. */
.wc-block-components-product-details > span:has(+ .wc-block-components-product-details__nudge-sells) > span[aria-hidden="true"] { display: none; }
span.nudgesells-cart-tip.nudgesells-cart-tip {
	display: inline-block;
	font-size: 0.875em;
	font-weight: 600;
	line-height: 1.4;
	color: var( --nudgesells-discount-progress, #C56B25 );
}
