/* ==========================================================================
   1. Cart & Checkout UI Adjustments
   ========================================================================== */

/*remove gap on the left of variation choose menu*/
.woocommerce-notices-wrapper:empty {
    display: none !important;
}

form.variations_form::before {
    display: none !important;
    content: none !important;
}


/* Hide Subtotal row and Basket Totals Header */
.woocommerce-cart tr.cart-subtotal,
.woocommerce-cart .cart_totals h2 { 
    display: none !important; 
}

/* Target BOTH Product Request buttons */
.wc-proceed-to-checkout a.checkout-button,
#wpcrs-ajax-form button[type="submit"] {
    background-color: #004488 !important;
    color: #ffffff !important;
    border: none !important;
}

.wc-proceed-to-checkout a.checkout-button:hover,
#wpcrs-ajax-form button[type="submit"]:hover {
    background-color: #002d5a !important; 
}

/* Remove Icon (X) Styling */
.woocommerce-cart td.product-remove a.remove {
    color: #000000 !important; 
    background: transparent !important; 
    font-weight: bold;
    display: inline-block;
    transform: scale(1.2); 
    transition: transform 0.2s ease-in-out !important;
}

/* Remove Icon Hover Effect - Little Rotate */
.woocommerce-cart td.product-remove a.remove:hover {
    color: #000000 !important;
    background: transparent !important;
    transform: scale(1.2) rotate(15deg) !important; 
}

/* ==========================================================================
   2. Sticky Menu Spacing (Cart & Order Success Pages)
   ========================================================================== */
.woocommerce-cart h1.entry-title,
.woocommerce-cart .page-title,
.woocommerce-cart header.entry-header,
.woocommerce-checkout h1.entry-title,
.woocommerce-checkout .page-title,
.woocommerce-checkout header.entry-header {
    padding-top: 80px !important;
    margin-top: 0 !important;
}

.woocommerce-cart .page-content,
.woocommerce-cart #content,
.woocommerce-checkout .page-content,
.woocommerce-checkout #content {
    padding-top: 20px !important; 
}


/* ==========================================================================
   4. Floating Toast Notifications (WooCommerce Messages)
   ========================================================================== */
.woocommerce-message, 
.woocommerce-error, 
.woocommerce-info {
    position: fixed !important;
    top: 30px !important;       
    left: 50% !important; /* Move to the middle */
    transform: translateX(-50%) !important; /* Perfect center alignment */
    z-index: 999999 !important; 
    width: 90% !important;
    max-width: 700px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    margin: 0 !important;
    animation: wpcrs-slide-down 0.4s ease-out forwards !important;
    
    /* Center text and button vertically */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 15px 20px !important;
    background-color: #fff !important; /* Ensure it has a solid background */
    border-top: 4px solid #004488 !important; /* Nice accent line */
}

/* Slide DOWN animation */
@keyframes wpcrs-slide-down {
    from { top: -100px; opacity: 0; }
    to { top: 30px; opacity: 1; }
}

/* Slide UP animation class (triggered by JS) */
.wpcrs-fade-out {
    animation: wpcrs-slide-up 0.4s ease-in forwards !important;
}

@keyframes wpcrs-slide-up {
    from { top: 30px; opacity: 1; }
    to { top: -100px; opacity: 0; }
}

/* ==========================================================================
   5. Fix WooCommerce Notice Icons (Green Spot/Checkmark)
   ========================================================================== */
.woocommerce-message::before, 
.woocommerce-error::before, 
.woocommerce-info::before {
    position: relative !important; /* Stop it from floating over the text */
    top: 0 !important;
    left: 0 !important;
    margin-right: 10px !important; /* Add space between icon and text */
    flex-shrink: 0 !important; /* Prevent the icon from getting squished */
    display: inline-block !important;
}

/* Push the button cleanly to the right and prevent it from squishing */
.woocommerce-message .button,
.woocommerce-error .button,
.woocommerce-info .button {
    margin-left: auto !important; 
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}
/* ==========================================================================
   6. Toast Close Button
   ========================================================================== */
/* Add extra padding on the right side so the text/buttons don't hit the X */
.woocommerce-message, 
.woocommerce-error, 
.woocommerce-info {
    padding-right: 40px !important; 
}

/* Style the injected X button */
.wpcrs-toast-close {
    position: absolute !important;
    top: 50% !important;
    right: 15px !important;
    transform: translateY(-50%) !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #999 !important;
    cursor: pointer !important;
    transition: color 0.2s ease-in-out !important;
    font-family: sans-serif !important;
    z-index: 10 !important;
}

