/* =============================================================================
   SynergyHub - App Loader Styles
   Loading screen with Payo mascot
   ============================================================================= */

/* Loading screen container */
.sh-app-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    transition: opacity 0.5s ease-out;
}

.sh-app-loader.sh-loader-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Payo mascot container */
.sh-loader-mascot {
    position: relative;
    margin-bottom: 24px;
    opacity: 0;
    animation: sh-mascot-bounce 0.8s ease-out forwards, sh-mascot-float 3s ease-in-out 0.8s infinite;
}

.sh-loader-mascot img {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 8px 24px rgba(54, 71, 195, 0.4));
}

/* Welcome message */
.sh-loader-welcome {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
    margin-bottom: 8px;
    opacity: 0;
    animation: sh-fade-up 0.6s ease-out 0.3s forwards;
}

.sh-loader-subtitle {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 1rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 32px;
    opacity: 0;
    animation: sh-fade-up 0.6s ease-out 0.5s forwards;
}

/* Progress indicator */
.sh-loader-progress {
    width: 180px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    opacity: 0;
    animation: sh-fade-up 0.6s ease-out 0.7s forwards;
}

.sh-loader-progress-bar {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, #3647c3, #6354e6, #3647c3);
    background-size: 200% 100%;
    border-radius: 999px;
    animation: sh-progress-flow 1.5s ease-in-out infinite;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes sh-mascot-bounce {
    0% { opacity: 0; transform: scale(0.5) translateY(20px); }
    60% { transform: scale(1.1) translateY(-5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes sh-mascot-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes sh-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes sh-progress-flow {
    0% { transform: translateX(-100%); background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
    100% { transform: translateX(400%); background-position: 0% 0%; }
}

/* =============================================================================
   LIGHT THEME
   ============================================================================= */

html:not(.mud-theme-dark) .sh-app-loader {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
}

html:not(.mud-theme-dark) .sh-loader-welcome {
    color: #1e293b;
}

html:not(.mud-theme-dark) .sh-loader-subtitle {
    color: #64748b;
}

html:not(.mud-theme-dark) .sh-loader-progress {
    background: rgba(0, 0, 0, 0.08);
}
