/* Shared page loader styles */
body.is-page-loading {
    overflow: hidden;
}

.page-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(18, 18, 18, 0.9), rgba(0, 0, 0, 1));
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
    color: #d4af37;
    padding: 32px;
}

.loader-emblem {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-emblem::before,
.loader-emblem::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.18);
    animation: loaderOrbit 6s linear infinite;
}

.loader-emblem::after {
    inset: 12px;
    border-color: rgba(212, 175, 55, 0.12);
    animation-duration: 8s;
    animation-direction: reverse;
}

.loader-logo {
    position: relative;
    z-index: 2;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.08);
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.22);
    border: 1px solid rgba(212, 175, 55, 0.25);
    animation: loaderPulse 2.8s ease-in-out infinite;
}

.loader-logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.loader-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(212, 175, 55, 0.45);
    animation: loaderSpin 5s linear infinite;
}

.loader-ring::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.8);
}

.loader-ring--delay {
    inset: -16px;
    border-style: solid;
    border-color: rgba(212, 175, 55, 0.2);
    animation-duration: 7s;
    animation-direction: reverse;
}

.loader-ring--delay::after {
    top: auto;
    bottom: -8px;
    right: auto;
    left: 18px;
    width: 12px;
    height: 12px;
    background: rgba(212, 175, 55, 0.8);
}

.loader-message {
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    min-height: 1.4em;
    transition: opacity 0.25s ease;
}

.loader-message--transition {
    opacity: 0;
}

.loader-progress {
    height: 2px;
    width: 140px;
    background: rgba(212, 175, 55, 0.25);
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.loader-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    animation: loaderSweep 1.2s linear infinite;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 35px rgba(212, 175, 55, 0.22);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 45px rgba(212, 175, 55, 0.32);
    }
}

@keyframes loaderOrbit {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderSweep {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(250%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-loader,
    .page-loader *,
    .page-loader::before,
    .page-loader::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0ms !important;
    }
}

