/* Quantity Restriction Manager - Frontend Styles */

/* Notice styling - REMOVED (notices no longer displayed) */

/* Quantity input styling for restricted products */
.qrm-restricted input[name="quantity"],
.qrm-restricted input[name*="cart["] {
    background: #f8f9fa !important;
    border: 2px solid #0073aa !important;
    font-weight: bold !important;
    text-align: center !important;
    color: #0073aa !important;
    font-size: 16px !important;
    padding: 12px !important;
    border-radius: 4px !important;
}

.qrm-restricted input[name="quantity"]:focus,
.qrm-restricted input[name*="cart["]:focus {
    border-color: #005a87 !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2) !important;
    background: #fff !important;
    outline: none !important;
}

.qrm-restricted input[name="quantity"]:hover,
.qrm-restricted input[name*="cart["]:hover {
    border-color: #005a87 !important;
    background: #fff !important;
}

/* Add a visual indicator that this is a restricted quantity field */
.qrm-restricted input[name="quantity"]::before,
.qrm-restricted input[name*="cart["]::before {
    content: "🔒 ";
    color: #0073aa;
    font-size: 12px;
}

/* Quantity spinner buttons styling */
.qrm-restricted input[type="number"]::-webkit-outer-spin-button,
.qrm-restricted input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    opacity: 0.7;
}

.qrm-restricted input[type="number"] {
    -moz-appearance: textfield;
}

/* Notice strong styling - REMOVED (notices no longer displayed) */

.qrm-error-message {
    background: #ffeaea !important;
    border: 1px solid #e2401c !important;
    padding: 10px !important;
    border-radius: 4px !important;
    color: #e2401c !important;
    font-size: 12px !important;
    margin-top: 8px !important;
    display: block !important;
}

/* Quick buttons removed - using interval-based quantity input only */

/* Disabled add to cart button */
button[name="add-to-cart"].disabled,
button[name="add-to-cart"]:disabled,
.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: #ccc !important;
}

/* Ensure buttons are always visible */
.single_add_to_cart_button,
button[name="add-to-cart"],
button[type="submit"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Cart page specific styles */
.woocommerce-cart .qrm-error-message {
    margin-top: 5px !important;
    padding: 8px !important;
    font-size: 11px !important;
}

/* Product page specific styles - Notice styling removed */

/* Responsive design */
@media (max-width: 768px) {
    /* Notice styling removed */
}

/* Animation for error messages */
@keyframes qrm-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qrm-error-message {
    animation: qrm-slide-in 0.3s ease-out !important;
}

/* Integration with common WooCommerce themes */
.woocommerce .qrm-notice {
    margin: 20px 0 !important;
}

.woocommerce .qrm-quick-buttons {
    margin-top: 20px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .qrm-notice {
        border-width: 2px !important;
    }
    
    .qrm-error-message {
        border-width: 2px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .qrm-notice {
        background: #1e3a5f !important;
        border-color: #4a90e2 !important;
        color: #e1e8ed !important;
    }
    
    .qrm-quick-buttons {
        background: #2d3748 !important;
        border-color: #4a5568 !important;
    }
    
    .qrm-quick-buttons label {
        color: #e2e8f0 !important;
    }
    
    .qrm-error-message {
        background: #742a2a !important;
        border-color: #e53e3e !important;
        color: #fed7d7 !important;
    }
}
