/**
 * PH Deposits — Block Cart & Checkout integration styles.
 *
 * Hides the native (full-price) money amount inside a deposit line item's
 * price column, since the subtotalPriceFormat checkout filter (see
 * ph-deposits-blocks.js) replaces that text with the deposit-specific
 * amount/schedule. Scoped to `.ph-deposit-item` — a class the same script
 * adds via the cartItemClass filter only to cart items that are deposits —
 * so regular (non-deposit) items and the row's own "Total" column
 * (`.wc-block-cart-item__total`, a separate container) are never affected.
 */
.ph-deposit-item .wc-block-cart-item__prices .wc-block-components-product-price__value {
	display: none;
}

/**
 * Hides the native cart/checkout order-summary "Total"/"Estimated total" row's
 * money amount, which is always bound to WC()->cart->total — the deposit-reduced
 * amount (the same figure "Due Today" shows) — since there is no way to make
 * that native figure show the real full order total instead (see the totalValue
 * filter docblock in ph-deposits-blocks.js). The totalValue/totalLabel filters
 * replace it with the real total as plain text.
 *
 * Scoped to `body.ph-has-deposits`, a class the same script toggles only while
 * the current cart/checkout actually contains deposit items, so carts with no
 * deposits keep the native Total row untouched.
 */
body.ph-has-deposits .wc-block-components-totals-footer-item .wc-block-components-totals-footer-item-tax-value {
	display: none;
}

/**
 * Swaps which row looks like the "amount you're paying": WooCommerce Blocks
 * normally gives the Total row large/bold styling, but with a deposit that
 * reads as if the full order total were due now. Due Today is what's actually
 * charged at checkout, so it gets that emphasis instead, and Total (now a
 * supporting detail, like Subtotal/VAT/Shipping) is styled like the other
 * regular rows.
 */
body.ph-has-deposits .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.ph-has-deposits .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 1em;
	font-weight: 400;
}

body.ph-has-deposits .ph-due-today-row .wc-block-components-totals-item__label,
body.ph-has-deposits .ph-due-today-row .wc-block-components-totals-item__value {
	font-size: var( --wp--preset--font-size--medium, 1.25em );
	font-weight: 500;
}

/**
 * Due Today, the optional deferred-discount row, and Future Payments all sit
 * in one bare wrapper (the ExperimentalOrderMeta slot), unlike native rows
 * (Subtotal/Shipping/VAT/Total) which are each their own separately-spaced
 * block. Without this, they read as one cramped block instead of separate
 * rows. Only rows after the first get the divider, matching how a border only
 * appears *between* the native rows, not above the first one.
 */
.ph-deposits-blocks-totals .ph-deposits-block-row + .ph-deposits-block-row {
	border-top: 1px solid color-mix( in srgb, currentColor 20%, transparent );
	margin-top: 8px;
	padding-top: 8px;
}
