#lop-overlay {
    display: none;
    position: fixed;
    z-index: -999999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#lop-overlay.visible {
    z-index: 999999;
    display: flex !important;
    opacity: 1;
    pointer-events: all;
}

.lop-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #555;
    border-radius: 50%;
    animation: lop-spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

@keyframes lop-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Spinner alternativo mais moderno */
.lop-spinner-modern {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-top: 3px solid #555;
    border-bottom: 3px solid #555;
    border-radius: 50%;
    animation: lop-spin-modern 1.2s ease-in-out infinite;
}

@keyframes lop-spin-modern {
    0% {
        transform: rotate(0deg);
        border-top-color: #555;
        border-bottom-color: transparent;
    }

    50% {
        transform: rotate(180deg);
        border-top-color: transparent;
        border-bottom-color: #555;
    }

    100% {
        transform: rotate(360deg);
        border-top-color: #555;
        border-bottom-color: transparent;
    }
}

/* Estilo para impedir scroll da página durante carregamento */
body.loading {
    overflow: hidden;
    height: 100vh;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .lop-spinner {
        width: 50px;
        height: 50px;
        border-width: 5px;
    }

    .lop-spinner-modern {
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
}

/* Melhor suporte para temas escuros */
@media (prefers-color-scheme: dark) {
    #lop-overlay {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .lop-spinner {
        border-color: #ccc;
        border-top-color: #fff;
    }

    .lop-spinner-modern {
        border-top-color: #fff;
        border-bottom-color: #fff;
    }
}

/* Animações mais suaves para dispositivos que preferem movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    #lop-overlay {
        transition: opacity 0.1s ease;
    }

    .lop-spinner,
    .lop-spinner-modern {
        animation-duration: 2s;
    }
}

/* Garantia de que o overlay fique sempre por cima */
#lop-overlay.visible {
    z-index: 2147483647 !important;
    /* Valor máximo do z-index */
}

/* ========================================
   ANIMAÇÃO DE TEXTO ESPECIAL PARA CHECKOUT
   ======================================== */

.lop-checkout-text {
    font-size: 4em;
    font-weight: 600;
    color: #333;
    text-align: center;
    position: relative;
    background: linear-gradient(90deg, #ddd 0%, #888 25%, #bbb 50%, #888 75%, #ddd 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: lop-text-wave 5s ease-in-out infinite;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 2px;
    line-height: 1.2;
    max-width: 90vw;
    word-wrap: break-word;
}

@keyframes lop-text-wave {
    0% {
        background-position: 200% 0;
    }

    50% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Fallback para navegadores que não suportam background-clip: text */
@supports not (-webkit-background-clip: text) {
    .lop-checkout-text {
        color: #333;
        animation: lop-text-color-pulse 1.5s ease-in-out infinite alternate;
    }

    @keyframes lop-text-color-pulse {
        0% {
            color: #999;
        }

        100% {
            color: #333;
        }
    }
}

/* Versão responsiva do texto */
@media (max-width: 768px) {
    .lop-checkout-text {
        font-size: 3em;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .lop-checkout-text {
        font-size: 2.5em;
        letter-spacing: 0.5px;
    }
}

/* Suporte para tema escuro no texto de checkout */
@media (prefers-color-scheme: dark) {
    .lop-checkout-text {
        background: linear-gradient(90deg, #ccc 0%, #fff 25%, #ddd 50%, #fff 75%, #ccc 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    @supports not (-webkit-background-clip: text) {
        .lop-checkout-text {
            color: #fff;
        }

        @keyframes lop-text-color-pulse {
            0% {
                color: #ccc;
            }

            100% {
                color: #fff;
            }
        }
    }
}

/* Animação mais suave para dispositivos com movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .lop-checkout-text {
        animation: lop-text-fade 2s ease-in-out infinite alternate;
    }

    @keyframes lop-text-fade {
        0% {
            opacity: 0.7;
        }

        100% {
            opacity: 1;
        }
    }
}