/**
 * WooCommerce Multi-Cart Saver - Account Saved Carts Styles
 *
 * Modern styling for the Saved Carts section on the My Account page
 * 
 * @package WooCommerce_Multi_Cart_Saver
 * @since 1.0.0
 */

/* 
 * @code-tag: wcmcs-account-variables
 * Modern minimal color palette for sophisticated design
 */
:root {
    --wcmcs-gold: #a78bfa;           /* Soft purple accent */
    --wcmcs-gold-hover: #8b5cf6;    /* Deeper purple for hover */
    --wcmcs-gold-light: #f3f4f6;    /* Ultra light background */
    --wcmcs-white: #ffffff;          /* Pure white */
    --wcmcs-bg-light: #f9fafb;       /* Soft background */
    --wcmcs-border-color: #e5e7eb;   /* Subtle borders */
    --wcmcs-text-color: #374151;     /* Warm dark gray */
    --wcmcs-text-muted: #6b7280;     /* Sophisticated gray */
    --wcmcs-text-light: #9ca3af;     /* Light muted text */
    --wcmcs-danger: #f87171;         /* Soft red */
    --wcmcs-danger-hover: #ef4444;   /* Deeper red */
    --wcmcs-success: #34d399;        /* Fresh mint green */
    --wcmcs-success-light: #ecfdf5;  /* Mint background */
    --wcmcs-info: #60a5fa;           /* Soft blue */
    --wcmcs-info-hover: #3b82f6;     /* Deeper blue */
    --wcmcs-border-radius: 8px;      /* Rounded corners */
    --wcmcs-border-radius-sm: 6px;   /* Small radius */
    --wcmcs-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02); /* Subtle shadow */
    --wcmcs-shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04); /* Hover shadow */
    --wcmcs-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth transitions */
    --wcmcs-zebra-color: #fafbfc;    /* Ultra subtle stripe */
    --wcmcs-table-header-bg: #f8fafc; /* Clean header */
    --wcmcs-details-bg: #f8fafc;     /* Details background */
    --wcmcs-spacing-xs: 0.25rem;     /* 4px */
    --wcmcs-spacing-sm: 0.5rem;      /* 8px */
    --wcmcs-spacing-md: 1rem;        /* 16px */
    --wcmcs-spacing-lg: 1.5rem;      /* 24px */
    --wcmcs-spacing-xl: 2rem;        /* 32px */
}

/* 
 * @code-tag: wcmcs-account-dashboard
 * Main dashboard container styling
 */
.wcmcs-dashboard {
    margin-bottom: 2rem;
    font-family: inherit;
}

.wcmcs-dashboard h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--wcmcs-text-color);
    border-bottom: 2px solid var(--wcmcs-gold);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

/* 
 * @code-tag: wcmcs-carts-table
 * Modern minimalist styling for the main carts table
 */
.wcmcs-carts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: var(--wcmcs-spacing-xl);
    border: 1px solid var(--wcmcs-border-color);
    border-radius: var(--wcmcs-border-radius);
    overflow: hidden;
    box-shadow: var(--wcmcs-shadow);
    background-color: var(--wcmcs-white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Modern table header */
.wcmcs-carts-table thead th {
    background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
    color: var(--wcmcs-text-color);
    font-weight: 600;
    padding: var(--wcmcs-spacing-lg) var(--wcmcs-spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--wcmcs-border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}

.wcmcs-carts-table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wcmcs-gold) 0%, transparent 100%);
}

/* Enhanced cart row styling */
.wcmcs-carts-table tbody tr {
    transition: var(--wcmcs-transition);
    border-bottom: 1px solid #f1f3f4;
    position: relative;
}

.wcmcs-carts-table tbody tr:hover:not(.wcmcs-cart-details) {
    background-color: #fafbfc;
    transform: translateY(-1px);
    box-shadow: var(--wcmcs-shadow-hover);
}

/* Ordered row special styling */
.wcmcs-carts-table tbody tr.wcmcs-ordered-row {
    background: linear-gradient(135deg, var(--wcmcs-success-light) 0%, rgba(236, 253, 245, 0.3) 100%);
    border-left: 3px solid var(--wcmcs-success);
    position: relative;
}

.wcmcs-carts-table tbody tr.wcmcs-ordered-row:hover {
    background: linear-gradient(135deg, var(--wcmcs-success-light) 0%, rgba(236, 253, 245, 0.6) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.12);
}

/* Modern table cell styling */
.wcmcs-carts-table td {
    padding: var(--wcmcs-spacing-lg) var(--wcmcs-spacing-md);
    vertical-align: top;
    color: var(--wcmcs-text-color);
    background-color: transparent;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
 * MODERN CART NAME CELL REDESIGN
 * ============================================ */

/* Modern cart name styling - clean and prominent */
.wcmcs-cart-name {
    font-weight: 700;
    color: #111827;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 12px;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Modern minimalist order status */
.wcmcs-ordered-status {
    margin-bottom: 10px;
}

.wcmcs-order-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--wcmcs-success) 0%, #10d9b3 100%);
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.wcmcs-order-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #10d9b3 0%, #0dd4b0 100%);
}

.wcmcs-order-label {
    font-size: 0.7rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wcmcs-order-number {
    font-weight: 700;
    font-size: 0.8rem;
}

.wcmcs-order-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.wcmcs-order-badge:hover .wcmcs-order-icon {
    transform: translateX(2px);
}

/* Modern minimalist address styling - CONSOLIDATED AND FLICKER-FREE */
.wcmcs-cart-address-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #f8fafc !important;
    color: var(--wcmcs-text-muted) !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    border: 1px solid #f1f3f4 !important;
    font-weight: 500 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
    /* CRITICAL: Prevent flickering by ensuring stable dimensions */
    box-sizing: border-box !important;
    min-height: 1.5em !important;
    /* CRITICAL: Never change width/height/max-width on hover to prevent feedback loop */
    width: auto !important;
    height: auto !important;
    /* Performance optimization */
    will-change: background-color, border-color, color !important;
    /* Ensure positioning stability */
    position: relative !important;
    margin-top: 6px !important;
    margin-left: 0 !important;
}

.wcmcs-cart-address-badge:hover {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: var(--wcmcs-text-color) !important;
    /* CRITICAL: DO NOT change dimensions to prevent flickering */
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    /* CRITICAL: Prevent any layout shifts */
    transform: none !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.wcmcs-cart-address-badge::before {
    content: '📍';
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Remove the "Address:" text prefix for cleaner look */
.wcmcs-cart-address-badge .wcmcs-address-prefix {
    display: none;
}

/* ============================================
 * RESPONSIVE DESIGN IMPROVEMENTS
 * ============================================ */

@media screen and (max-width: 1024px) {
    .wcmcs-cart-name {
        font-size: 1rem;
    }
    
    .wcmcs-cart-address-badge {
        max-width: 200px;
        font-size: 0.75rem;
    }
    
    .wcmcs-carts-table td {
        padding: var(--wcmcs-spacing-md) var(--wcmcs-spacing-sm);
    }
}

@media screen and (max-width: 768px) {
    .wcmcs-cart-name {
        font-size: 1rem;
    }
    
    .wcmcs-cart-address-badge {
        max-width: 150px;
        font-size: 0.75rem;
    }
    
    .wcmcs-cart-actions-container {
        flex-direction: column;
        gap: var(--wcmcs-spacing-xs);
    }
    
    .wcmcs-cart-actions-container .button,
    .wcmcs-cart-action-readonly {
        width: 100%;
        min-width: unset;
    }
    
    .wcmcs-carts-table td {
        padding: var(--wcmcs-spacing-sm);
    }
}

@media screen and (max-width: 480px) {
    .wcmcs-cart-address-badge {
        white-space: nowrap !important;
        max-width: 100% !important;
        line-height: 1.3 !important;
        font-size: 0.65rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .wcmcs-order-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .wcmcs-cart-name {
        font-size: 0.9rem;
    }
}

/* ============================================
 * IMPROVED VISUAL HIERARCHY
 * ============================================ */

/* Better spacing between elements in the cell */
.wcmcs-carts-table td:first-child > * {
    margin-bottom: 0;
}

.wcmcs-carts-table td:first-child > *:not(:last-child) {
    margin-bottom: 8px;
}

/* Subtle fade-in animation for new elements */
.wcmcs-order-badge,
.wcmcs-cart-address-badge {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
 * ACCESSIBILITY IMPROVEMENTS
 * ============================================ */

.wcmcs-order-badge:focus,
.wcmcs-cart-address-badge:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcmcs-order-badge {
        background: #000;
        color: #fff;
        border: 1px solid #fff;
    }
    
    .wcmcs-cart-address-badge {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcmcs-order-badge,
    .wcmcs-carts-table tbody tr {
        transition: none;
        animation: none;
    }
    
    .wcmcs-order-badge:hover,
    .wcmcs-carts-table tbody tr:hover {
        transform: none;
    }
}

/* Enhanced responsive design */
@media screen and (max-width: 1024px) {
    .wcmcs-cart-address-badge {
        max-width: 200px;
    }
    
    .wcmcs-carts-table td {
        padding: var(--wcmcs-spacing-md) var(--wcmcs-spacing-sm);
    }
}

@media screen and (max-width: 768px) {
    .wcmcs-cart-name {
        font-size: 1rem;
    }
    
    .wcmcs-cart-address-badge {
        max-width: 150px;
        font-size: 0.75rem;
    }
    
    .wcmcs-cart-actions-container {
        flex-direction: column;
        gap: var(--wcmcs-spacing-xs);
    }
    
    .wcmcs-cart-actions-container .button,
    .wcmcs-cart-action-readonly {
        width: 100%;
        min-width: unset;
    }
    
    .wcmcs-carts-table td {
        padding: var(--wcmcs-spacing-sm);
    }
}

@media screen and (max-width: 480px) {
    .wcmcs-cart-address-badge {
        white-space: nowrap !important;
        max-width: 100% !important;
        line-height: 1.3 !important;
        font-size: 0.65rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .wcmcs-order-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .wcmcs-cart-name {
        font-size: 0.9rem;
    }
}

/* Astra theme specific compatibility */
.theme-astra .wcmcs-carts-table,
.astra-theme .wcmcs-carts-table {
    font-family: inherit;
}

.theme-astra .wcmcs-cart-actions-container .button,
.astra-theme .wcmcs-cart-actions-container .button {
    font-family: inherit;
    line-height: 1.4;
}

/* Ensure our styling takes precedence over Astra */
.woocommerce-account .woocommerce-MyAccount-content .wcmcs-carts-table tbody tr.wcmcs-ordered-row {
    background: linear-gradient(135deg, var(--wcmcs-success-light) 0%, rgba(212, 237, 218, 0.3) 100%) !important;
    border-left: 4px solid var(--wcmcs-success) !important;
}

/* 
 * @code-tag: wcmcs-cart-details
 * Styling for the expanded cart details section
 */
.wcmcs-cart-details {
    background-color: var(--wcmcs-details-bg);
}

.wcmcs-cart-items-container {
    padding: 1rem;
}

.wcmcs-cart-items-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--wcmcs-border-radius);
    overflow: hidden;
    font-size: 0.9rem;
    box-shadow: var(--wcmcs-shadow);
    background-color: var(--wcmcs-white);
}

.wcmcs-cart-items-table th {
    background-color: var(--wcmcs-table-header-bg);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--wcmcs-border-color);
}

.wcmcs-cart-items-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--wcmcs-border-color);
    vertical-align: middle;
}

.wcmcs-cart-items-table tr:last-child td {
    border-bottom: none;
}

.wcmcs-item-image {
    width: 80px;
    text-align: center;
}

.wcmcs-item-image img {
    border-radius: var(--wcmcs-border-radius);
    border: 1px solid var(--wcmcs-border-color);
    background-color: var(--wcmcs-white);
}

.wcmcs-item-name {
    font-weight: 600;
    color: var(--wcmcs-text-color);
}

.wcmcs-item-price,
.wcmcs-item-subtotal {
    font-weight: 500;
}

.wcmcs-item-quantity {
    text-align: center;
    font-weight: 500;
}

/* Product quantity controls */
.wcmcs-cart-items-table .product-quantity {
    width: 130px;
    min-width: 130px;
}

.wcmcs-cart-items-table .quantity {
    display: flex;
    margin: 0;
    white-space: nowrap;
    width: 100px;
}

.wcmcs-cart-items-table .quantity.buttons_added {
    margin-right: auto;
    margin-left: 0;
}

.wcmcs-cart-items-table .quantity .minus,
.wcmcs-cart-items-table .quantity .plus {
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border: 1px solid #d3ced2;
    width: 30px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    border-radius: 0;
}

.wcmcs-cart-items-table .quantity .minus {
    border-right: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.wcmcs-cart-items-table .quantity .plus {
    border-left: 0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.wcmcs-cart-items-table .quantity .qty {
    width: 40px !important;
    height: 36px;
    border: 1px solid #d3ced2;
    border-width: 1px;
    border-radius: 0;
    text-align: center;
    appearance: textfield;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove arrows/spinners */
.wcmcs-cart-items-table .quantity .qty::-webkit-outer-spin-button,
.wcmcs-cart-items-table .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Focus states */
.wcmcs-cart-items-table .quantity .qty:focus,
.wcmcs-cart-items-table .quantity .minus:focus,
.wcmcs-cart-items-table .quantity .plus:focus {
    outline: none;
    box-shadow: none;
}

/* Hover states */
.wcmcs-cart-items-table .quantity .minus:hover,
.wcmcs-cart-items-table .quantity .plus:hover {
    background-color: #f5f5f5;
}

/* Quantity input loading state */
.wcmcs-cart-items-table .quantity.loading .qty {
    opacity: 0.6;
}

/* Astra Theme Compatibility */
.theme-astra .wcmcs-cart-items-table .quantity .minus,
.theme-astra .wcmcs-cart-items-table .quantity .plus {
    background-color: #f5f5f5;
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
    .wcmcs-cart-items-table .quantity {
        margin: 0 auto;
    }
    
    .wcmcs-cart-items-table td.product-quantity:before {
        margin-bottom: 10px;
    }
}

/* 
 * @code-tag: wcmcs-responsive
 * Responsive adjustments for mobile devices
 */
@media screen and (max-width: 767px) {
    /* Make the table scrollable on mobile */
    .wcmcs-carts-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Adjust padding for mobile */
    .wcmcs-carts-table td,
    .wcmcs-carts-table th {
        padding: 0.75rem 0.5rem;
    }
    
    /* Stack action buttons on very narrow screens */
    @media screen and (max-width: 480px) {
        .wcmcs-cart-actions-container {
            flex-direction: column;
            gap: 0.4rem;
        }
        
        .wcmcs-cart-actions-container .button {
            width: 100%;
        }
        
        /* Convert cart details table to cards on mobile */
        .wcmcs-cart-items-table {
            display: block;
        }
        
        .wcmcs-cart-items-table thead {
            display: none;
        }
        
        .wcmcs-cart-items-table tbody,
        .wcmcs-cart-items-table tr,
        .wcmcs-cart-items-table td {
            display: block;
            width: 100%;
            text-align: left;
        }
        
        .wcmcs-cart-items-table tr {
            margin-bottom: 1rem;
            border: 1px solid var(--wcmcs-border-color);
            border-radius: var(--wcmcs-border-radius);
            padding: 0.5rem;
        }
        
        .wcmcs-cart-items-table td {
            position: relative;
            padding-left: 50%;
            text-align: right;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .wcmcs-cart-items-table td:before {
            position: absolute;
            left: 0.75rem;
            width: 45%;
            text-align: left;
            font-weight: 600;
        }
        
        .wcmcs-cart-items-table td:nth-of-type(1):before { content: "Image"; }
        .wcmcs-cart-items-table td:nth-of-type(2):before { content: "Product"; }
        .wcmcs-cart-items-table td:nth-of-type(3):before { content: "Price"; }
        .wcmcs-cart-items-table td:nth-of-type(4):before { content: "Quantity"; }
        .wcmcs-cart-items-table td:nth-of-type(5):before { content: "Subtotal"; }
        
        .wcmcs-item-image {
            width: 100%;
            text-align: right;
        }
        
        .wcmcs-item-image img {
            max-width: 80px;
        }
    }
}

/* 
 * @code-tag: wcmcs-animations
 * Animation for showing/hiding cart details
 */
.wcmcs-cart-details.visible {
    display: table-row;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 
 * @code-tag: wcmcs-astra-theme-compatibility
 * Compatibility adjustments for Astra theme
 */
.theme-astra .wcmcs-dashboard h2 {
    font-family: inherit;
}

.theme-astra .wcmcs-carts-table .button {
    font-family: inherit;
}

/* Ensure Astra theme doesn't override our styles */
.woocommerce-account .woocommerce-MyAccount-content .wcmcs-dashboard {
    max-width: 100%;
}

/* 
 * @code-tag: wcmcs-total-row
 * Styling for the total row at the bottom of saved carts table 
 */
.wcmcs-total-row {
    background-color: var(--wcmcs-bg-light) !important;
    border-top: 2px solid var(--wcmcs-border-color);
}

.wcmcs-total-row td {
    padding: 1.25rem 1rem !important;
}

.wcmcs-total-label {
    font-size: 1.1rem;
    color: var(--wcmcs-text-color);
}

.wcmcs-total-items strong,
.wcmcs-total-value strong {
    font-size: 1.1rem;
    color: var(--wcmcs-gold);
}

/* Make sure the total row doesn't get zebra striping */
.wcmcs-carts-table tbody tr.wcmcs-total-row:nth-child(odd),
.wcmcs-carts-table tbody tr.wcmcs-total-row:hover {
    background-color: var(--wcmcs-bg-light) !important;
}

/* Add styles for the product remove button */
.wcmcs-remove-product {
    font-size: 0.8em !important;
    padding: 5px 10px !important;
    background-color: #f44336 !important;
    color: white !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.wcmcs-remove-product:hover {
    background-color: #d32f2f !important;
}

.wcmcs-remove-product.loading {
    opacity: 0.7;
    cursor: wait;
}

.wcmcs-item-actions {
    text-align: center;
}

/* Make the product actions column narrower for better layout */
.wcmcs-cart-items-table th.product-actions {
    width: 100px;
}

/* Ensure the remove button is properly visible and sized */
@media screen and (max-width: 768px) {
    .wcmcs-remove-product {
        padding: 3px 6px !important;
        font-size: 0.7em !important;
    }
}

/* Styles for ordered badge */
.wcmcs-cart-ordered-badge {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Mark as ordered checkbox styles */
.wcmcs-mark-ordered-container {
    margin-top: 15px;
    padding: 12px;
    background-color: #ffc;
    border: 2px solid #f0ad4e;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    clear: both;
    width: 100%;
    animation: highlight-ordered 2s ease-in-out;
    position: relative;
    z-index: 10;
}

@keyframes highlight-ordered {
    0% { background-color: #ffc; }
    50% { background-color: #ffeb3b; }
    100% { background-color: #ffc; }
}

.wcmcs-mark-ordered-label {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    color: #8a6d3b;
    cursor: pointer;
    font-weight: 600;
}

.wcmcs-mark-ordered-checkbox {
    margin-right: 10px !important;
    transform: scale(1.4); /* Make checkbox bigger */
}

/* Cancel button */
.wcmcs-cancel-action {
    background-color: #777 !important;
    color: white !important;
}

.wcmcs-cancel-action:hover {
    background-color: #555 !important;
}

/* Confirm buttons */
.wcmcs-confirm-load, 
.wcmcs-confirm-merge {
    background-color: var(--wcmcs-gold) !important;
    font-weight: bold !important;
}

.wcmcs-confirm-load:hover, 
.wcmcs-confirm-merge:hover {
    background-color: var(--wcmcs-gold-hover) !important;
}

/* Force display of mark as ordered container */
.wcmcs-mark-ordered-container.forced-visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    margin: 15px 0 !important;
}

/* 
 * Modern Cart Items Table
 * Enhanced view for saved cart items with better mobile compatibility
 * and Astra theme integration
 */

/* Cart Items Container */
.wcmcs-cart-items-container {
    margin: 0;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Cart Items Table */
.wcmcs-cart-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.wcmcs-cart-items-table thead {
    background-color: #f5f5f5;
}

.wcmcs-cart-items-table th {
    padding: 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #eee;
}

.wcmcs-cart-items-table td {
    padding: 16px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.wcmcs-cart-items-table tbody tr:last-child td {
    border-bottom: none;
}

/* Product Image */
.wcmcs-item-image {
    width: 80px;
}

.wcmcs-item-image img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.wcmcs-item-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Product Information */
.wcmcs-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.wcmcs-item-variation {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

/* Price and Subtotal */
.wcmcs-item-price, 
.wcmcs-item-subtotal {
    font-size: 15px;
    color: #555;
    width: 120px;
}

.wcmcs-item-subtotal {
    font-weight: 600;
}

.wcmcs-subtotal-display {
    transition: all 0.2s ease;
}

.wcmcs-subtotal-display.processing {
    opacity: 0.6;
}

/* Modern Quantity Controls */
.wcmcs-item-quantity {
    width: 130px;
    text-align: center;
}

.wcmcs-quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    position: relative;
    max-width: 120px;
    margin: 0 auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
    background-color: #fff;
}

.wcmcs-quantity-wrapper.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.6) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>') no-repeat center center;
    background-size: 20px;
    z-index: 2;
}

.wcmcs-qty-button {
    width: 30px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7f7f7;
    border: none;
    color: #555;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.wcmcs-qty-button:hover {
    background-color: #eee;
}

.wcmcs-qty-button:focus {
    outline: none;
}

.wcmcs-qty-input {
    width: 40px !important;
    height: 38px !important;
    border: none !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #333 !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: textfield !important;
    appearance: textfield !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wcmcs-qty-input::-webkit-outer-spin-button,
.wcmcs-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.wcmcs-qty-input:focus {
    outline: none;
    box-shadow: none;
}

/* Remove Button */
.wcmcs-item-actions {
    width: 100px;
    text-align: center;
}

.wcmcs-remove-product {
    padding: 8px 12px !important;
    font-size: 13px !important;
    background-color: #f44336 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    display: inline-block !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
}

.wcmcs-remove-product:hover {
    background-color: #d32f2f !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.wcmcs-remove-product:focus {
    outline: none;
}

/* Row update states */
.wcmcs-cart-items-table tr.wcmcs-update-success {
    animation: wcmcs-flash-success 1s;
}

.wcmcs-cart-items-table tr.wcmcs-update-error {
    animation: wcmcs-flash-error 1s;
}

@keyframes wcmcs-flash-success {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(76, 175, 80, 0.1); }
}

@keyframes wcmcs-flash-error {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(244, 67, 54, 0.1); }
}

/* Astra Theme Compatibility */
.theme-astra .wcmcs-qty-button {
    background-color: #f7f7f7;
}

.theme-astra .wcmcs-remove-product {
    font-size: 13px !important;
}

/* Mobile Responsive Design */
@media only screen and (max-width: 768px) {
    .wcmcs-cart-items-table {
        display: block;
        box-shadow: none;
        border: none;
    }
    
    .wcmcs-cart-items-table thead {
        display: none;
    }
    
    .wcmcs-cart-items-table tbody {
        display: block;
    }
    
    .wcmcs-cart-items-table tr {
        display: flex;
        flex-wrap: wrap;
        position: relative;
        margin-bottom: 1.5rem;
        padding: 15px;
        background: #fff;
        border-radius: 5px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .wcmcs-cart-items-table tr:last-child {
        margin-bottom: 0;
    }
    
    .wcmcs-cart-items-table td {
        display: flex;
        flex-direction: column;
        padding: 8px 0;
        border: none;
    }
    
    .wcmcs-cart-items-table td::before {
        content: attr(data-title);
        font-weight: 600;
        margin-bottom: 5px;
        font-size: 13px;
        color: #666;
    }
    
    .wcmcs-item-image {
        width: 80px;
        margin-right: 15px;
        align-self: flex-start;
    }
    
    td.wcmcs-item-image::before {
        display: none;
    }
    
    .wcmcs-cart-items-table td:nth-child(2) {
        width: calc(100% - 95px);
    }
    
    .wcmcs-item-price, 
    .wcmcs-item-quantity, 
    .wcmcs-item-subtotal {
        width: 33.33%;
        text-align: left;
    }
    
    .wcmcs-item-actions {
        width: 100%;
        margin-top: 10px;
        text-align: center;
    }
    
    .wcmcs-remove-product {
        width: 100%;
    }
    
    .wcmcs-quantity-wrapper {
        margin: 0;
    }
    
    /* Product info responsive adjustments */
    .wcmcs-product-main {
        gap: 8px;
    }
    
    .wcmcs-product-title {
        font-size: 14px;
    }
    
    .wcmcs-cart-item-variation {
        gap: 6px;
        margin-top: 6px;
    }
    
    .wcmcs-variation-item {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .wcmcs-variation-value {
        padding: 1px 4px;
    }
}

/* Extra small devices */
@media only screen and (max-width: 480px) {
    .wcmcs-cart-items-table td:nth-child(2) {
        width: calc(100% - 95px);
    }
    
    .wcmcs-item-price, 
    .wcmcs-item-quantity, 
    .wcmcs-item-subtotal {
        width: 100%;
    }
}

/* Delete All Carts button and action buttons group */
.wcmcs-action-buttons-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.wcmcs-delete-all-carts {
    background-color: var(--wcmcs-danger) !important;
    color: var(--wcmcs-white) !important;
    border: none !important;
    transition: var(--wcmcs-transition) !important;
    font-weight: 500 !important;
    padding: 8px 15px !important;
    border-radius: var(--wcmcs-border-radius) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wcmcs-delete-all-carts:hover {
    background-color: var(--wcmcs-danger-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--wcmcs-shadow);
}

.wcmcs-delete-all-carts .dashicons {
    margin-right: 5px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.wcmcs-total-actions {
    padding: 15px !important;
}

/* Responsive styles for action buttons */
@media screen and (max-width: 768px) {
    .wcmcs-action-buttons-group {
        flex-direction: column;
        width: 100%;
    }
    
    .wcmcs-delete-all-carts,
    .wcmcs-merge-all-carts {
        width: 100%;
        margin-right: 0 !important;
        text-align: center;
        justify-content: center;
        padding: 10px !important;
    }
    
    .wcmcs-total-row td {
        padding: 10px !important;
    }
}

/* Page Header Toggle Button */
.wcmcs-page-header-toggle {
	margin: 15px 0 20px 0;
}

.wcmcs-header-toggle-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 6px;
	padding: 12px 16px;
	color: #0a4b78;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	width: auto;
	font-family: inherit;
	text-align: left;
}

.wcmcs-header-toggle-btn:hover {
	background: #e0f0ff;
	border-color: #72aee6;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wcmcs-header-toggle-btn:focus {
	outline: none;
	box-shadow: 0 0 0 2px #007cba;
}

.wcmcs-toggle-icon {
	font-size: 16px;
	flex-shrink: 0;
}

.wcmcs-toggle-text {
	flex: 1;
}

.wcmcs-toggle-arrow {
	font-size: 12px;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.wcmcs-header-toggle-btn[aria-expanded="true"] .wcmcs-toggle-arrow {
	transform: rotate(180deg);
}

.wcmcs-header-toggle-btn[aria-expanded="true"] .wcmcs-toggle-text::before {
	content: "Hide ";
}

/* Page Header Info Section */
.wcmcs-page-header-info {
	background: #f8f9fa;
	border: 1px solid #e1e5e9;
	border-radius: 8px;
	margin: 0 0 30px 0;
	padding: 0;
	overflow: hidden;
	transition: all 0.3s ease;
}

.wcmcs-page-header-info.wcmcs-sliding-down {
	animation: wcmcs-slide-down 0.3s ease-out;
}

.wcmcs-page-header-info.wcmcs-sliding-up {
	animation: wcmcs-slide-up 0.3s ease-out;
}

@keyframes wcmcs-slide-down {
	from {
		opacity: 0;
		transform: translateY(-10px);
		max-height: 0;
	}
	to {
		opacity: 1;
		transform: translateY(0);
		max-height: 500px;
	}
}

@keyframes wcmcs-slide-up {
	from {
		opacity: 1;
		transform: translateY(0);
		max-height: 500px;
	}
	to {
		opacity: 0;
		transform: translateY(-10px);
		max-height: 0;
	}
}

/* Theme Compatibility */
.theme-astra .wcmcs-page-header-info {
	font-family: inherit;
}

.theme-astra .wcmcs-header-main h3 {
	font-family: inherit;
}

/* Ensure proper spacing with existing elements */
.wcmcs-page-header-info + #wcmcs-safari-notice {
	margin-top: 0;
}

.wcmcs-header-content {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.wcmcs-header-main {
	flex: 1;
	min-width: 300px;
	padding: 24px 28px;
}

.wcmcs-header-main h3 {
	margin: 0 0 12px 0;
	color: #2c3338;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

.wcmcs-header-description {
	margin: 0 0 20px 0;
	color: #50575e;
	font-size: 15px;
	line-height: 1.5;
}

.wcmcs-header-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 12px;
}

.wcmcs-feature-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
}

.wcmcs-feature-icon {
	font-size: 16px;
	width: 20px;
	text-align: center;
	flex-shrink: 0;
}

.wcmcs-feature-text {
	color: #50575e;
	font-size: 14px;
	line-height: 1.4;
}

/* Workflow Section */
.wcmcs-workflow-section {
	margin: 25px 0;
	padding: 20px;
	background: rgba(0, 124, 186, 0.05);
	border-radius: 6px;
	border-left: 4px solid #007cba;
}

.wcmcs-workflow-section h4 {
	margin: 0 0 16px 0;
	color: #0a4b78;
	font-size: 16px;
	font-weight: 600;
}

.wcmcs-workflow-steps {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wcmcs-workflow-step {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 0;
}

.wcmcs-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #007cba;
	color: white;
	border-radius: 50%;
	font-size: 14px;
	font-weight: 600;
	flex-shrink: 0;
	margin-top: 2px;
}

.wcmcs-step-content {
	flex: 1;
}

.wcmcs-step-content strong {
	display: block;
	color: #2c3338;
	font-size: 15px;
	margin-bottom: 4px;
	line-height: 1.3;
}

.wcmcs-step-content p {
	margin: 0;
	color: #50575e;
	font-size: 14px;
	line-height: 1.4;
}

/* Admin Information Section */
.wcmcs-admin-info {
	margin: 25px 0 0 0;
	padding: 18px 20px;
	background: rgba(255, 193, 7, 0.1);
	border-radius: 6px;
	border-left: 4px solid #ffc107;
}

.wcmcs-admin-info h4 {
	margin: 0 0 10px 0;
	color: #856404;
	font-size: 16px;
	font-weight: 600;
}

.wcmcs-admin-info p {
	margin: 0;
	color: #6c5700;
	font-size: 14px;
	line-height: 1.5;
}

/* Contact Card */
.wcmcs-header-contact {
	background: #007cba;
	color: white;
	min-width: 280px;
	flex-shrink: 0;
}

.wcmcs-contact-card {
	padding: 24px 28px;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wcmcs-contact-card h4 {
	margin: 0 0 8px 0;
	color: white;
	font-size: 18px;
	font-weight: 600;
}

.wcmcs-contact-intro {
	margin: 0 0 16px 0;
	color: rgba(255, 255, 255, 0.9);
	font-size: 14px;
}

.wcmcs-contact-info {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wcmcs-contact-name {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wcmcs-contact-name strong {
	color: white;
	font-size: 16px;
	font-weight: 600;
}

.wcmcs-contact-title {
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	font-style: italic;
}

.wcmcs-contact-email a {
	color: #b3e5fc;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.2s ease;
}

.wcmcs-contact-email a:hover {
	color: white;
	text-decoration: underline;
}

/* Responsive Design for Header */
@media (max-width: 768px) {
	.wcmcs-header-content {
		flex-direction: column;
	}
	
	.wcmcs-header-main,
	.wcmcs-header-contact {
		min-width: 100%;
	}
	
	.wcmcs-header-main {
		padding: 20px 24px;
	}
	
	.wcmcs-contact-card {
		padding: 20px 24px;
	}
	
	.wcmcs-header-features {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	
	.wcmcs-feature-item {
		padding: 6px 0;
	}
	
	.wcmcs-header-toggle-btn {
		padding: 10px 14px;
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.wcmcs-page-header-info {
		border-radius: 6px;
	}
	
	.wcmcs-header-main {
		padding: 16px 20px;
	}
	
	.wcmcs-contact-card {
		padding: 16px 20px;
	}
	
	.wcmcs-header-main h3 {
		font-size: 18px;
	}
	
	.wcmcs-header-description {
		font-size: 14px;
	}
	
	.wcmcs-header-toggle-btn {
		padding: 8px 12px;
		font-size: 12px;
	}
}

.wcmcs-header-toggle-btn {
	font-size: 14px;
	padding: 10px 15px;
}

.wcmcs-workflow-section {
	margin: 20px 0;
	padding: 15px;
}

.wcmcs-workflow-steps {
	gap: 12px;
}

.wcmcs-workflow-step {
	padding: 8px 0;
	gap: 10px;
}

.wcmcs-step-number {
	width: 24px;
	height: 24px;
	font-size: 12px;
}

.wcmcs-step-content strong {
	font-size: 14px;
}

.wcmcs-step-content p {
	font-size: 13px;
}

.wcmcs-admin-info {
	margin: 20px 0 0 0;
	padding: 15px;
}

.wcmcs-admin-info h4 {
	font-size: 15px;
}

.wcmcs-admin-info p {
	font-size: 13px;
}

/* 
 * @code-tag: wcmcs-ordered-cart-styling
 * Enhanced styling for ordered carts and order status
 */

/* Modern Ordered Status Badge */
.wcmcs-ordered-status {
    margin-top: 0.75rem;
}

.wcmcs-order-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--wcmcs-success) 0%, #10d9b3 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(52, 211, 153, 0.3);
    border: none !important;
}

.wcmcs-order-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.4);
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #10d9b3 0%, #0dd4b0 100%);
}

.wcmcs-order-badge:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    background: linear-gradient(135deg, #10d9b3 0%, #0dd4b0 100%) !important;
}

.wcmcs-order-badge-static {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    cursor: default;
    box-shadow: 0 1px 3px rgba(107, 114, 128, 0.3);
}

.wcmcs-order-badge-static:hover {
    transform: none;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 1px 3px rgba(107, 114, 128, 0.3);
}

.wcmcs-order-label {
    font-weight: 500;
    opacity: 0.9;
}

.wcmcs-order-number {
    font-weight: 700;
    font-family: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    margin-left: 0.125rem;
}

.wcmcs-order-icon {
    font-weight: 600;
    font-size: 0.875rem;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.wcmcs-order-badge:hover .wcmcs-order-icon {
    transform: translateX(2px);
    opacity: 1;
}

/* Enhanced ordered row styling */
.wcmcs-ordered-row {
    background: rgba(16, 185, 129, 0.02) !important;
    border-left: 2px solid #10b981;
}

.wcmcs-ordered-row:hover {
    background: rgba(16, 185, 129, 0.04) !important;
}

.wcmcs-ordered-row .wcmcs-cart-name {
    font-weight: 600;
    color: var(--wcmcs-text-color);
}

/* Read-only indicator for ordered carts */
.wcmcs-cart-action-readonly {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--wcmcs-success) 0%, #10d9b3 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: default;
    opacity: 0.95;
    border: 1px solid rgba(52, 211, 153, 0.1);
    min-width: 80px;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.wcmcs-cart-action-readonly .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.wcmcs-cart-action-readonly .wcmcs-button-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Ordered cart header notice styling */
.wcmcs-cart-ordered-header {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--wcmcs-border-radius);
    padding: 0.875rem;
    margin-bottom: 1rem;
    color: #10b981;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wcmcs-cart-ordered-header .dashicons {
    color: #10b981;
    font-size: 1rem;
}

/* Ordered cart item styling */
.wcmcs-cart-item-ordered {
    background-color: rgba(248, 249, 250, 0.8) !important;
    opacity: 0.85;
}

.wcmcs-cart-item-ordered td {
    color: #6c757d;
}

.wcmcs-cart-item-ordered .wcmcs-cart-item-name {
    opacity: 0.8;
}

/* Read-only quantity display */
.wcmcs-qty-readonly {
    font-weight: 600;
    padding: 8px 12px;
    background-color: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: var(--wcmcs-border-radius);
    display: inline-block;
    min-width: 40px;
    text-align: center;
    color: #666;
}

.wcmcs-cart-item-locked {
    color: #666;
    padding: 8px;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.wcmcs-cart-item-locked .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ================================================
   HIGH SPECIFICITY OVERRIDES FOR THEME COMPATIBILITY
   ================================================ */

/* Ensure our styles override Astra and other themes with high specificity */
body .woocommerce-account .wcmcs-ordered-status,
html body .wcmcs-ordered-status,
.ast-container .wcmcs-ordered-status,
body.theme-astra .wcmcs-ordered-status {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
    padding: 0.375rem 0.75rem !important;
    background: rgba(16, 185, 129, 0.06) !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
    border-radius: var(--wcmcs-border-radius) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    color: #10b981 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
}

body .woocommerce-account .wcmcs-ordered-status .wcmcs-status-icon,
html body .wcmcs-ordered-status .wcmcs-status-icon,
.ast-container .wcmcs-ordered-status .wcmcs-status-icon,
body.theme-astra .wcmcs-ordered-status .wcmcs-status-icon {
    display: flex !important;
    align-items: center !important;
    color: #10b981 !important;
}

body .woocommerce-account .wcmcs-ordered-status .wcmcs-order-link,
html body .wcmcs-ordered-status .wcmcs-order-link,
.ast-container .wcmcs-ordered-status .wcmcs-order-link,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    color: var(--wcmcs-text-color) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 0.25rem 0.5rem !important;
    background: var(--wcmcs-white) !important;
    border: 1px solid var(--wcmcs-border-color) !important;
    border-radius: 4px !important;
    transition: all 0.15s ease !important;
    font-size: 0.75rem !important;
    min-width: 60px !important;
    text-align: center !important;
    justify-content: center !important;
}

body .woocommerce-account .wcmcs-ordered-status .wcmcs-order-link:hover,
html body .wcmcs-ordered-status .wcmcs-order-link:hover,
.ast-container .wcmcs-ordered-status .wcmcs-order-link:hover,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link:hover {
    background: var(--wcmcs-bg-light) !important;
    color: var(--wcmcs-gold) !important;
    border-color: var(--wcmcs-gold) !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(201, 164, 75, 0.3) !important;
}

/* ============================================
 * ENHANCED DATE AND SUBTOTAL STYLING
 * ============================================ */

/* Modern date styling */
.wcmcs-cart-date {
    color: var(--wcmcs-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.wcmcs-cart-date::before {
    content: '🕒';
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Modern subtotal styling */
.wcmcs-cart-subtotal {
    font-weight: 700;
    color: #111827;
    font-size: 1.05rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.wcmcs-cart-subtotal .woocommerce-Price-amount {
    color: var(--wcmcs-gold);
    font-weight: 700;
}

/* ============================================
 * MODERN ACTION BUTTONS
 * ============================================ */

.wcmcs-cart-actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.wcmcs-cart-actions-container .button {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.4;
    background: linear-gradient(135deg, var(--wcmcs-info) 0%, var(--wcmcs-info-hover) 100%);
    box-shadow: 0 2px 6px rgba(96, 165, 250, 0.2);
    min-width: 80px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.wcmcs-cart-actions-container .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
    background: linear-gradient(135deg, var(--wcmcs-info-hover) 0%, #2563eb 100%);
    text-decoration: none;
    color: white;
}

.wcmcs-cart-actions-container .button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
    vertical-align: middle;
}

.wcmcs-cart-actions-container .button .wcmcs-button-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* View button specific styling */
.wcmcs-view-cart {
    background: linear-gradient(135deg, var(--wcmcs-info) 0%, var(--wcmcs-info-hover) 100%) !important;
}

.wcmcs-view-cart:hover {
    background: linear-gradient(135deg, var(--wcmcs-info-hover) 0%, #2563eb 100%) !important;
}

/* Delete button styling */
.wcmcs-delete-cart {
    background: linear-gradient(135deg, var(--wcmcs-danger) 0%, var(--wcmcs-danger-hover) 100%) !important;
    box-shadow: 0 2px 6px rgba(248, 113, 113, 0.2) !important;
}

.wcmcs-delete-cart:hover {
    background: linear-gradient(135deg, var(--wcmcs-danger-hover) 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3) !important;
}

/* Read-only ordered state styling */
.wcmcs-cart-action-readonly {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--wcmcs-success) 0%, #10d9b3 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: default;
    opacity: 0.95;
    border: 1px solid rgba(52, 211, 153, 0.1);
    min-width: 80px;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.wcmcs-cart-action-readonly .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.wcmcs-cart-action-readonly .wcmcs-button-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ============================================
 * CART NOTE SECTION STYLING
 * ============================================ */

.wcmcs-cart-note-section {
    margin: var(--wcmcs-spacing-lg) 0;
    padding: var(--wcmcs-spacing-lg);
    background: #fbfcfd;
    border: 1px solid var(--wcmcs-border-color);
    border-radius: var(--wcmcs-border-radius);
}

.wcmcs-note-header {
    margin-bottom: var(--wcmcs-spacing-md);
}

.wcmcs-note-header label {
    display: block;
    font-weight: 600;
    color: var(--wcmcs-text-color);
    margin-bottom: var(--wcmcs-spacing-xs);
}

.wcmcs-note-help {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--wcmcs-text-muted);
    font-style: italic;
}

.wcmcs-cart-note-input {
    width: 100% !important;
    min-height: 80px !important;
    padding: var(--wcmcs-spacing-sm) !important;
    border: 1px solid var(--wcmcs-border-color) !important;
    border-radius: var(--wcmcs-border-radius-sm) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    resize: vertical !important;
    transition: var(--wcmcs-transition) !important;
    background-color: var(--wcmcs-white) !important;
}

.wcmcs-cart-note-input:focus {
    border-color: var(--wcmcs-gold) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.1) !important;
}

.wcmcs-note-readonly {
    background: var(--wcmcs-white);
    border: 1px solid var(--wcmcs-border-color);
    border-radius: var(--wcmcs-border-radius-sm);
    padding: var(--wcmcs-spacing-sm);
    min-height: 60px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--wcmcs-text-color);
    font-size: 14px;
    line-height: 1.5;
}

.wcmcs-note-readonly.wcmcs-note-empty {
    color: var(--wcmcs-text-muted);
    font-style: italic;
}

.wcmcs-note-actions {
    display: flex;
    align-items: center;
    gap: var(--wcmcs-spacing-sm);
    margin-top: var(--wcmcs-spacing-sm);
}

.wcmcs-save-note-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: var(--wcmcs-gold) !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: var(--wcmcs-border-radius-sm) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: var(--wcmcs-transition) !important;
    text-decoration: none !important;
}

.wcmcs-save-note-btn:hover {
    background: var(--wcmcs-gold-hover) !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

.wcmcs-save-note-btn:disabled,
.wcmcs-save-note-btn.loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.wcmcs-save-note-btn .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

.wcmcs-note-status {
    font-size: 13px;
    font-weight: 500;
}

.wcmcs-note-status .wcmcs-saving {
    color: var(--wcmcs-text-muted);
}

.wcmcs-note-status .wcmcs-saved {
    color: var(--wcmcs-success);
}

.wcmcs-note-status .wcmcs-error {
    color: var(--wcmcs-danger);
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .wcmcs-cart-note-section {
        margin: var(--wcmcs-spacing-md) 0;
        padding: var(--wcmcs-spacing-md);
    }
    
    .wcmcs-note-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--wcmcs-spacing-xs);
    }
    
    .wcmcs-save-note-btn {
        justify-content: center !important;
        width: 100% !important;
    }
}

/* Theme compatibility overrides */
.theme-astra .wcmcs-cart-note-input,
.ast-container .wcmcs-cart-note-input {
    font-family: inherit !important;
    box-shadow: none !important;
}

.theme-astra .wcmcs-save-note-btn,
.ast-container .wcmcs-save-note-btn {
    background: var(--wcmcs-gold) !important;
    border: none !important;
}

.theme-astra .wcmcs-save-note-btn:hover,
.ast-container .wcmcs-save-note-btn:hover {
    background: var(--wcmcs-gold-hover) !important;
}

/* ============================================
 * INDIVIDUAL CART ORDERING BUTTON STYLING
 * ============================================ */

.wcmcs-order-individual-cart {
    background-color: var(--wcmcs-primary-color) !important;
    border-color: var(--wcmcs-primary-color) !important;
    color: white !important;
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
    border-radius: var(--wcmcs-border-radius) !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.wcmcs-order-individual-cart:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3) !important;
}

.wcmcs-order-individual-cart:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
    outline: none !important;
}

.wcmcs-order-individual-cart.loading {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.wcmcs-order-individual-cart.loading .dashicons {
    animation: wcmcs-spin 1s linear infinite !important;
}

/* Only show Order This Cart button for carts with addresses */
tr[data-has-address="false"] .wcmcs-order-individual-cart {
    display: none !important;
}

/* Responsive adjustments for individual order button */
@media (max-width: 782px) {
    .wcmcs-order-individual-cart .wcmcs-button-text {
        display: none !important;
    }
    
    .wcmcs-order-individual-cart {
        padding: 8px !important;
        min-width: 40px !important;
        justify-content: center !important;
    }
}

/* Button spacing in actions container */
.wcmcs-cart-actions-container .wcmcs-order-individual-cart {
    margin-left: 5px !important;
}

/* Success state styling (shown briefly before page reload) */
.wcmcs-order-individual-cart.success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.wcmcs-order-individual-cart.success:hover {
    background-color: #218838 !important;
    border-color: #218838 !important;
}

/* Spin animation for loading states */
@keyframes wcmcs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 

/* Product Name and Variation Container */
.wcmcs-product-info-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcmcs-product-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wcmcs-product-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
}

/* Modern Variation Styling */
.wcmcs-cart-item-variation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.wcmcs-variation-item {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.wcmcs-variation-item:hover {
    background: linear-gradient(135deg, #edf2f7 0%, #cbd5e0 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wcmcs-variation-label {
    font-weight: 500;
    color: #4a5568;
    margin-right: 4px;
}

.wcmcs-variation-value {
    font-weight: 600;
    color: #2d3748;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Legacy styling removal */
.wcmcs-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.wcmcs-item-variation {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}

/* When no carts exist, always show header info and hide toggle */
.wcmcs-no-carts ~ .wcmcs-page-header-info,
.wcmcs-no-carts + .wcmcs-page-header-info {
    display: block !important;
}

.wcmcs-no-carts ~ .wcmcs-page-header-toggle,
.wcmcs-no-carts + .wcmcs-page-header-toggle {
    display: none !important;
}

/* CRITICAL: High-specificity override to prevent flickering from any source */
body .woocommerce-account .wcmcs-cart-address-badge,
html body .wcmcs-cart-address-badge,
.ast-container .wcmcs-cart-address-badge,
body.theme-astra .wcmcs-cart-address-badge {
    white-space: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body .woocommerce-account .wcmcs-cart-address-badge:hover,
html body .wcmcs-cart-address-badge:hover,
.ast-container .wcmcs-cart-address-badge:hover,
body.theme-astra .wcmcs-cart-address-badge:hover {
    white-space: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transform: none !important;
}

/* ULTRA-HIGH SPECIFICITY FINAL FLICKER PREVENTION */
body.woocommerce-account .woocommerce .wcmcs-cart-address-badge,
html body.theme-astra .wcmcs-cart-address-badge,
body.astra-theme .wcmcs-dashboard .wcmcs-cart-address-badge,
.ast-container .woocommerce-account .wcmcs-cart-address-badge {
    white-space: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    /* PREVENT ANY DIMENSION CHANGES */
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    min-height: 1.5em !important;
    box-sizing: border-box !important;
}

/* ULTRA-HIGH SPECIFICITY HOVER STATE */
body.woocommerce-account .woocommerce .wcmcs-cart-address-badge:hover,
html body.theme-astra .wcmcs-cart-address-badge:hover,
body.astra-theme .wcmcs-dashboard .wcmcs-cart-address-badge:hover,
.ast-container .woocommerce-account .wcmcs-cart-address-badge:hover {
    white-space: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    /* ABSOLUTELY NO DIMENSION CHANGES ON HOVER */
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    min-height: 1.5em !important;
    box-sizing: border-box !important;
    transform: none !important;
    /* Only allow safe color changes */
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: var(--wcmcs-text-color) !important;
}

/* ============================================
   MODERN MINIMALIST ORDER LINK STYLES
   Protected against theme overrides with high specificity
   ============================================ */

/* Modern Order Link Base Styles - Non-encapsulated Design */
body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order,
html body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order,
.woocommerce-account .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order,
.wcmcs-carts-table .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order,
body.theme-storefront .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order,
body.theme-twentytwentythree .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order,
.ast-container .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order {
    /* Layout & Display */
    display: inline !important;
    align-items: baseline !important;
    gap: 0.25rem !important;
    
    /* Positioning & Sizing */
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    width: auto !important;
    max-width: none !important;
    
    /* Typography */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    
    /* Colors */
    color: #2563eb !important;
    background: none !important;
    
    /* Border & Radius */
    border: none !important;
    border-radius: 0 !important;
    
    /* Shadow & Effects */
    box-shadow: none !important;
    
    /* Transitions */
    transition: color 0.15s ease !important;
    
    /* Cursor */
    cursor: pointer !important;
    
    /* Reset unwanted styles */
    outline: none !important;
    text-transform: none !important;
    vertical-align: baseline !important;
    white-space: nowrap !important;
}

/* Hover State */
body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover,
html body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover,
.woocommerce-account .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover,
.wcmcs-carts-table .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover,
body.theme-storefront .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover,
body.theme-twentytwentythree .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover,
.ast-container .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:hover {
    color: #1d4ed8 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    text-decoration: underline !important;
    cursor: pointer !important;
}

/* Active State */
body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active,
html body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active,
.woocommerce-account .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active,
.wcmcs-carts-table .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active,
body.theme-storefront .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active,
body.theme-twentytwentythree .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active,
.ast-container .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:active {
    transform: none !important;
    box-shadow: none !important;
    background: none !important;
    color: #1e40af !important;
    cursor: pointer !important;
}

/* Focus State for Accessibility */
body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus,
html body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus,
.woocommerce-account .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus,
.wcmcs-carts-table .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus,
body.theme-storefront .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus,
body.theme-twentytwentythree .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus,
.ast-container .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order:focus {
    outline: 2px solid #2563eb !important;
    outline-offset: 2px !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    cursor: pointer !important;
}

/* Order Prefix Styles */
body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix,
html body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix,
.woocommerce-account .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix,
.wcmcs-carts-table .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix,
body.theme-storefront .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix,
body.theme-twentytwentythree .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix,
.ast-container .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-prefix {
    font-weight: 400 !important;
    color: inherit !important;
    font-size: 0.875rem !important;
    margin: 0 0.25rem 0 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Order Number Styles */
body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number,
html body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number,
.woocommerce-account .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number,
.wcmcs-carts-table .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number,
body.theme-storefront .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number,
body.theme-twentytwentythree .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number,
.ast-container .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number {
    font-family: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace !important;
    font-weight: 600 !important;
    color: inherit !important;
    font-size: 0.875rem !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Add subtle # symbol before order number */
body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before,
html body .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before,
.woocommerce-account .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before,
.wcmcs-carts-table .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before,
body.theme-astra .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before,
body.theme-storefront .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before,
body.theme-twentytwentythree .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before,
.ast-container .wcmcs-ordered-status .wcmcs-order-link.wcmcs-modern-order .wcmcs-order-number:before {
    content: "#" !important;
    opacity: 0.5 !important;
    margin-right: 0.125rem !important;
    cursor: pointer !important;
}

/* 
 * @code-tag: wcmcs-cleanup-notice
 * Minimalist cleanup notice for ordered carts
 */
/* High specificity to prevent theme overrides */
body .woocommerce-account .wcmcs-dashboard .wcmcs-cleanup-notice,
.woocommerce-account .woocommerce-MyAccount-content .wcmcs-cleanup-notice,
body.theme-astra .wcmcs-cleanup-notice,
body.theme-storefront .wcmcs-cleanup-notice {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 24px auto 0 auto !important;
    padding: 12px 20px !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    color: #374151 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    text-align: center !important;
    text-transform: none !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    transition: opacity 0.2s ease !important;
    opacity: 0.85 !important;
    max-width: 450px !important;
}

body .woocommerce-account .wcmcs-dashboard .wcmcs-cleanup-notice:hover,
.woocommerce-account .woocommerce-MyAccount-content .wcmcs-cleanup-notice:hover,
body.theme-astra .wcmcs-cleanup-notice:hover,
body.theme-storefront .wcmcs-cleanup-notice:hover {
    background: none !important;
    border: none !important;
    transform: none !important;
    opacity: 1 !important;
}

body .woocommerce-account .wcmcs-dashboard .wcmcs-cleanup-icon,
.woocommerce-account .woocommerce-MyAccount-content .wcmcs-cleanup-icon,
body.theme-astra .wcmcs-cleanup-icon,
body.theme-storefront .wcmcs-cleanup-icon {
    width: 16px !important;
    height: 16px !important;
    color: #6b7280 !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    stroke-width: 1.5 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

body .woocommerce-account .wcmcs-dashboard .wcmcs-cleanup-text,
.woocommerce-account .woocommerce-MyAccount-content .wcmcs-cleanup-text,
body.theme-astra .wcmcs-cleanup-text,
body.theme-storefront .wcmcs-cleanup-text {
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    font-weight: inherit !important;
    color: inherit !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wcmcs-cleanup-notice {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
        color: #94a3b8;
    }
    
    .wcmcs-cleanup-notice:hover {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    }
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .wcmcs-cleanup-notice {
        flex-direction: column;
        gap: 4px;
        padding: var(--wcmcs-spacing-sm) var(--wcmcs-spacing-md);
        font-size: 0.8rem;
    }
}

/* Accessibility improvements */
.wcmcs-cleanup-notice:focus-within {
    outline: 2px solid var(--wcmcs-gold);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcmcs-cleanup-notice {
        background: #ffffff;
        border: 2px solid #000000;
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcmcs-cleanup-notice {
        transition: none;
    }
    
    .wcmcs-cleanup-notice:hover {
        transform: none;
    }
}

/* Order All Carts Enhanced Styles */
.wcmcs-order-all-carts-btn {
    position: relative;
    transition: all 0.3s ease;
}

.wcmcs-order-all-carts-btn.wcmcs-processing {
    opacity: 0.7;
    cursor: not-allowed;
}

.wcmcs-loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: wcmcs-spin 1s linear infinite;
    margin-right: 5px;
    vertical-align: middle;
}

@keyframes wcmcs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wcmcs-progress-feedback {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    font-size: 12px;
    color: #646970;
    animation: wcmcs-pulse 2s ease-in-out infinite;
}

@keyframes wcmcs-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Enhanced Modal Styles for Order All */
.wcmcs-modal-overlay .wcmcs-modal-content {
    min-width: 400px;
}

.wcmcs-modal-title {
    font-weight: 600;
    margin-bottom: 15px;
}

/* Cart Row States */
.wcmcs-ordered-row {
    background-color: #f8f9fa !important;
    opacity: 0.8;
}

.wcmcs-cart-ordered-badge {
    display: inline-block;
    background: #00a32a;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: 500;
}

.wcmcs-view-order-btn {
    background-color: #2271b1 !important;
    border-color: #2271b1 !important;
    color: white !important;
    text-decoration: none !important;
    margin-right: 5px;
}

.wcmcs-view-order-btn:hover {
    background-color: #135e96 !important;
    border-color: #135e96 !important;
}

/* Responsive Design for Progress Feedback */
@media (max-width: 768px) {
    .wcmcs-progress-feedback {
        display: block;
        margin: 10px 0 0 0;
        text-align: center;
    }
    
    .wcmcs-order-all-carts-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}