/**
 * WooCommerce Custom Loader Styles
 * Replaces default WooCommerce loader with APOL custom loader
 */

#apol-woocommerce-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10000000;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apol-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);

}

.apol-loader-content {
    position: relative;
    z-index: 10;
    width: 250px;
    height: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.apol-loader-content img {
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    display: block;
    margin: 0 auto;
}

.apol-loader-text {
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
    margin-top: 10px;
}

/* Hide default WooCommerce blockUI loader */
.woocommerce .blockUI.blockOverlay,
.woocommerce-page .blockUI.blockOverlay,
.blockUI.blockOverlay {
    display: none !important;
}

.woocommerce .blockUI.blockMsg,
.woocommerce-page .blockUI.blockMsg,
.blockUI.blockMsg {
    display: none !important;
}

/* Hide WooCommerce processing class default spinner */
.woocommerce .processing::before,
.woocommerce-page .processing::before,
.woocommerce input.button.loading::before,
.woocommerce button.button.loading::before {
    display: none !important;
}

/* Custom loading state for buttons */
.woocommerce button.button.loading,
.woocommerce input.button.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.woocommerce button.button.loading::after,
.woocommerce input.button.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    background-image: url('../images/APOL_Loader.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

