/*
 * "Code de parrainage" field (amendment R12). It reuses WooCommerce's coupon-form
 * classes, so its layout and look come from WooCommerce and the theme. This file
 * only hides the native "Ajouter des codes promo" panel, and only once the field
 * has mounted: the body class is set by the field itself, so a script failure
 * leaves the native panel in place.
 */
body.leventis-has-referral-field .wp-block-woocommerce-cart-order-summary-coupon-form-block,
body.leventis-has-referral-field .wp-block-woocommerce-checkout-order-summary-coupon-form-block {
	display: none;
}

/*
 * Alignment with the summary rows ("Sous-total", "Livraison"). WooCommerce gives
 * whatever sits in this slot `padding: 16px 0` (.slot-wrapper > * > *), which
 * wins over its own 16px side padding for checkout-sidebar rows. Restore it under
 * the same condition WooCommerce applies it (two-column checkout), so the field
 * lines up with the rows on desktop and mobile alike. The cart's rows have no side
 * padding, so the cart is left as is.
 */
@container (min-width: 700px) {
	.wc-block-checkout__sidebar .wc-block-components-totals-wrapper.slot-wrapper .leventis-referral {
		padding-left: 16px;
		padding-right: 16px;
	}
}
