/* ===============================================
   POKESUBS WOOCOMMERCE CART WIDGET STYLING
   Dark theme matching site design - Updated
   =============================================== */

/* Only target cart drawer - remove global background overrides */

/* WooCommerce Cart Widget - App Drawer Styling */
.woocommerce-cart-widget,
.widget_shopping_cart,
.woocommerce.widget_shopping_cart,
.woocommerce-cart-widget .widget_shopping_cart,
.woocommerce-cart-widget .woocommerce.widget_shopping_cart {
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    border-radius: 0.75rem !important;
    color: #fff !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.08) !important;
}

/* Specific cart drawer styling - Target the exact selector */
#cart-drawer.popup-drawer .drawer-inner,
#cart-drawer .drawer-inner,
.popup-drawer .drawer-inner,
.cart-drawer .drawer-inner,
#cart-drawer,
.cart-drawer,
.popup-drawer {
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    border-radius: 0.75rem !important;
    color: #fff !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.08) !important;
}

/* Override CSS variables that might be setting light backgrounds */
#cart-drawer.popup-drawer .drawer-inner {
    --global-palette9: #000 !important;
}

/* Additional specificity to override theme variables */
.popup-drawer.active .drawer-inner,
.popup-drawer .drawer-inner {
    --global-palette9: #000 !important;
}

/* Override Kadence theme CSS variables specifically */
#cart-drawer.popup-drawer .drawer-inner,
.popup-drawer .drawer-inner,
.popup-drawer.active .drawer-inner {
    --global-palette9: #000 !important;
    --global-palette4: #fff !important;
    color: #fff !important;
}

/* Only override CSS variables for cart drawer elements */
#cart-drawer,
#cart-drawer.popup-drawer,
.popup-drawer {
    --global-palette9: #000 !important;
    --global-palette4: #fff !important;
}

/* Override any Kadence theme cart drawer styling */
.kadence-cart-drawer .drawer-inner,
.kadence-popup-drawer .drawer-inner,
#cart-drawer.kadence-cart-drawer .drawer-inner {
    --global-palette9: #000 !important;
    color: #fff !important;
}

/* Maximum specificity to override Kadence theme */
body #cart-drawer.popup-drawer .drawer-inner,
body .popup-drawer .drawer-inner,
body .popup-drawer.active .drawer-inner {
    --global-palette9: #000 !important;
    --global-palette4: #fff !important;
    color: #fff !important;
}

/* Override Kadence theme CSS with higher specificity */
html body #cart-drawer.popup-drawer .drawer-inner,
html body .popup-drawer .drawer-inner {
    --global-palette9: #000 !important;
    color: #fff !important;
}

/* Target the exact Kadence theme rule with maximum specificity */
#cart-drawer.popup-drawer .drawer-inner {
    max-width: 400px !important;
    color: #fff !important;
    --global-palette9: #000 !important;
    --global-palette4: #fff !important;
}

/* Even higher specificity to ensure override */
body #cart-drawer.popup-drawer .drawer-inner,
html body #cart-drawer.popup-drawer .drawer-inner {
    max-width: 400px !important;
    color: #fff !important;
    --global-palette9: #000 !important;
    --global-palette4: #fff !important;
}

/* Maximum specificity override for Kadence theme */
html body #cart-drawer.popup-drawer .drawer-inner {
    max-width: 400px !important;
    color: #fff !important;
    --global-palette9: #000 !important;
    --global-palette4: #fff !important;
}

/* Force override with attribute selector for maximum specificity */
#cart-drawer[class*="popup-drawer"] .drawer-inner {
    max-width: 400px !important;
    color: #fff !important;
    --global-palette9: #000 !important;
    --global-palette4: #fff !important;
}

/* Direct override of the exact Kadence rule - Force background to black */
#cart-drawer.popup-drawer .drawer-inner {
    color: #fff !important;
}

/* Even more specific override */
body #cart-drawer.popup-drawer .drawer-inner {
    color: #fff !important;
}

/* Maximum specificity override */
html body #cart-drawer.popup-drawer .drawer-inner {
    color: #fff !important;
}

/* Cart Widget Container - Additional selectors for comprehensive coverage */
.widget_shopping_cart,
.woocommerce.widget_shopping_cart,
.woocommerce-cart-widget .widget_shopping_cart,
.woocommerce-cart-widget .woocommerce.widget_shopping_cart,
.widget.woocommerce.widget_shopping_cart,
.widget.widget_shopping_cart {
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    border-radius: 0.75rem !important;
    color: #fff !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.08) !important;
    padding: 1.5rem !important;
}

/* Cart Widget Header - Comprehensive selectors */
.widget_shopping_cart h2,
.woocommerce.widget_shopping_cart h2,
.woocommerce-cart-widget h2,
.widget.woocommerce.widget_shopping_cart h2,
.widget.widget_shopping_cart h2 {
    color: #fff !important;
    background: linear-gradient(135deg, #fff 0%, #8b5cf6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
}

/* Cart Widget Content */
.widget_shopping_cart .woocommerce-mini-cart,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart {
    background: transparent !important;
    color: #fff !important;
}

/* Cart Item Styling */
.widget_shopping_cart .woocommerce-mini-cart-item,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(139, 92, 246, 0.1) !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin-bottom: 0.75rem !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    transition: all 0.3s ease !important;
}

.widget_shopping_cart .woocommerce-mini-cart-item:hover,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item:hover {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15) !important;
}

/* Cart Item Image */
.widget_shopping_cart .woocommerce-mini-cart-item img,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item img {
    border-radius: 0.375rem !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

/* Cart Item Title */
.widget_shopping_cart .woocommerce-mini-cart-item a,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item a {
    color: #fff !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.widget_shopping_cart .woocommerce-mini-cart-item a:hover,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item a:hover {
    color: #8b5cf6 !important;
}

/* Cart Item Quantity */
.widget_shopping_cart .woocommerce-mini-cart-item .quantity,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item .quantity {
    color: #8b5cf6 !important;
    font-weight: 600 !important;
}

/* Cart Item Price */
.widget_shopping_cart .woocommerce-mini-cart-item .amount,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item .amount {
    color: #f97316 !important;
    font-weight: 700 !important;
}

/* Cart Item Remove Link - Modern Design */
.widget_shopping_cart .woocommerce-mini-cart-item .remove,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item .remove {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.9)) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    padding: 0 !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
    line-height: 1 !important;
    text-align: center !important;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
}

.widget_shopping_cart .woocommerce-mini-cart-item .remove:hover,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart-item .remove:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 1)) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.15) rotate(90deg) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
}

/* Cart Subtotal */
.widget_shopping_cart .woocommerce-mini-cart__total,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__total {
    background: rgba(139, 92, 246, 0.1) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.widget_shopping_cart .woocommerce-mini-cart__total .amount,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__total .amount {
    color: #8b5cf6 !important;
    font-size: 1.125rem !important;
}

/* Cart Buttons */
.widget_shopping_cart .woocommerce-mini-cart__buttons,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
}

/* View Cart Button */
.widget_shopping_cart .woocommerce-mini-cart__buttons .button,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons .button {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons .button:hover,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons .button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15) !important;
}

/* Checkout Button */
.widget_shopping_cart .woocommerce-mini-cart__buttons .checkout,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons .checkout {
    background: linear-gradient(45deg, #8b5cf6, #f97316, #a855f7, #ea580c) !important;
    background-size: 400% 400% !important;
    color: #fff !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    animation: gradientShift 3s ease infinite !important;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons .checkout:hover,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons .checkout:hover {
    background: linear-gradient(45deg, #8b5cf6, #f97316, #a855f7, #ea580c) !important;
    background-size: 400% 400% !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4) !important;
    animation-duration: 0.8s !important;
}

/* Empty Cart Message */
.widget_shopping_cart .woocommerce-mini-cart__empty-message,
.woocommerce.widget_shopping_cart .woocommerce-mini-cart__empty-message {
    color: #9ca3af !important;
    text-align: center !important;
    padding: 2rem !important;
    font-style: italic !important;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .widget_shopping_cart,
    .woocommerce.widget_shopping_cart {
        padding: 1rem !important;
        margin: 0.5rem !important;
    }
    
    .widget_shopping_cart .woocommerce-mini-cart__buttons,
    .woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons {
        flex-direction: column !important;
    }
    
    .widget_shopping_cart .woocommerce-mini-cart__buttons .button,
    .woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons .button,
    .widget_shopping_cart .woocommerce-mini-cart__buttons .checkout,
    .woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons .checkout {
        width: 100% !important;
    }
}

/* Override any existing cart widget styles */
.woocommerce-cart-widget *,
.widget_shopping_cart *,
.woocommerce.widget_shopping_cart * {
    box-sizing: border-box !important;
}

/* Ensure proper z-index for cart widget */
.widget_shopping_cart,
.woocommerce.widget_shopping_cart {
    z-index: 9999 !important;
    position: relative !important;
}
