.kpl-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--kpl-overlay, rgba(26, 26, 26, 0.72));
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.kpl-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kpl-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--kpl-accent, #e2783c);
}

.kpl-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

.kpl-brand {
    display: block;
    width: 56px;
    height: 64px;
    animation: kpl-spin 1.4s linear infinite;
}

.kpl-brand svg {
    display: block;
    width: 100%;
    height: 100%;
}

.kpl-brand-dot {
    transform-box: fill-box;
    transform-origin: center;
    animation: kpl-pulse 1s ease-in-out infinite;
}

.kpl-ring {
    display: block;
    width: 52px;
    height: 52px;
    border: 5px solid rgba(255, 255, 255, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: kpl-spin 0.8s linear infinite;
}

.kpl-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 52px;
}

.kpl-dots i {
    width: 12px;
    height: 12px;
    background: currentColor;
    border-radius: 50%;
    animation: kpl-bounce 1.1s ease-in-out infinite;
}

.kpl-dots i:nth-child(2) {
    animation-delay: 0.14s;
}

.kpl-dots i:nth-child(3) {
    animation-delay: 0.28s;
}

body.kpl-open {
    cursor: wait;
}

.kpl-trigger-loading {
    pointer-events: none;
    opacity: 0.85;
}

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

@keyframes kpl-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.45);
        opacity: 0.35;
    }
}

@keyframes kpl-bounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kpl-brand,
    .kpl-ring,
    .kpl-dots i {
        animation: kpl-fade 1.2s ease-in-out infinite;
    }

    .kpl-brand-dot {
        animation: none;
    }
}

@keyframes kpl-fade {
    0%,
    100% {
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
}
