/* filepath: website_sale_aplicoop/static/src/css/components/quantity-control.css */

/**
 * Quantity control (+ - input) component styles
 */

/* Formulario agregar al carrito */
.add-to-cart-form {
    width: 100%;
    gap: 0;
    padding: 0.5rem;
    margin-top: 0.25rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: flex;
    border: 1px solid #e9ecef;
    align-content: center;
    justify-content: center;
}

.add-to-cart-form .input-group {
    width: 100%;
    gap: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
}

.add-to-cart-form .product-qty {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.3rem;
    min-width: 32px;
    max-width: 70px;
    border: 2px solid #dee2e6;
    border-radius: 0;
    background-color: #ffffff;
    transition: all 0.2s ease;
    -moz-appearance: textfield;
    height: 36px;
    line-height: 30px;
}

.add-to-cart-form .product-qty::-webkit-outer-spin-button,
.add-to-cart-form .product-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-form .product-qty:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background-color: #ffffff;
}

/* Contenedor de control de cantidad */
.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    width: 100%;
    height: 44px;
}

/* Botones de cantidad + y - */
.qty-control .qty-decrease,
.qty-control .qty-increase {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    gap: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
    background-color: #ffffff;
    color: #495057;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.qty-control .qty-decrease:hover,
.qty-control .qty-increase:hover {
    border-color: var(--primary-color, #007bff);
    color: var(--primary-color, #007bff);
    background-color: #f8f9fa;
}

.qty-control .qty-decrease:active,
.qty-control .qty-increase:active {
    background-color: #e9ecef;
}

.add-to-cart-form .add-to-cart-btn {
    white-space: nowrap;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin: 0;
    font-size: 0.8rem;
    height: 36px;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    max-height: 36px;
    flex-shrink: 0;
    border: none;
    background-color: #7c3aed !important;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-cart-form .add-to-cart-btn:hover {
    background-color: #6d28d9 !important;
    transform: scale(1.05);
}

.add-to-cart-form .add-to-cart-btn:active {
    background-color: #5b21b6 !important;
    transform: scale(0.98);
}

.add-to-cart-form .add-to-cart-btn i {
    font-size: 1rem;
}

/* Pantallas muy grandes: 1600px+ (6 columnas) */
@media (min-width: 1600px) {
    .add-to-cart-form {
        padding: 0.35rem;
        gap: 0.08rem;
    }

    .add-to-cart-form .input-group {
        height: 32px;
        gap: 0.06rem;
    }

    .add-to-cart-form .product-qty {
        font-size: 1rem;
        min-width: 28px;
        max-width: 60px;
        height: 32px;
        padding: 0.2rem;
    }

    .qty-control .qty-decrease,
    .qty-control .qty-increase {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .add-to-cart-form .add-to-cart-btn {
        height: 32px;
        width: 32px;
        min-width: 32px;
        max-width: 32px;
        font-size: 0.75rem;
    }
}

/* Pantallas grandes: 1400-1599px (5 columnas) */
@media (max-width: 1599px) and (min-width: 1400px) {
    .add-to-cart-form {
        padding: 0.36rem;
        gap: 0.07rem;
    }

    .add-to-cart-form .input-group {
        height: 32px;
        gap: 0.05rem;
    }

    .add-to-cart-form .product-qty {
        font-size: 1rem;
        min-width: 28px;
        max-width: 62px;
        height: 32px;
        padding: 0.2rem;
    }

    .qty-control .qty-decrease,
    .qty-control .qty-increase {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .add-to-cart-form .add-to-cart-btn {
        height: 32px;
        width: 32px;
        min-width: 32px;
        font-size: 0.75rem;
    }
}

/* Pantallas medianas: 1200-1399px (4 columnas) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .add-to-cart-form {
        padding: 0.34rem;
        gap: 0.06rem;
    }

    .add-to-cart-form .input-group {
        height: 32px;
        gap: 0.05rem;
    }

    .add-to-cart-form .product-qty {
        font-size: 0.95rem;
        min-width: 28px;
        max-width: 60px;
        height: 32px;
        padding: 0.2rem;
    }

    .qty-control .qty-decrease,
    .qty-control .qty-increase {
        width: 32px;
        height: 32px;
        font-size: 0.88rem;
    }

    .add-to-cart-form .add-to-cart-btn {
        height: 32px;
        width: 32px;
        min-width: 32px;
        font-size: 0.74rem;
    }
}

/* Pantallas tablet grandes: 992-1199px (3 columnas) */
@media (max-width: 1199px) and (min-width: 992px) {
    .add-to-cart-form {
        padding: 0.32rem;
        gap: 0.04rem;
    }

    .add-to-cart-form .input-group {
        height: 32px;
        gap: 0.04rem;
    }

    .add-to-cart-form .product-qty {
        font-size: 0.9rem;
        min-width: 28px;
        max-width: 58px;
        height: 32px;
        padding: 0.2rem;
    }

    .qty-control .qty-decrease,
    .qty-control .qty-increase {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-width: 1px;
    }

    .add-to-cart-form .add-to-cart-btn {
        height: 32px;
        width: 32px;
        min-width: 32px;
        font-size: 0.72rem;
    }
}

/* Pantallas tablet: 768-991px (2-3 columnas) */
@media (max-width: 991px) and (min-width: 768px) {
    .add-to-cart-form {
        padding: 0.42rem;
        gap: 0.03rem;
    }

    .add-to-cart-form .input-group {
        height: 36px;
        gap: 0.04rem;
    }

    .add-to-cart-form .product-qty {
        font-size: 1rem;
        min-width: 32px;
        max-width: 68px;
        height: 36px;
        padding: 0.3rem;
    }

    .qty-control .qty-decrease,
    .qty-control .qty-increase {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        border-width: 1px;
    }

    .add-to-cart-form .add-to-cart-btn {
        height: 36px;
        width: 36px;
        min-width: 36px;
        font-size: 0.82rem;
    }
}

/* Móvil grande: 576-767px (2 columnas) */
@media (max-width: 767px) and (min-width: 576px) {
    .add-to-cart-form {
        padding: 0.35rem;
        gap: 0.1rem;
    }

    .add-to-cart-form .input-group {
        height: 34px;
        gap: 0.08rem;
    }

    .add-to-cart-form .product-qty {
        font-size: 0.9rem;
        min-width: 30px;
        max-width: 64px;
        height: 34px;
        padding: 0.25rem;
    }

    .qty-control .qty-decrease,
    .qty-control .qty-increase {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        border-width: 1px;
    }

    .add-to-cart-form .add-to-cart-btn {
        height: 34px;
        width: 34px;
        min-width: 34px;
        font-size: 0.8rem;
    }
}

/* Móvil pequeño: < 576px (1 columna) */
@media (max-width: 575px) {
    .add-to-cart-form {
        padding: 0.3rem;
        gap: 0.08rem;
        flex-wrap: wrap;
        width: 100%;
    }

    .add-to-cart-form .input-group {
        height: 32px;
        gap: 0.06rem;
        flex: 1 1 100%;
    }

    .add-to-cart-form .product-qty {
        font-size: 0.8rem;
        min-width: 28px;
        max-width: 60px;
        height: 32px;
        padding: 0.2rem;
        line-height: 28px;
    }

    .qty-control .qty-decrease,
    .qty-control .qty-increase {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        border-width: 1px;
        min-width: 32px;
    }

    .qty-control {
        width: auto;
        gap: 0;
    }

    .add-to-cart-form .add-to-cart-btn {
        height: 32px;
        width: 32px;
        min-width: 32px;
        max-width: 32px;
        font-size: 0.75rem;
        flex: 0 0 auto;
    }

    .add-to-cart-form .add-to-cart-btn i {
        font-size: 0.8rem;
    }
}
