/**
 * AJAX Cart Toast Notifications
 * 
 * Success notification for add to cart actions
 * Uses site color scheme (orange accent)
 *
 * @package     RalphWhite_B2B
 * @subpackage  Assets
 * @since       2.0.0
 */

/* ==========================================================================
   Toast Container - Right Side Top
   ========================================================================== */

.ajax-cart-toast-container {
    position: fixed;
    top: 100px;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 380px;
}

@media (max-width: 768px) {
    .ajax-cart-toast-container {
        top: 80px;
        right: 0.75rem;
        left: 0.75rem;
        max-width: 100%;
    }
}

/* ==========================================================================
   Toast Notification - Site Color Scheme (Orange)
   ========================================================================== */

.ajax-cart-toast {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(245, 130, 32, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #fed7aa;
    padding: 1.25rem 1.5rem;
    min-width: 320px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    pointer-events: auto;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ajax-cart-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.ajax-cart-toast.hide {
    transform: translateX(450px);
    opacity: 0;
}

@media (max-width: 768px) {
    .ajax-cart-toast {
        min-width: auto;
        max-width: 100%;
        padding: 1rem 1.25rem;
        transform: translateY(-100px);
    }
    
    .ajax-cart-toast.show {
        transform: translateY(0);
    }
    
    .ajax-cart-toast.hide {
        transform: translateY(-100px);
    }
}

/* Toast Icon - Checkmark Circle (Orange) */
.ajax-cart-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f58220 0%, #e0731a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 130, 32, 0.3);
}

.ajax-cart-toast-icon svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    stroke-width: 3;
}

/* Toast Content */
.ajax-cart-toast-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ajax-cart-toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.ajax-cart-toast-message {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

.ajax-cart-toast-message strong {
    color: #f58220;
    font-weight: 600;
}

/* Toast Close Button */
.ajax-cart-toast-close {
    background: transparent;
    border: none;
    padding: 0.375rem;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 0.375rem;
    margin-top: -0.25rem;
    margin-right: -0.5rem;
}

.ajax-cart-toast-close:hover {
    color: #374151;
    background: #f3f4f6;
}

.ajax-cart-toast-close svg {
    width: 18px;
    height: 18px;
}

/* Hide progress bar if exists */
.ajax-cart-toast-progress {
    display: none;
}

/* ==========================================================================
   Hide "View cart" links
   ========================================================================== */

/* Hide WooCommerce "View cart" links after add to cart */
a.wc-forward,
.woocommerce-message a.wc-forward,
.woocommerce-info a.wc-forward,
a[href*="cart"]:has-text("View cart"),
.woocommerce-message a[href*="cart"],
.woocommerce-info a[href*="cart"] {
    display: none !important;
}

/* ==========================================================================
   Hide Toast Notifications on Cart and Checkout Pages
   ========================================================================== */

.woocommerce-cart-page .ajax-cart-toast-container,
.woocommerce-checkout .ajax-cart-toast-container,
body.woocommerce-cart .ajax-cart-toast-container,
body.woocommerce-checkout .ajax-cart-toast-container,
.woocommerce-page.woocommerce-cart .ajax-cart-toast-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Hide any links containing "View cart" text in WooCommerce messages */
.woocommerce-message a:contains("View cart"),
.woocommerce-info a:contains("View cart") {
    display: none !important;
}
