/**
 * CFW Quantity Rules - Frontend Styles
 */

/* Quantity input with rules applied */
.cfw-quantity-rules-input {
    /* Remove spinner buttons for better decimal support */
    -moz-appearance: textfield;
}

.cfw-quantity-rules-input::-webkit-outer-spin-button,
.cfw-quantity-rules-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Error state */
.cfw-quantity-rules-input.cfw-quantity-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px #dc3232 !important;
}

/* Error message */
.cfw-quantity-error-message {
    display: block;
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
}

/* Quantity rules form wrapper */
.cfw-quantity-rules-form {
    position: relative;
}

/* Min/Max hint (optional - can be enabled via theme) */
.cfw-quantity-hint {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

/* Cart quantity input styling */
.woocommerce-cart .cfw-quantity-rules-input {
    width: 80px;
    text-align: center;
}

/* Product page quantity input */
.single-product .cfw-quantity-rules-input {
    min-width: 70px;
}

/* Category/shop page quantity input */
.woocommerce ul.products .cfw-quantity-rules-input {
    width: 60px;
    text-align: center;
}

/* WooCommerce Blocks compatibility */
.wc-block-cart .cfw-quantity-rules-input,
.wc-block-checkout .cfw-quantity-rules-input {
    width: auto;
}

/* Theme compatibility - ensure visibility */
.quantity .cfw-quantity-rules-input,
.cart .cfw-quantity-rules-input {
    opacity: 1 !important;
    visibility: visible !important;
}
