/**
 * Module: Mini Cart UI Tweaks
 * -----------------------------------------------------------------------------
 * Contains utility classes to modify the Mini Cart appearance without
 * changing global defaults.
 */

/* 
 * Class: .is-shipping-text-hidden
 * Target: Mini-Cart Footer Block
 * Effect: Hides the "Shipping and discounts calculated at checkout" text.
 * 
 * Why:
 * The default WC block forces this text. This class allows granular control
 * per instance (e.g., hide it in the header, keep it elsewhere).
 */
.is-shipping-text-hidden .wc-block-components-totals-item__description {
    display: none !important;
}

/* 
 * Optional: Fix spacing if hiding the text leaves too much gap.
 * We remove the bottom margin of the subtotal container if the text is hidden.
 */
.is-shipping-text-hidden .wc-block-components-totals-item {
    margin-bottom: 0;
}


/* ==========================================================================
   MINI CART NOTICES (KILL SNAP & VISUAL CLUTTER)
   ========================================================================== */

/* 
 * 1. Hide the notice wrapper and banners inside the mini-cart.
 * WHY: WooCommerce natively calls .focus() on these notices when quantity changes 
 * or items are added. This causes a jarring page snap. By setting them to 
 * display: none, we prevent the focus event from scrolling the page and clean up the UI.
 */
.wp-block-woocommerce-mini-cart-contents .wc-block-components-notices,
.wp-block-woocommerce-mini-cart-contents .wc-block-components-notice-banner,
.wc-block-mini-cart .wc-block-components-notices,
.wc-block-mini-cart .wc-block-components-notice-banner {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}




/* ==========================================================================
   ANTI-SPAM: LOCK TRASH BUTTONS DURING REMOVAL
   ========================================================================== */

/* 
 * When our JS adds this class OR when WooCommerce natively adds .is-loading,
 * we lock down all remove buttons so they cannot be clicked again.
 */
.vortex-cart-is-processing .wc-block-cart-item__remove-link,
.wc-block-mini-cart.is-loading .wc-block-cart-item__remove-link {
    pointer-events: none !important;
    opacity: 0.3 !important;
    filter: grayscale(100%) !important;
    cursor: not-allowed !important;
    background-color: var(--wp--preset--color--custom-gris-resaltado) !important;
}