/* NOKM.dev global loader overlay */

body.nokm-loader-open {
    overflow: hidden;
}

.nokm-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.nokm-loader.is-hidden {
    display: none !important;
}

.nokm-loader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: nokm-loader-fade-in 0.2s ease;
}

.nokm-loader-card {
    position: relative;
    width: min(100%, 300px);
    padding: 1.5rem 1.35rem 1.25rem;
    border-radius: 16px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    text-align: center;
    animation: nokm-loader-rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nokm-loader-spinner {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 1.1rem;
}

.nokm-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2.5px solid rgba(37, 99, 235, 0.12);
    border-top-color: #2563EB;
    animation: nokm-loader-spin 0.9s linear infinite;
}

.nokm-loader-brand {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.02em;
}

.nokm-loader-mark {
    font-weight: 700;
    color: #0F172A;
}

.nokm-loader-domain {
    font-weight: 500;
    color: #64748B;
}

.nokm-loader-label {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    line-height: 1.4;
}

.nokm-loader-progress {
    display: grid;
    gap: 0.45rem;
}

.nokm-loader-track {
    height: 4px;
    border-radius: 999px;
    background: #E2E8F0;
    overflow: hidden;
}

.nokm-loader-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    transition: width 0.25s ease;
}

.nokm-loader-pct {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #2563EB;
    letter-spacing: 0.04em;
}

@keyframes nokm-loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes nokm-loader-rise {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes nokm-loader-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .nokm-loader-ring {
        animation: none;
        border-top-color: #2563EB;
        border-color: rgba(37, 99, 235, 0.35);
    }

    .nokm-loader-card,
    .nokm-loader-backdrop {
        animation: none;
    }
}
