/* Native cart/checkout table rows retain their normal spacing and typography. */
:is(.cart_totals table, table.woocommerce-checkout-review-order-table)
:is(.ess-pb-package-savings, .ess-pb-sale-savings, .ess-pb-total-savings, .ess-pb-savings-rounding) > th {
    font-family: inherit;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}
:is(.cart_totals table, table.woocommerce-checkout-review-order-table)
:is(.ess-pb-package-savings, .ess-pb-sale-savings, .ess-pb-total-savings, .ess-pb-savings-rounding) > td {
    font-family: inherit;
    font-size: inherit;
    line-height: 1.45;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
:is(.cart_totals table, table.woocommerce-checkout-review-order-table)
:is(.ess-pb-package-savings, .ess-pb-sale-savings, .ess-pb-total-savings) .amount {
    color: var(--primary_color, var(--awb-color4, #488122));
}
:is(.cart_totals table, table.woocommerce-checkout-review-order-table)
.ess-pb-total-savings > :is(th, td) {
    font-weight: 600;
}
/* Override Avada's native cell padding for this row only. */
.woocommerce-cart .cart_totals .ess-pb-package-savings {
    --awb-cell-padding-top: 0px;
}

/* Keep the native subtotal available whenever the savings extension is absent. */
.wp-block-woocommerce-checkout-order-summary-totals-block:has(.ess-pb-block-savings-subtotal)
> .wp-block-woocommerce-checkout-order-summary-subtotal-block {
    display: none;
}
:is(.ess-pb-block-savings-subtotal, .ess-pb-block-savings-meta)
.wc-block-components-totals-item__label {
    white-space: normal;
    overflow-wrap: anywhere;
}
:is(.ess-pb-block-savings-subtotal, .ess-pb-block-savings-meta)
.wc-block-components-totals-item__value {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
:is(.ess-pb-block-package-savings, .ess-pb-block-sale-savings, .ess-pb-block-total-savings)
.wc-block-components-totals-item__value {
    color: var(--primary_color, var(--awb-color4, #488122));
}
.ess-pb-block-total-savings {
    font-weight: 600;
}
.ess-pb-block-savings-subtotal .wc-block-components-totals-item + .wc-block-components-totals-item {
    margin-top: 8px;
}

/* Package context and system actions belong in the cart, not checkout. */
.wp-block-woocommerce-checkout :is(
    .wc-block-components-product-details__equipment-package,
    .wc-block-components-product-details__system-options
) {
    display: none;
}
