/**
 * Variable Quantity Selector - Frontend Styles
 * Styles for the variable-quantity-selector component
 */

/* Container */
.quantity-selector-component {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 1rem;
}

/* Input Group */
.quantity-selector-component .quantity-input-group {
    background: #f8f9fa;
    border-radius: 2rem;
    padding: 0.25rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quantity-selector-component .quantity-input-group:focus-within {
    border-color: #ff9800;
    box-shadow: 0 0 0 0.2rem rgba(255, 152, 0, 0.15);
}

/* Quantity Buttons */
.quantity-selector-component .quantity-btn {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
}

.quantity-selector-component .quantity-btn:hover:not(:disabled) {
    background: #ff9800;
    color: #fff;
}

.quantity-selector-component .quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quantity Input */
.quantity-selector-component .product-quantity {
    width: 60px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    border: none !important;
    background: transparent !important;
    -moz-appearance: textfield;
}

.quantity-selector-component .product-quantity::-webkit-outer-spin-button,
.quantity-selector-component .product-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Variable Product Specific */
.quantity-selector-component.variable-product .product-quantity {
    width: 70px;
}

/* Unit Label */
.quantity-selector-component .unit-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
    padding-right: 0.5rem;
}

/* Price Info */
.quantity-selector-component .variable-price-info {
    padding-left: 0.5rem;
    font-size: 0.8rem;
}

.quantity-selector-component .price-per-unit {
    color: #666;
}

/* Total Price Display */
.quantity-selector-component .total-price-display {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, #ff9800 0%, #ff5722 100%);
    color: #fff;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Form layout - ensure proper alignment with add to cart button */
.add-to-cart-form {
    display: flex;
    align-items: center;
    gap: 1rem !important;
    flex-wrap: wrap;
}

.add-to-cart-form .quantity-selector-component {
    margin-right: 0;
}

.add-to-cart-form .add-to-cart-btn {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 576px) {
    .quantity-selector-component .quantity-btn {
        width: 32px;
        height: 32px;
    }
    
    .quantity-selector-component .product-quantity {
        width: 50px;
        font-size: 0.9rem;
    }
    
    .quantity-selector-component.variable-product .product-quantity {
        width: 60px;
    }
}
