/**
 * Cart quantity buttons styles
 * Enhanced with better visual design and auto-update functionality
 */
.woocommerce-cart-form .quantity,
.woocommerce-cart-form .product-quantity .quantity {
    display: flex;
    align-items: center;
    position: relative;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(12, 224, 107, 0.2);
    transition: all 0.3s ease;
}

.woocommerce-cart-form .quantity:hover,
.woocommerce-cart-form .product-quantity .quantity:hover {
    border-color: rgba(12, 224, 107, 0.4);
    box-shadow: 0 4px 12px rgba(12, 224, 107, 0.1);
}

.woocommerce-cart-form .quantity .qty,
.woocommerce-cart-form .product-quantity .quantity .qty {
    width: 60px !important;
    text-align: center;
    padding: 12px 8px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
    -moz-appearance: textfield; /* Firefox sayı okları kaldırır */
    border-radius: 0 !important;
    outline: none;
}

/* Chrome, Safari, Edge için sayı okları kaldırır */
.woocommerce-cart-form .quantity .qty::-webkit-inner-spin-button,
.woocommerce-cart-form .quantity .qty::-webkit-outer-spin-button,
.woocommerce-cart-form .product-quantity .quantity .qty::-webkit-inner-spin-button,
.woocommerce-cart-form .product-quantity .quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce-cart-form .quantity .qty:focus,
.woocommerce-cart-form .product-quantity .quantity .qty:focus {
    background: rgba(255, 255, 255, 0.1) !important;
}

.woocommerce-cart-form .quantity .quantity-button,
.woocommerce-cart-form .product-quantity .quantity .quantity-button {
    background: linear-gradient(135deg, rgba(12, 224, 107, 0.8), rgba(12, 224, 107, 0.6));
    color: #000000;
    border: none;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    height: 48px;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    user-select: none;
}

.woocommerce-cart-form .quantity .quantity-button.minus {
    border-radius: 12px 0 0 12px;
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.8), rgba(255, 59, 48, 0.6));
    color: #ffffff;
}

.woocommerce-cart-form .quantity .quantity-button.plus {
    border-radius: 0 12px 12px 0;
}

.woocommerce-cart-form .quantity .quantity-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.woocommerce-cart-form .quantity .quantity-button.minus:hover {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.9), rgba(255, 59, 48, 0.7));
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.woocommerce-cart-form .quantity .quantity-button.plus:hover {
    background: linear-gradient(135deg, rgba(12, 224, 107, 0.9), rgba(12, 224, 107, 0.7));
    box-shadow: 0 4px 12px rgba(12, 224, 107, 0.3);
}

.woocommerce-cart-form .quantity .quantity-button:active {
    transform: scale(0.95);
}

/* Loading state for cart updates */
.woocommerce-cart-form.updating-cart .quantity {
    opacity: 0.7;
    pointer-events: none;
}

.woocommerce-cart-form.updating-cart .quantity .quantity-button {
    background: rgba(128, 128, 128, 0.5) !important;
    cursor: wait;
}

/* Success animation */
@keyframes quantity-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.woocommerce-cart-form .quantity.updated {
    animation: quantity-success 0.3s ease;
}

/* Immediate visual feedback for quantity changes */
.woocommerce-cart-form .quantity .qty.quantity-updating {
    background: rgba(12, 224, 107, 0.1) !important;
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 2px rgba(12, 224, 107, 0.2) !important;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Light theme support */
body.light-theme .woocommerce-cart-form .quantity {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(12, 224, 107, 0.3);
}

body.light-theme .woocommerce-cart-form .quantity .qty {
    color: #333333 !important;
}

body.light-theme .woocommerce-cart-form .quantity .qty:focus {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .woocommerce-cart-form .quantity {
        min-width: 120px;
    }
    
    .woocommerce-cart-form .quantity .qty {
        width: 50px !important;
        padding: 10px 6px !important;
        font-size: 14px;
    }
    
    .woocommerce-cart-form .quantity .quantity-button {
        padding: 10px 12px;
        font-size: 16px;
        height: 42px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .woocommerce-cart-form .quantity {
        min-width: 100px;
    }
    
    .woocommerce-cart-form .quantity .qty {
        width: 40px !important;
        padding: 8px 4px !important;
        font-size: 13px;
    }
    
    .woocommerce-cart-form .quantity .quantity-button {
        padding: 8px 10px;
        font-size: 14px;
        height: 36px;
        min-width: 30px;
    }
}

.woocommerce-cart-form .quantity .quantity-button:active {
    transform: scale(0.95);
}

/* Light theme için değişkenler */
html[data-theme="light"] .woocommerce-cart-form .quantity .quantity-button {
    --button-bg-color: rgba(230, 230, 230, 0.8);
    --button-text-color: #333;
    --button-border-color: rgba(0, 0, 0, 0.1);
    --button-hover-bg-color: rgba(200, 200, 200, 0.9);
}

/* Light theme için sepet toplamları renk düzeltmesi - güçlendirilmiş seçiciler */
html[data-theme="light"] .cart_totals,
html[data-theme="light"] .woocommerce .cart-collaterals .cart_totals,
html[data-theme="light"] .woocommerce-page .cart-collaterals .cart_totals,
html[data-theme="light"] .woocommerce-cart .cart_totals,
body.light-theme .cart_totals,
body.light-theme .woocommerce .cart-collaterals .cart_totals,
body.light-theme .woocommerce-page .cart-collaterals .cart_totals,
body.light-theme .woocommerce-cart .cart_totals {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(20px) !important;
}

html[data-theme="light"] .cart_totals h2,
html[data-theme="light"] .cart_totals th,
html[data-theme="light"] .cart_totals td,
html[data-theme="light"] .cart_totals strong,
body.light-theme .cart_totals h2,
body.light-theme .cart_totals th,
body.light-theme .cart_totals td,
body.light-theme .cart_totals strong {
    color: #333 !important;
}

html[data-theme="light"] .cart_totals th,
html[data-theme="light"] .cart_totals td,
body.light-theme .cart_totals th,
body.light-theme .cart_totals td {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .cart_totals .shop_table,
body.light-theme .cart_totals .shop_table {
    background-color: transparent !important;
}

html[data-theme="light"] .cart_totals .order-total th,
html[data-theme="light"] .cart_totals .order-total td,
body.light-theme .cart_totals .order-total th,
body.light-theme .cart_totals .order-total td {
    color: var(--primary-green) !important;
    border-bottom: none !important;
}

html[data-theme="light"] .wc-proceed-to-checkout .checkout-button,
body.light-theme .wc-proceed-to-checkout .checkout-button {
    background-color: var(--neon-green) !important;
    color: #000 !important;
}

/* Mobil için iyileştirmeler */
@media (max-width: 768px) {
    .woocommerce-cart-form .quantity {
        min-width: 100px;
        justify-content: flex-start;
    }
    
    .woocommerce-cart-form .quantity .qty {
        width: 40px !important;
        padding: 6px 2px !important;
    }
    
    .woocommerce-cart-form .quantity .quantity-button {
        padding: 6px 10px;
        font-size: 14px;
        height: 34px;
    }
}
