/* ThemeSkys reusable loader - shared across user, admin, and public layouts */
.themeskys-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(6px);
    pointer-events: auto;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.themeskys-loader.hidden {
    display: none;
}

.themeskys-loader .loader-content {
    text-align: center;
}

.themeskys-loader .loader-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.themeskys-loader .ring {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-radius: 50%;
}

.themeskys-loader .ring-one {
    border-top-color: #00A86B;
    border-right-color: #00A86B;
    animation: themeskys-spin 1s linear infinite;
}

.themeskys-loader .ring-two {
    inset: 10px;
    border-bottom-color: #2196F3;
    border-left-color: #2196F3;
    animation: themeskys-reverse-spin 1.4s linear infinite;
}

.themeskys-loader .brand-logo {
    position: relative;
    width: 46px;
    height: 46px;
    object-fit: contain;
    display: block;
    z-index: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.themeskys-loader .loading-text {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.themeskys-loader .loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.themeskys-loader .loading-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00A86B;
    animation: themeskys-pulse 0.8s infinite alternate;
}

.themeskys-loader .loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
    background: #06b6d4;
}

.themeskys-loader .loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
    background: #2196F3;
}

@keyframes themeskys-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes themeskys-reverse-spin {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes themeskys-pulse {
    from {
        opacity: 0.3;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .themeskys-loader .ring,
    .themeskys-loader .loading-dots span {
        animation: none;
    }
}

/* Lock page scroll and hide scrollbars while the loader is active */
html.themeskys-locked,
body.themeskys-locked {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}