body.wpspa-loading::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.6);
    z-index: 9998;
}

body.wpspa-loading::after {
    content: '';
    position: fixed;
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

@keyframes spin {
    to { transform: rotate(360deg) translate(-50%, -50%); }
}

/* ===== SPA Page Transition ===== */

.wpspa-page {
    animation-duration: 0.45s;
    animation-fill-mode: both;
}

.wpspa-enter {
    animation-name: wpspaSlideDown;
}

@keyframes wpspaSlideDown {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
