/* ═══════════════════════════════════════════════════════════════
   App splash — matches www.totaltradesmen.uk → app transition
   Logo + spinner only (no titles, progress bar, or status text)
   ═══════════════════════════════════════════════════════════════ */

:root {
    --tt-splash-bg: #093de3;
}

body.tt-session-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background-color: var(--tt-splash-bg);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
}

#preloader,
.tt-app-splash {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--tt-splash-bg);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s cubic-bezier(0.33, 1, 0.68, 1), visibility 0.45s ease;
}

#preloader.hide,
.tt-app-splash.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tt-app-splash--inline {
    position: relative;
    inset: auto;
    z-index: auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.tt-app-splash__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem;
    animation: ttAppSplashIn 0.55s cubic-bezier(0.33, 1, 0.68, 1) both;
}

/* Shown immediately on login submit / dashboard load — no fade-in pop */
.tt-app-splash--instant .tt-app-splash__inner {
    animation: none;
    opacity: 1;
    transform: none;
}

@keyframes ttAppSplashIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tt-app-splash__logo {
    display: block;
    width: min(72vw, 14rem);
    height: auto;
    object-fit: contain;
}

.tt-app-splash__spinner {
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid rgb(255 255 255 / 0.22);
    border-top-color: #fff;
    border-radius: 999px;
    animation: ttAppSplashSpin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes ttAppSplashSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tt-app-splash__inner {
        animation: none;
    }

    .tt-app-splash__spinner {
        animation: none;
        border-top-color: rgb(255 255 255 / 0.6);
    }
}
