/**
 * PeBusyLock overlay — production surface (approved prototype, no demo chrome).
 *
 * Animations use only transform/opacity. No backdrop-filter. No cursor:wait.
 */

.pe-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 10, 8, 0.32);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease-out;
}

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

.pe-busy-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 36px;
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    min-width: 220px;
    max-width: 320px;
    text-align: center;
    transform: translateY(4px) scale(0.98);
    transition: transform 160ms ease-out;
}

.pe-busy-overlay.is-active .pe-busy-card {
    transform: translateY(0) scale(1);
}

.pe-busy-visual {
    position: relative;
    width: 72px;
    height: 72px;
}

.pe-busy-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(122, 20, 24, 0.16);
    border-top-color: #7a1418;
    animation: pe-busy-spin 1.1s linear infinite;
}

.pe-busy-emblem {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background-image: var(--pe-busy-emblem-image, none);
    background-size: 300% 300%;
    background-position: 50% 18%;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 2px rgba(122, 20, 24, 0.12);
    animation: pe-busy-breathe 2.4s ease-in-out infinite;
}

.pe-busy-emblem.pe-busy-emblem--placeholder {
    background-image: none;
    background: radial-gradient(circle at 50% 40%, #d8b45a 0%, #7a1418 78%);
}

.pe-busy-label {
    font: 600 15px/1.35 system-ui, "Segoe UI", sans-serif;
    color: #2a1210;
}

.pe-busy-sublabel {
    font: 400 12.5px/1.3 system-ui, "Segoe UI", sans-serif;
    color: #6b524f;
}

@keyframes pe-busy-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pe-busy-breathe {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.045);
        opacity: 0.92;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pe-busy-ring {
        animation: none;
        border-top-color: rgba(122, 20, 24, 0.16);
    }
    .pe-busy-emblem {
        animation: none;
    }
    .pe-busy-overlay,
    .pe-busy-card {
        transition: none;
    }
}
