/**
 * Do not edit or add to this file if you wish to upgrade the module to newer
 * versions in the future. If you wish to customize the module for your
 * needs please contact us to https://www.milople.com/contact-us.html
 *
 * @category    Ecommerce
 * @package     Milople_QtyDropdown
 * @copyright   Copyright (c) 2017 Milople Technologies Pvt. Ltd. All Rights Reserved.
 * @url         https://www.milople.com/magento-2-qty-dropdown.html
 *
 */


.milople-qty-dropdown-list,
#milople_qty_dropdown,
.milople-cart-qty-dropdown,
.milople-qty-dropdown-cart-replace,
.milople-qty-dropdown-cart,
.milople-qty-dropdown.milople-bundle-mode select,
.milople-qty-dropdown.milople-grouped-mode select {
    width: auto !important;
    min-width: 54px !important;
    max-width: none !important;

    height: 32px !important;
    padding: 4px 30px 4px 10px;
    border: 1px solid #c2c2c2;
    border-radius: 2px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    text-overflow: clip !important;
    white-space: nowrap;
    overflow: visible !important;
}


.milople-qty-dropdown-list:focus,
#milople_qty_dropdown:focus,
.milople-cart-qty-dropdown:focus,
.milople-qty-dropdown-cart-replace:focus,
.milople-qty-dropdown-cart:focus {
    border-color: #1979c3;
    outline: none;
}



.milople-qty-dropdown-list-wrapper {
    display: block !important;
    width: auto !important;
    margin-bottom: 10px;
    max-width: 100%;
    clear: both;
}

/* Product listing: add space below dropdown */
.product-item-info .milople-qty-dropdown-list-wrapper,
.product-item .milople-qty-dropdown-list-wrapper {
    margin-bottom: 20px !important;
}

.products-grid .milople-qty-dropdown-list,
.product-items .milople-qty-dropdown-list {
    /* Width is dynamically set by JavaScript, but max-width prevents overflow */
    max-width: 180px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.products-grid .milople-qty-dropdown-list option,
.product-items .milople-qty-dropdown-list option {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-product-view:not(.page-product-bundle):not(.page-product-grouped) .box-tocart .fieldset .actions {
    display: flex !important;
    flex-direction: column !important;
}

.catalog-product-view:not(.page-product-bundle):not(.page-product-grouped) form#product_addtocart_form .box-tocart .fieldset .actions .milople-qty-dropdown {
    order: -1 !important;
    margin-bottom: 15px;
}

.catalog-product-view:not(.page-product-bundle):not(.page-product-grouped) .box-tocart .fieldset .actions .primary {
    order: 1 !important;
}


.page-product-configurable form#product_addtocart_form {
    display: flex !important;
    flex-direction: column !important;
}

.page-product-configurable form#product_addtocart_form .product-options-wrapper {
    order: 1 !important;
}

.page-product-configurable form#product_addtocart_form>.milople-qty-dropdown {
    order: 2 !important;
}

.page-product-configurable form#product_addtocart_form .product-options-bottom {
    order: 3 !important;
}


.milople-qty-enabled.catalog-product-view:not(.page-product-bundle):not(.page-product-grouped) .product-info-main .box-tocart .field.qty:not(.milople-qty-dropdown) {
    display: none !important;
}



.milople-qty-dropdown {
    display: block;
}

.milople-qty-dropdown .milople-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.milople-qty-dropdown .milople-control {
    display: block;
}



.milople-qty-dropdown.milople-bundle-mode,
.milople-qty-dropdown.milople-grouped-mode {
    display: block;
    margin-bottom: 10px;
}

.milople-qty-dropdown.milople-bundle-mode .milople-label,
.milople-qty-dropdown.milople-grouped-mode .milople-label {
    display: block;
    margin-bottom: 5px;
}

.milople-qty-dropdown.milople-bundle-mode .milople-control,
.milople-qty-dropdown.milople-grouped-mode .milople-control {
    display: block;
}


.page-product-bundle .field.qty .label,
.page-product-bundle .field.qty .control,
.page-product-grouped .field.qty .label,
.page-product-grouped .field.qty .control {
    display: block !important;
}




.milople-qty-tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 14px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    background-color: #1979c3;
    border-radius: 50%;
    margin-left: 5px;
    cursor: help;
    vertical-align: middle;
    position: relative;
}

.milople-qty-tooltip-icon:hover {
    background-color: #006bb4;
}


.milople-qty-tooltip-icon[title] {
    position: relative;
}


.milople-qty-hint-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}




.milople-qty-enabled .block-minicart {
    min-width: 500px !important;
    max-width: 750px !important;
}



.minicart-items select.milople-qty-dropdown-cart {
    width: auto !important;
    min-width: 60px !important;
    max-width: 200px !important;
}

.minicart-items select.milople-qty-dropdown-cart option {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}


.milople-qty-actions-wrapper {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
}


/* Fix minicart white space issue */
.block-minicart .minicart-items-wrapper,
.block-minicart .minicart-items {
    overflow: auto !important;
    max-height: none !important;
    height: auto !important;
}

.minicart-items .product-item-details .product.actions,
.block-minicart .product-item-details .product.actions {
    white-space: nowrap !important;
}




.milople-qty-stepper-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: 1px solid #c2c2c2;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
}


.milople-qty-stepper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background-color: #f5f5f5 !important;
    color: #333 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.milople-qty-stepper span {
    display: inline-block;
    line-height: 1;
}


.milople-qty-stepper:hover {
    background-color: #e0e0e0 !important;
    color: #000 !important;
}


.milople-qty-stepper:active {
    background-color: #d0d0d0 !important;
}


.milople-qty-stepper:disabled {
    background-color: #f9f9f9 !important;
    color: #ccc !important;
    cursor: not-allowed !important;
}


.milople-qty-stepper.milople-qty-minus {
    border-right: 1px solid #c2c2c2 !important;
    border-radius: 2px 0 0 2px !important;
}


.milople-qty-stepper.milople-qty-plus {
    border-left: 1px solid #c2c2c2 !important;
    border-radius: 0 2px 2px 0 !important;
}


.milople-qty-stepper-wrapper select,
.milople-qty-stepper-wrapper .milople-qty-dropdown,
.milople-qty-stepper-wrapper .milople-qty-dropdown-list,
.milople-qty-stepper-wrapper #milople_qty_dropdown {
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    min-width: 50px !important;
    height: 32px !important;
    text-align: center;
    background-color: #fff !important;
}


.milople-qty-stepper-wrapper select:focus {
    outline: none !important;
    box-shadow: none !important;
}



.page-product-bundle .milople-qty-stepper-wrapper,
.milople-qty-dropdown.milople-bundle-mode .milople-qty-stepper-wrapper {
    display: inline-flex !important;
    flex-direction: row !important;
}



.page-product-grouped .milople-qty-stepper-wrapper,
.milople-qty-dropdown.milople-grouped-mode .milople-qty-stepper-wrapper {
    display: inline-flex !important;
    flex-direction: row !important;
}




.cart.table-wrapper .cart.item .col.qty {
    white-space: nowrap !important;
    width: auto !important;
}

.cart.table-wrapper .cart.item .col.subtotal {
    white-space: nowrap !important;
}

.cart-container .milople-qty-stepper-wrapper,
.checkout-cart-index .milople-qty-stepper-wrapper {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
}



.minicart-items .milople-qty-stepper-wrapper,
.block-minicart .milople-qty-stepper-wrapper {
    display: inline-flex !important;
}


.minicart-items .milople-qty-stepper,
.block-minicart .milople-qty-stepper {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    font-size: 16px !important;
}

.minicart-items .milople-qty-stepper-wrapper select,
.block-minicart .milople-qty-stepper-wrapper select {
    height: 28px !important;
    min-width: 40px !important;
    font-size: 13px !important;
}



.catalog-product-view .milople-qty-stepper-wrapper {
    display: inline-flex !important;
}


.catalog-product-view .field.qty .control .milople-qty-stepper-wrapper,
.catalog-product-view .milople-qty-dropdown .milople-qty-stepper-wrapper {
    margin: 0;
}

.wishlist-index-index .field.qty input[type="number"],
.wishlist-index-index .field.qty:not(.milople-qty-dropdown),
.wishlist-index-index input[name="qty"]:not(.milople-qty-dropdown-list):not(.milople-qty-dropdown) {
    display: none !important;
}

.block-minicart {
    min-width: 500px !important;
    width: 500px !important;
}