/* ═══════════════════════════════════════════════════════════════
   Loading Premium (Global)
   Overlay de processamento com identidade visual premium
   ═══════════════════════════════════════════════════════════════ */

.lp-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(11, 31, 51, 0.34);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lp-loading-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.lp-loading-card {
    width: min(92vw, 390px);
    border-radius: 16px;
    border: 1px solid rgba(14, 165, 164, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 252, 255, 0.97) 100%);
    box-shadow: 0 14px 34px rgba(11, 31, 51, 0.2);
    padding: 20px 20px 16px;
    text-align: center;
    animation: lpCardFloat 3.4s ease-in-out infinite;
}

.lp-loading-spinner {
    display: block;
    position: relative;
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    animation: lpSpinnerFloat 3s ease-in-out infinite;
}

.lp-loading-spinner::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 999px;
    border: 2px solid rgba(14, 165, 164, 0.2);
}

.lp-loading-spinner::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0EA5A4 0%, #D6B15E 100%);
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.14);
    transform: translate(-50%, -50%) rotate(0deg) translateX(18px);
    animation: lpOrbit 2.4s linear infinite;
}

.lp-loading-title {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
}

.lp-loading-title::after {
    content: "...";
    display: inline-block;
    margin-left: 2px;
    vertical-align: bottom;
    animation: lpDotsFade 1.8s ease-in-out infinite;
}

.lp-loading-text {
    margin: 6px 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #526173;
}

.lp-loading-progress {
    margin: 12px auto 0;
    width: min(100%, 230px);
    height: 3px;
    border-radius: 999px;
    background: rgba(11, 31, 51, 0.12);
    overflow: hidden;
}

.lp-loading-progress::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(14, 165, 164, 0.2) 0%, rgba(14, 165, 164, 0.85) 35%, rgba(214, 177, 94, 0.85) 65%, rgba(214, 177, 94, 0.2) 100%);
    background-size: 170% 100%;
    animation: lpProgressFlow 2.8s ease-in-out infinite;
}

@keyframes lpOrbit {
    to {
        transform: translate(-50%, -50%) rotate(360deg) translateX(18px);
    }
}

@keyframes lpDotsFade {
    0% {
        opacity: 0.25;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.25;
    }
}

@keyframes lpProgressFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes lpSpinnerFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes lpCardFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}

[data-bs-theme=dark] .lp-loading-overlay {
    background: rgba(5, 14, 24, 0.56);
}

[data-bs-theme=dark] .lp-loading-card {
    border-color: rgba(214, 177, 94, 0.24);
    background: linear-gradient(180deg, rgba(9, 25, 43, 0.96) 0%, rgba(7, 22, 36, 0.96) 100%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

[data-bs-theme=dark] .lp-loading-spinner {
    filter: saturate(1.1);
}

[data-bs-theme=dark] .lp-loading-spinner::before {
    border-color: rgba(214, 177, 94, 0.26);
}

[data-bs-theme=dark] .lp-loading-spinner::after {
    background: linear-gradient(135deg, #D6B15E 0%, #0EA5A4 100%);
    box-shadow: 0 0 0 3px rgba(214, 177, 94, 0.14);
}

[data-bs-theme=dark] .lp-loading-title {
    color: #D6B15E;
}

[data-bs-theme=dark] .lp-loading-text {
    color: rgba(214, 177, 94, 0.74);
}

[data-bs-theme=dark] .lp-loading-progress {
    background: rgba(214, 177, 94, 0.14);
}

[data-bs-theme=dark] .lp-loading-progress::before {
    background: linear-gradient(90deg, rgba(214, 177, 94, 0.24) 0%, rgba(214, 177, 94, 0.9) 35%, rgba(14, 165, 164, 0.9) 65%, rgba(14, 165, 164, 0.24) 100%);
    background-size: 170% 100%;
}
