/* Variables CSS */
:root {
    --sp_primary: #3498db;
    --sp_secondary: #f3f3f3;
    --sp_bg: #ffffff;
}

/* Overlay */
.sp_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--sp_bg);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sp_overlay.sp_hide {
    opacity: 0;
    visibility: hidden;
}

/* Spinner Clásico */
.sp_loader.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--sp_secondary);
    border-top: 5px solid var(--sp_primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Puntos Animados */
.sp_loader.dots {
    display: flex;
    gap: 10px;
}

.sp_loader.dots::before,
.sp_loader.dots::after {
    content: '';
    width: 15px;
    height: 15px;
    background-color: var(--sp_primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.sp_loader.dots::before {
    animation-delay: -0.32s;
}

.sp_loader.dots::after {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Pulso */
.sp_loader.pulse {
    width: 60px;
    height: 60px;
    background-color: var(--sp_primary);
    border-radius: 50%;
    animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Barras */
.sp_loader.bars {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 50px;
}

.sp_loader.bars::before,
.sp_loader.bars::after {
    content: '';
    width: 8px;
    height: 100%;
    background-color: var(--sp_primary);
    animation: bars 1.2s infinite ease-in-out;
}

.sp_loader.bars::before {
    animation-delay: -0.24s;
}

.sp_loader.bars::after {
    animation-delay: -0.12s;
}

@keyframes bars {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}
