/* Global widget */
.elementor-widget-aveo_add_to_cart_widget {
    display: none !important;
}
div[data-elementor-type="loop-item"] .elementor-widget-aveo_add_to_cart_widget {
    display: flex !important;
}
.aveo_atc_widget {
    color: #fff;
}

/* Only on hover setting */
.elementor-widget-aveo_add_to_cart_widget:has(.aveo_atc_widget[data-on-hover="true"]) {
    opacity: 0;
    transition: 0.2s ease-out;
}
div[data-elementor-type="loop-item"]:hover .elementor-widget-aveo_add_to_cart_widget:has(.aveo_atc_widget[data-on-hover="true"]),
.elementor-widget-aveo_add_to_cart_widget:has(.loading),
.elementor-editor-active .elementor-widget-aveo_add_to_cart_widget {
    opacity: 1 !important;
}

/* On top class */
.elementor-widget-aveo_add_to_cart_widget {
    position: relative;
}
.elementor-widget-aveo_add_to_cart_widget:has(.aveo_atc_widget[data-on-top="true"]) {
    position: absolute;
    top: 0;
    z-index: 10;
    width: 100%;
}

/* Button general */
.aveo_atc_widget .aveo_atc_btn {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s ease-out;
}
.aveo_atc_widget .aveo_atc_btn:hover {
    cursor: pointer !important;
}
.aveo_atc_widget .aveo_atc_btn i {
    transition: 0.3s ease-out;
    display: block;
}
.aveo_atc_widget .aveo_atc_btn i.aveo_loading {
    display: none;
}
.aveo_atc_widget .aveo_atc_btn.disable {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.aveo_atc_widget .aveo_atc_btn.disable:hover {
    background-color: inherit;
}

/* Button loading animation */
.aveo_atc_widget .aveo_atc_btn.loading {
    opacity: 0.5;
}
.aveo_atc_widget:has(div.loading) .aveo_atc_btn {
    pointer-events: none;
}
.aveo_atc_widget .aveo_atc_btn.loading:hover {
    background-color: #444;
}
.aveo_atc_widget .aveo_atc_btn.loading i {
    display: none;
}
.aveo_atc_widget .aveo_atc_btn.loading i.aveo_loading {
    display: block;
    animation: aveo_loading 2s infinite;
}
@keyframes aveo_loading {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
}

/* First add */
.aveo_atc_widget.already_in_cart .add,
.aveo_atc_widget .add .aveo_plus_icon,
.aveo_atc_widget .add:hover .aveo_cart_icon {
    display: none;
}
.aveo_atc_widget .add:not(.loading):hover .aveo_plus_icon {
    display: block;
}

/* Change amount */
.aveo_atc_widget .change_amount {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: fit-content;
}
.aveo_atc_widget .change_amount .qty {
    display: flex;
    justify-content: center;
    padding: 0 20px;
    min-width: 60px;
    font-size: 20px;
}

/* responsive */
@media screen and (max-width: 1099px) {
    .elementor-widget-aveo_add_to_cart_widget:has(.aveo_atc_only_on_hover) {
        opacity: 1;
    }
}