/**
 * splash.css - App splash/loading screen.
 *
 * Full-screen overlay shown while the app initializes. Hidden by main.js
 * (hideSplash) once init() completes; the fade itself is pure CSS.
 * Mobile-first; respects the data-theme dark mode flag.
 */

.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff, #0062cc);
    opacity: 1;
    transition: opacity 0.45s ease;
}

.splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
}

.splash-logo {
    width: 72px;
    height: 72px;
    animation: splash-pop 0.6s ease both;
}

.splash-brand {
    font-family: 'Cairo', system-ui, sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
}

.splash-spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: splash-spin 0.9s linear infinite;
}

.splash-text {
    font-family: 'Cairo', system-ui, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes splash-spin {
    to { transform: rotate(360deg); }
}

@keyframes splash-pop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Dark mode: slightly deeper gradient, same brand feel. */
[data-theme="dark"] .splash {
    background: linear-gradient(135deg, #0056b3, #003d80);
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .splash-spinner { animation: none; }
    .splash-logo { animation: none; }
    .splash { transition: none; }
}
