/* ===== ESTILOS PARA CARGA DINÁMICA ===== */

.contenedor-carga {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 150px;
     background: linear-gradient(135deg, #e1e1e1 0%, #f1f1f1 100%); 
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mensaje-carga {
    margin-bottom: 30px;
    text-align: center;
}

.mensaje-carga p {
    font-size: 16px;
    color: #212529;
    font-weight: 500;
    margin: 0;
    animation: parpadeo 1.5s infinite;
}

/* Animación de parpadeo suave */
@keyframes parpadeo {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Barra de progreso */
.barra-progreso {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049, #4CAF50);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
    animation: movimiento 1.5s ease-in-out infinite;
}

@keyframes movimiento {
    0% {
        background-position: 200% 0;
    }
    50% {
        background-position: 0% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Estilos para errores */
.contenedor-error {
    padding: 40px 20px;
    min-height: 150px;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-mensaje {
    font-size: 18px;
    color: #c62828;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.error-detalle {
    font-size: 14px;
    color: #d32f2f;
    margin: 0;
    opacity: 0.8;
}

/* Variante oscura (opcional) */
@media (prefers-color-scheme: dark) {
    .contenedor-carga {
        background: linear-gradient(135deg, #e1e1e1 0%, #f1f1f1 100%);
    }
    
    .mensaje-carga p {
        color: #212529;
    }
    
    .barra-progreso {
        background-color: #555;
    }
    
    .contenedor-error {
        background-color: #3f1d1d;
        border-left-color: #ff6b6b;
    }
    
    .error-mensaje {
        color: #ff8787;
    }
    
    .error-detalle {
        color: #ff6b6b;
    }
}
