/* Base styles para splash screen */
body fuse-splash-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 999999;

    /* Flex para centrar contenido */
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* Performance */
    pointer-events: auto;
    will-change: opacity, visibility;
}

/* Mostrar splash cuando body NO tiene la clase de hidden */
body:not(.fuse-splash-screen-hidden) fuse-splash-screen {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

/* Ocultar splash con transición suave */
body.fuse-splash-screen-hidden fuse-splash-screen {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
        visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Logo styles */
body fuse-splash-screen img {
    width: 120px;
    max-width: 120px;
    height: auto;
    will-change: transform;
    backface-visibility: hidden;
}

/* Spinner container */
body fuse-splash-screen .spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    width: auto;
}

/* Spinner dots */
body fuse-splash-screen .spinner > div {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #256c38;
    animation: fuse-bouncedelay 1.4s infinite ease-in-out both;
    will-change: transform;
    backface-visibility: hidden;
}

/* Animation delays */
body fuse-splash-screen .spinner .bounce1 {
    animation-delay: -0.32s;
}

body fuse-splash-screen .spinner .bounce2 {
    animation-delay: -0.16s;
}

body fuse-splash-screen .spinner .bounce3 {
    animation-delay: 0s;
}

/* Animación de bounce */
@keyframes fuse-bouncedelay {
    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Prevenir scroll mientras carga */
body:not(.fuse-splash-screen-hidden) {
    overflow: hidden;
}

body.fuse-splash-screen-hidden {
    overflow: auto;
}

/* Antialiasing para mejor renderizado */
body fuse-splash-screen * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
