/**
 * Mobile Cart Hide CSS (Minified)
 * Hides floating mini-cart on mobile devices while preserving header cart icons
 * Also fixes mini-cart drawer bottom buttons visibility on mobile
 */

/* Hide floating cart menu on mobile devices (but NOT header cart icons) */
@media (max-width: 768px) {
    /* Target only the specific floating cart menu with ID */
    #rtsb-cart-float-menu {
        display: none !important;
    }
    
    /* Hide standalone floating cart elements that are NOT in header */
    .rtsb-cart-float-menu:not(.mobile-header-icons .rtsb-cart-float-menu):not([class*="header"]):not([class*="item-icon"]) {
        display: none !important;
    }
    
    /* Hide cart float button if it exists */
    .rtsb-cart-float-btn {
        display: none !important;
    }
    
    /* Hide floating cart that appears as overlay/popup */
    .rtsb-cart-float-wrapper,
    .cart-float-wrapper {
        display: none !important;
    }
}

/* Ensure header cart icon remains visible on mobile */
@media (max-width: 768px) {
    /* Force show header cart icons - override any inline styles */
    .mobile-header-icons,
    .header-cart-icon,
    .cart-icon,
    .minicart-icon,
    .woocommerce-cart-link,
    .item-icon.rt-cart-float-inner.rtsb-cart-float-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Specifically target the header cart container */
    .mobile-header-icons {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    /* Ensure individual header icons are visible */
    .mobile-header-icons .item-icon {
        display: block !important;
        visibility: visible !important;
    }
}

/* Fix mini-cart drawer bottom buttons visibility on mobile */
@media (max-width: 768px) {
    .rtsb-drawer-container.rtsb-minicart-drawer {
        /* Allow the drawer to function normally when opened */
        display: block;
        /* Add padding to prevent buttons from being hidden by browser navigation */
        padding-bottom: 100px !important;
    }
    
    /* Ensure the bottom section has proper spacing */
    .rtsb-drawer-container .mini-cart-bottom {
        padding-bottom: 60px !important;
    }
    
    /* Make sure checkout/cart buttons are always visible */
    .rtsb-drawer-container .woocommerce-mini-cart__buttons {
        padding: 15px 0 40px 0 !important;
        margin-bottom: 20px !important;
    }
    
    /* Add safe area for devices with home indicator (iPhone X+) */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .rtsb-drawer-container.rtsb-minicart-drawer {
            padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
        }
    }
    
    /* Ensure drawer buttons don't get cut off by mobile browser UI */
    .rtsb-drawer-container .cart-drawer-footer,
    .rtsb-drawer-container .mini-cart-footer {
        padding-bottom: 40px !important;
        margin-bottom: 20px !important;
    }
}

#wp-admin-bar-stats,
#wp-admin-bar-villatheme,
#wp-admin-bar-woocommerce-site-visibility-badge,
#wp-admin-bar-updates,
#wp-admin-bar-comments,
#wp-admin-bar-new-content,
#wp-admin-bar-shop_builder,
#wp-admin-bar-notes,
#wp-admin-bar-search {
    display: none !important;
}