/**
 * WooCommerce Quantity Buttons - Stylizacja
 */

/* Kontener dla pola ilości */
.quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Przyciski +/- */
.wc-qty-button {
    background-color: #e63946;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Hover effect na komputerze */
@media (hover: hover) {
    .wc-qty-button:hover {
        background-color: #d62839;
        transform: scale(1.05);
    }
}

/* Active state - dla wszystkich urządzeń */
.wc-qty-button:active {
    background-color: #c41e2a;
    transform: scale(0.95);
}

/* Disabled state */
.wc-qty-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Pole input dla ilości */
.quantity input.qty {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    padding: 0 5px;
    margin: 0;
}

/* Focus state dla input */
.quantity input.qty:focus {
    outline: none;
    border-color: #e63946;
}

/* Stylizacja dla urządzeń mobilnych */
@media screen and (max-width: 768px) {
    .wc-qty-button {
        width: 44px;
        height: 44px;
        font-size: 22px;
        /* Większe przyciski dla łatwiejszego dotykania */
    }
    
    .quantity input.qty {
        width: 70px;
        height: 44px;
        font-size: 18px;
    }
    
    .quantity {
        gap: 8px;
    }
}

/* Bardzo małe ekrany */
@media screen and (max-width: 480px) {
    .wc-qty-button {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .quantity input.qty {
        width: 80px;
        height: 48px;
        font-size: 18px;
    }
    
    .quantity {
        gap: 10px;
    }
}

/* Usunięcie strzałek ze spinnerów w Chrome, Safari, Edge, Opera */
.quantity input[type="number"]::-webkit-inner-spin-button,
.quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Usunięcie strzałek w Firefox */
.quantity input[type="number"] {
    -moz-appearance: textfield;
}

/* Stylizacja dla koszyka */
.woocommerce-cart .quantity {
    display: inline-flex;
}

/* Animacja przy zmianie wartości */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.quantity input.qty.changed {
    animation: pulse 0.3s ease;
}
