/* pantalla-carga/pantalla.css */

/* Contenedor general loader: fondo blanco, centrado absoluto y cobertura total */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  display: none;  /* Se activa por JS con display:flex */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  user-select: none;
}

/* Logo */
#loader-wrapper img {
  width: 200px;
  height: auto;
  margin-bottom: 60px;
}

/* Spinner animado: círculo con animación giratoria */
.loader-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #004a99; /* azul primario */
  border-top: 6px solid #ffcf24; /* amarillo para contraste */
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin-bottom: 20px;
}

/* Animación giro */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Texto principal "Cargando..." */
.loader-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #004a99;
  margin-bottom: 6px;
}

/* Texto secundario */
.loader-message {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #666666;
  margin-bottom: 25px;
}

/* Barra de progreso contenedor */
.loader-bar {
  width: 280px;
  height: 8px;
  background-color: #e1e1e1;
  border-radius: 10px;
  overflow: hidden;
}

/* Barra interna que "llena" la barra con animación */
.loader-bar-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffcf24, #004a99);
  animation: loadingBar 3.6s ease forwards;
}

/* Animación que va llenando la barra */
@keyframes loadingBar {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}
