/* =====================================================
   Checkout Quantity Editor — style.css (v2)
   Override Woodmart theme styles with high specificity
   ===================================================== */

/* Reset & wrapper ---------------------------------- */
.woocommerce-checkout .shop_table .cqe-qty-wrapper,
.woocommerce table.shop_table .cqe-qty-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    direction: ltr !important;
    min-width: unset !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

.woocommerce-checkout .shop_table .cqe-qty-wrapper:focus-within,
.woocommerce table.shop_table .cqe-qty-wrapper:focus-within {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18) !important;
}

/* Buttons ------------------------------------------ */
.woocommerce-checkout .shop_table .cqe-btn,
.woocommerce table.shop_table .cqe-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 38px !important;
    min-width: 34px !important;
    min-height: 38px !important;
    background: #f5f5f5 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    color: #555 !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    outline: none !important;
}

.woocommerce-checkout .shop_table .cqe-btn:hover,
.woocommerce table.shop_table .cqe-btn:hover {
    background: #ebebeb !important;
    color: #111 !important;
}

.woocommerce-checkout .shop_table .cqe-btn:active,
.woocommerce table.shop_table .cqe-btn:active {
    background: #ddd !important;
}

.woocommerce-checkout .shop_table .cqe-minus,
.woocommerce table.shop_table .cqe-minus {
    border-right: 2px solid #e0e0e0 !important;
}

.woocommerce-checkout .shop_table .cqe-plus,
.woocommerce table.shop_table .cqe-plus {
    border-left: 2px solid #e0e0e0 !important;
}

/* Remove button ------------------------------------ */
.woocommerce-checkout .shop_table .cqe-remove,
.woocommerce table.shop_table .cqe-remove {
    border-left: 2px solid #e0e0e0 !important;
    color: #aaa !important;
    font-size: 14px !important;
}

.woocommerce-checkout .shop_table .cqe-remove:hover,
.woocommerce table.shop_table .cqe-remove:hover {
    background: #fff5f5 !important;
    color: #e53e3e !important;
}

/* SVG icons inside buttons */
.woocommerce-checkout .shop_table .cqe-btn svg,
.woocommerce table.shop_table .cqe-btn svg {
    display: block !important;
    width: 12px !important;
    height: 12px !important;
    pointer-events: none !important;
}

/* Number input ------------------------------------- */
.woocommerce-checkout .shop_table .cqe-qty-input,
.woocommerce table.shop_table .cqe-qty-input {
    width: 46px !important;
    height: 38px !important;
    min-width: 46px !important;
    text-align: center !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111 !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.woocommerce-checkout .shop_table .cqe-qty-input::-webkit-inner-spin-button,
.woocommerce-checkout .shop_table .cqe-qty-input::-webkit-outer-spin-button,
.woocommerce table.shop_table .cqe-qty-input::-webkit-inner-spin-button,
.woocommerce table.shop_table .cqe-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Loading state ------------------------------------ */
.woocommerce-checkout .shop_table .cqe-qty-wrapper.cqe-loading,
.woocommerce table.shop_table .cqe-qty-wrapper.cqe-loading {
    opacity: 0.55 !important;
    pointer-events: none !important;
}

/* Row removal animation ---------------------------- */
tr.cqe-removing td {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    opacity: 0 !important;
    transform: translateX(10px) !important;
}

/* Mobile ------------------------------------------- */
@media (max-width: 480px) {
    .woocommerce-checkout .shop_table .cqe-btn,
    .woocommerce table.shop_table .cqe-btn {
        width: 30px !important;
        height: 34px !important;
        min-width: 30px !important;
        min-height: 34px !important;
    }

    .woocommerce-checkout .shop_table .cqe-qty-input,
    .woocommerce table.shop_table .cqe-qty-input {
        width: 38px !important;
        height: 34px !important;
        min-width: 38px !important;
        font-size: 13px !important;
    }
}
