/*
 * Responsive auth/loading splash.
 *
 * The controller enables the selected image-backed presentation synchronously
 * before auth can reveal it. If that selected asset fails validation,
 * display: contents restores the existing splash as a production-safe fallback.
 */

.auth-loading-stage {
    display: contents;
}

#auth-loading-screen.splash-art-ready {
    --splash-live-text: #78d8f8;
    --splash-step-text: #487898;
    --splash-progress-start: #08e8f8;
    --splash-progress-mid: #28d8f8;
    --splash-progress-end: #28b8f8;
    --splash-progress-border: #386888;
    --splash-progress-track: rgba(1, 8, 20, 0.9);
    --splash-stage-width: min(100%, 150vh, 1536px);
    --splash-stage-width: min(100%, 150dvh, 1536px);
    --splash-stage-aspect: 3 / 2;
    --splash-stage-background: url('../images/Splash Screen.png?v=20260727043000');
    --splash-subtitle-left: 22%;
    --splash-subtitle-top: 78.2%;
    --splash-subtitle-width: 56%;
    --splash-progress-left: 27.5%;
    --splash-progress-top: 83.5%;
    --splash-progress-width: 45%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
        env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    overflow: hidden;
    background: #00030a;
}

#auth-loading-screen.splash-art-ready.splash-layout-phone {
    --splash-stage-width: min(100%, 216.6667vh, 1846px);
    --splash-stage-width: min(100%, 216.6667dvh, 1846px);
    --splash-stage-aspect: 1846 / 852;
    --splash-stage-background: url('../images/Splash Screen Phone.png?v=20260727043000');
    --splash-subtitle-left: 20%;
    --splash-subtitle-top: 81.2%;
    --splash-subtitle-width: 60%;
    --splash-progress-left: 30.75%;
    --splash-progress-top: 88%;
    --splash-progress-width: 38.5%;
}

#auth-loading-screen.splash-art-ready .auth-loading-stage {
    display: block;
    position: relative;
    flex: 0 0 auto;
    width: var(--splash-stage-width);
    max-width: 100%;
    aspect-ratio: var(--splash-stage-aspect);
    overflow: hidden;
    background-color: #00030a;
    background-image: var(--splash-stage-background);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    container-name: splash-stage;
    container-type: inline-size;
}

#auth-loading-screen.splash-art-ready .auth-loading-emblem {
    display: none !important;
}

/* The visible heading is baked into the artwork; retain the live title for AT. */
#auth-loading-screen.splash-art-ready .auth-loading-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#auth-loading-screen.splash-art-ready .auth-loading-text {
    position: absolute;
    left: var(--splash-subtitle-left);
    top: var(--splash-subtitle-top);
    width: var(--splash-subtitle-width);
    margin: 0;
    padding: 0;
    text-align: center;
}

#auth-loading-screen.splash-art-ready .auth-loading-subtitle {
    margin: 0;
    overflow: hidden;
    color: var(--splash-live-text);
    font-family: 'Exo 2', sans-serif;
    font-size: 18px;
    font-size: clamp(13px, 1.45cqw, 27px);
    font-weight: 400;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-shadow: 0 0 0.45em rgba(40, 184, 248, 0.35);
    white-space: nowrap;
}

#auth-loading-screen.splash-art-ready .auth-loading-progress {
    position: absolute;
    left: var(--splash-progress-left);
    top: var(--splash-progress-top);
    width: var(--splash-progress-width);
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

#auth-loading-screen.splash-art-ready .auth-progress-bar {
    width: 100%;
    height: 10px;
    height: clamp(8px, 1cqw, 16px);
    border: 1px solid var(--splash-progress-border);
    overflow: hidden;
    border: max(1px, 0.1cqw) solid var(--splash-progress-border);
    border-radius: 999px;
    background: var(--splash-progress-track);
    box-shadow: inset 0 0 0.45em rgba(40, 184, 248, 0.15);
}

#auth-loading-screen.splash-art-ready .auth-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--splash-progress-start) 0%,
        var(--splash-progress-mid) 52%,
        var(--splash-progress-end) 100%
    );
    box-shadow: 0 0 0.65em rgba(8, 232, 248, 0.72);
}

#auth-loading-screen.splash-art-ready .auth-progress-step {
    margin: 12px 0 0;
    margin: clamp(10px, 1.4cqw, 26px) 0 0;
    overflow: hidden;
    color: var(--splash-step-text);
    font-family: 'Exo 2', sans-serif;
    font-size: 13px;
    font-size: clamp(10px, 1cqw, 18px);
    font-weight: 400;
    line-height: 1.2;
    opacity: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    #auth-loading-screen.splash-art-ready .auth-progress-fill {
        transition: none;
    }
}
