/* ============================================================
   Page Transition Loader
   Shared across the landing page (landing.css tokens) and every
   dashboard-side page (style.css tokens) — both define the same
   --bg-color / --text-color / --brand-color custom properties, so
   this file inherits whichever theme is active with no extra work
   and needs no changes when either stylesheet's palette shifts.
   ============================================================ */

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.page-loader-circle-container {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-loader-mark-glow {
    position: absolute;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Driven by the brand token rather than a hardcoded rgba, so the glow
       tracks whatever the theme's brand colour is without a second rule. */
    box-shadow: 0 0 65px rgba(var(--brand-color-rgb), 0.55), 0 0 24px rgba(var(--brand-color-rgb), 0.38);
    border: 2px solid rgba(255, 255, 255, 0.8);
    z-index: 2;
}
html.dark-mode .page-loader-mark-glow {
    border-color: rgba(var(--brand-color-rgb), 0.5);
}

.page-loader-rotating-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    animation: rotateText 15s linear infinite;
    color: var(--brand-color);
}
.page-loader-rotating-text text {
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 4.5px;
    text-transform: uppercase;
    fill: currentColor;
}

.page-loader-divider {
    width: 180px;
    height: 1px;
    background: rgba(var(--brand-color-rgb), 0.2);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

html.dark-mode .page-loader-divider,
html.dark-mode body .page-loader-divider {
    background: rgba(255, 255, 255, 0.1);
}

.page-loader-divider span {
    display: block;
    width: 40%;
    height: 100%;
    background: var(--brand-color);
    position: absolute;
    top: 0;
    left: 0;
    animation: page-loader-sweep 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.page-loader-word {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.8;
    color: inherit;
    margin-top: 4px;
}

@keyframes rotateText {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes page-loader-sweep {
    0%   { transform: translateX(-120%); }
    100% { transform: translateX(370%); }
}

@media (prefers-reduced-motion: reduce) {
    .page-loader-rotating-text,
    .page-loader-divider span {
        animation: none;
    }
}
