/**
 * Product Table Cart Quantity Column
 * Styles for the cart quantity column
 * 
 * @package PTCQ
 * @version 1.0.0
 */

/* Cart quantity column container */
.ptcq-cart-qty-col {
    text-align: center;
    font-size: 14px;
    padding: 5px;
    transition: all 0.3s ease;
}

/* Animation when updated */
.ptcq-cart-qty-col.ptcq-updated {
    transform: scale(1.1);
}

/* Common styles for both states */
.ptcq-in-cart,
.ptcq-not-in-cart {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1.4;
}

/* Style when product IS in cart */
.ptcq-in-cart {
    background-color: #2c974b;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(44, 151, 75, 0.3);
}

.ptcq-in-cart:hover {
    background-color: #237a3c;
    box-shadow: 0 2px 5px rgba(44, 151, 75, 0.4);
    transform: translateY(-1px);
}

/* Cart icon before the number (using Unicode) */
.ptcq-in-cart .ptcq-qty-number:before {
    /* content: "🛒 "; */
    content: "✓ ";
    font-size: 14px;
}

/* Style when product is NOT in cart */
.ptcq-not-in-cart {
    background-color: #f0f0f1;
    color: #787c82;
    border: 1px solid #dcdcde;
}

/* Number styling */
.ptcq-qty-number {
    font-weight: 600;
    font-size: 14px;
}

/* Label styling */
.ptcq-qty-label {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

/* Alternative color schemes - uncomment to use */

/* Blue theme */
/*
.ptcq-in-cart {
    background-color: #0073aa;
    box-shadow: 0 1px 3px rgba(0, 115, 170, 0.3);
}

.ptcq-in-cart:hover {
    background-color: #005a87;
}
*/

/* Orange theme */
/*
.ptcq-in-cart {
    background-color: #f56e28;
    box-shadow: 0 1px 3px rgba(245, 110, 40, 0.3);
}

.ptcq-in-cart:hover {
    background-color: #d35400;
}
*/

/* Purple theme */
/*
.ptcq-in-cart {
    background-color: #7c3aed;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
}

.ptcq-in-cart:hover {
    background-color: #6d28d9;
}
*/

/* Table header styling for cart quantity column */
th.ptcq-header {
    text-align: center;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .ptcq-cart-qty-col {
        font-size: 12px;
        padding: 3px;
    }
    
    .ptcq-in-cart,
    .ptcq-not-in-cart {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .ptcq-qty-number {
        font-size: 12px;
    }
    
    .ptcq-qty-label {
        font-size: 10px;
    }
    
    /* Stack vertically on very small screens */
    @media (max-width: 480px) {
        .ptcq-in-cart,
        .ptcq-not-in-cart {
            flex-direction: column;
            gap: 2px;
        }
    }
}

/* Print styles - hide cart quantities when printing */
@media print {
    .ptcq-cart-qty-col {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ptcq-in-cart {
        border: 2px solid #000;
    }
    
    .ptcq-not-in-cart {
        border: 2px solid #666;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ptcq-cart-qty-col,
    .ptcq-in-cart,
    .ptcq-not-in-cart {
        transition: none;
    }
    
    .ptcq-cart-qty-col.ptcq-updated {
        transform: none;
    }
}