/* ===============================================
   ALDADENT LOADING COMPONENT - Versión Simplificada
   Solo Loading Básico de Pantalla Completa
   =============================================== */

/* Ocultar contenido hasta que cargue para evitar parpadeo */
body.loading-active {
    overflow: hidden;
}

body.loading-active > *:not(.aldadent-loading-overlay) {
    visibility: hidden;
}

/* Loading overlay que cubre toda la pantalla */
.aldadent-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
}

/* Contenedor principal del loading */
.aldadent-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Spinner básico giratorio */
.aldadent-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: aldadent-spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Spinner con pulso alternativo */
.aldadent-spinner-pulse {
    width: 60px;
    height: 60px;
    background: #007bff;
    border-radius: 50%;
    animation: aldadent-pulse 1.5s ease-in-out infinite;
    margin-bottom: 1rem;
}

/* Texto de loading */
.aldadent-loading-text {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

/* Texto con animación de puntos */
.aldadent-loading-text-animated::after {
    content: '';
    animation: aldadent-dots 2s linear infinite;
}

/* ===============================================
   ANIMACIONES
   =============================================== */

@keyframes aldadent-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes aldadent-pulse {
    0%, 100% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 0.7;
    }
}

@keyframes aldadent-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ===============================================
   ESTADOS Y UTILIDADES
   =============================================== */

/* Hidden por defecto */
.aldadent-loading-overlay.d-none {
    display: none !important;
}

/* Fade in/out */
.aldadent-loading-overlay.fade-in {
    opacity: 1;
}

.aldadent-loading-overlay.fade-out {
    opacity: 0;
}

/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 576px) {
    .aldadent-loading {
        padding: 1rem;
    }
    
    .aldadent-loading-text {
        font-size: 14px;
    }
    
    .aldadent-spinner,
    .aldadent-spinner-pulse {
        width: 50px;
        height: 50px;
    }
}