/**
 * Add to Cart Button Widget Styles
 */

/* Wrapper */
.vime-add-to-cart-wrapper {
    display: inline-flex;
    align-items: center;
    width: 100%;
}

/* Button */
.vime-add-to-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.vime-add-to-cart-button:hover {
    text-decoration: none;
}

.vime-button-full-width {
    width: 100%;
}

/* Button content */
.vime-button-text {
    display: inline-block;
}

.vime-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Loading spinner */
.vime-loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.vime-add-to-cart-button.loading .vime-button-text,
.vime-add-to-cart-button.loading .vime-button-icon {
    opacity: 0.5;
}

/* Alignment classes */
.elementor-align-left .vime-add-to-cart-wrapper {
    justify-content: flex-start;
}

.elementor-align-center .vime-add-to-cart-wrapper {
    justify-content: center;
}

.elementor-align-right .vime-add-to-cart-wrapper {
    justify-content: flex-end;
}

.elementor-align-justify .vime-add-to-cart-button {
    width: 100%;
}

/* WooCommerce compatibility */
.woocommerce ul.products li.product .vime-add-to-cart-wrapper {
    margin-top: 10px;
}

.woocommerce ul.products li.product .vime-add-to-cart-button {
    margin: 0;
}

/* Responsive */
@media (max-width: 767px) {
    .elementor-mobile-align-left .vime-add-to-cart-wrapper {
        justify-content: flex-start;
    }
    
    .elementor-mobile-align-center .vime-add-to-cart-wrapper {
        justify-content: center;
    }
    
    .elementor-mobile-align-right .vime-add-to-cart-wrapper {
        justify-content: flex-end;
    }
    
    .elementor-mobile-align-justify .vime-add-to-cart-button {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .elementor-tablet-align-left .vime-add-to-cart-wrapper {
        justify-content: flex-start;
    }
    
    .elementor-tablet-align-center .vime-add-to-cart-wrapper {
        justify-content: center;
    }
    
    .elementor-tablet-align-right .vime-add-to-cart-wrapper {
        justify-content: flex-end;
    }
    
    .elementor-tablet-align-justify .vime-add-to-cart-button {
        width: 100%;
    }
}

/* Added to cart animation */
@keyframes added-to-cart {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.vime-add-to-cart-button.added {
    animation: added-to-cart 0.5s ease;
}

/* Disabled state */
.vime-add-to-cart-button.disabled,
.vime-add-to-cart-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hide WooCommerce messages when using this widget */
.woocommerce .vime-add-to-cart-wrapper + .woocommerce-message {
    display: none !important;
}

/* Also hide messages that appear after the product in listings */
.woocommerce ul.products li.product .woocommerce-message {
    display: none !important;
}

