/* Display only for calculated partner discounts. Test-lock rules require owned admin tests. */
.woocommerce-cart-form .pst-cart-breakdown,
.woocommerce-checkout-review-order-table .pst-cart-breakdown {
    box-sizing: border-box; max-width: 27rem; margin: .7rem 0 0;
    padding: .4rem 0 .1rem .8rem; border-left: 3px solid #00adad;
    color: #333; font-size: .84em; line-height: 1.45; font-weight: 400; text-align: left;
}
.pst-cart-breakdown .pst-cart-breakdown-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: .8rem; margin-bottom: .4rem;
}
.pst-cart-breakdown-row > span:first-child { min-width: 0; overflow-wrap: break-word; }
.pst-cart-breakdown .pst-cart-breakdown-amount { white-space: nowrap; font-weight: 600; }
.pst-cart-breakdown-caption, .pst-cart-breakdown-note { display: block; color: #595959; font-size: .94em; }
.pst-cart-breakdown-caption { margin: 0 0 .4rem; }
.pst-cart-breakdown-team { color: #222; }
.pst-cart-price-after { display: block; line-height: 1.4; color: #222; white-space: normal; }
.pst-cart-price-after strong { font-weight: 700; font-size: 1.12em; white-space: nowrap; }
.pst-cart-price-caption { display: block; margin-top: .25rem; color: #595959; font-size: .78em; font-weight: 400; }
.cart_totals .pst-cart-subtotal-note, .cart_totals .pst-cart-coupon-code,
.woocommerce-checkout-review-order-table .pst-cart-subtotal-note,
.woocommerce-checkout-review-order-table .pst-cart-coupon-code {
    display: block; margin-top: .45rem; font-size: .78em; font-weight: 400; line-height: 1.45; color: #595959;
}
.cart_totals .pst-cart-coupon-code,
.woocommerce-checkout-review-order-table .pst-cart-coupon-code { overflow-wrap: anywhere; word-break: normal; }
.cart_totals .pst-cart-savings th, .cart_totals .pst-cart-savings td,
.woocommerce-checkout-review-order-table .pst-cart-savings th,
.woocommerce-checkout-review-order-table .pst-cart-savings td {
    border-top: 2px solid #00adad; background: #f4fafa;
}
.cart_totals .pst-cart-savings small,
.woocommerce-checkout-review-order-table .pst-cart-savings small { display: block; margin-top: .4rem; font-size: .78em; line-height: 1.45; color: #595959; }
.pst-cart-test-locked .cart_totals tr.cart-discount th { hyphens: auto; overflow-wrap: break-word; }
.pst-cart-pickup-note { margin: .7rem 0 .2rem; font-size: .9em; line-height: 1.5; }
.pst-cart-pickup-heading, .pst-cart-pickup-address { display: block; }
.pst-cart-pickup-heading { font-weight: 600; margin-bottom: .2rem; }
.pst-cart-pickup-note small { display: block; color: #595959; margin-top: .35rem; font-size: .88em; }
.pst-cart-pickup-note[hidden] { display: none !important; }
/* Shipping values and address controls stay in the DOM. Delivery restores them unchanged. */
.pst-cart-test-locked .pst-cart-pickup-selected .woocommerce-shipping-destination,
.pst-cart-test-locked .pst-cart-pickup-selected .woocommerce-shipping-calculator { display: none !important; }
@supports selector(:has(*)) {
    .pst-cart-test-locked .woocommerce-shipping-totals:has(.pst-cart-pickup-note[data-pst-selected="1"]) .woocommerce-shipping-destination,
    .pst-cart-test-locked .woocommerce-shipping-totals:has(.pst-cart-pickup-note[data-pst-selected="1"]) .woocommerce-shipping-calculator { display: none !important; }
    .cart_totals:has([data-pst-test-lock="1"]) .wc-proceed-to-checkout { display: none !important; }
}
/* Defence in depth for late-injected express widgets. NOT a replacement for order guards. */
.pst-cart-test-locked .wc-proceed-to-checkout,
.pst-cart-test-locked .widget_shopping_cart .checkout,
.pst-cart-test-locked .cart_totals .checkout-button,
.pst-cart-test-locked #wc-stripe-express-checkout-element,
.pst-cart-test-locked #wc-stripe-express-checkout-button-separator,
.pst-cart-test-locked #wc-stripe-payment-request-wrapper,
.pst-cart-test-locked #wc-stripe-payment-request-button-separator { display: none !important; }
.pst-cart-test-blocked { border: 1px solid #00adad; background: #f4fafa; padding: 1rem; margin: 1.1rem 0 0; text-align: left; font-size: .9em; line-height: 1.5; }
.pst-cart-test-blocked strong { display: block; color: #222; }
.pst-cart-test-blocked p { margin: .35rem 0 .6rem; }
.pst-cart-test-blocked .pst-cart-test-manage { text-decoration: underline; color: #006f6f; font-weight: 600; }
@media (max-width: 767px) {
    .woocommerce-cart-form .pst-cart-breakdown,
    .woocommerce-checkout-review-order-table .pst-cart-breakdown { max-width: 100%; margin-top: .6rem; padding-left: .65rem; }
    .pst-cart-breakdown-row { flex-wrap: wrap; }
    .pst-cart-breakdown-amount { margin-left: auto; }
    .pst-cart-price-caption { font-size: .8em; }
    .pst-cart-savings small, .pst-cart-subtotal-note, .pst-cart-coupon-code { text-align: inherit; }
    .pst-cart-pickup-note { text-align: left; clear: both; padding-top: .25rem; }
}

/* Only the enhanced checkout review gets wider labels; ordinary checkouts stay native. */
@supports selector(:has(*)) {
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) { table-layout: fixed; }
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) .product-name { width: 68%; }
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) .product-total { width: 32%; }
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) th,
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) td { overflow-wrap: anywhere; }
}
.woocommerce-checkout-review-order-table .pst-cart-breakdown { max-width: 100%; white-space: normal; }
.woocommerce-checkout-review-order-table .pst-cart-breakdown-row { flex-wrap: nowrap; }
.woocommerce-checkout-review-order-table .pst-cart-breakdown-row > span:first-child { overflow-wrap: anywhere; }
.woocommerce-checkout-review-order-table .pst-cart-price-caption { hyphens: auto; overflow-wrap: anywhere; }
.woocommerce-checkout-review-order-table .pst-cart-price-after strong { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 359px) {
    @supports selector(:has(*)) {
        .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) .product-name { width: 60%; }
        .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) .product-total { width: 40%; }
    }
    .woocommerce-checkout-review-order-table .pst-cart-breakdown-row { display: grid; gap: .15rem; }
    .woocommerce-checkout-review-order-table .pst-cart-breakdown-amount { justify-self: end; }
}

/* Match the actual Storefront cell spacing: preserve complete monetary values. */
@supports selector(:has(*)) {
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) thead th.product-total,
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) tbody td.product-total,
    .woocommerce-checkout-review-order-table:has(.pst-cart-price-after) tfoot td { padding-left: .5em; padding-right: .5em; }
}
.woocommerce-checkout-review-order-table .pst-cart-price-after strong { font-size: 1em; white-space: nowrap; }
