/* === Loader global con backdrop blur (Etapa 13.C.3) === */

#loader-global-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  font-family: 'Outfit', sans-serif;
}
#loader-global-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.loader-global-card {
  background: white;
  border-radius: 16px;
  padding: 32px 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  text-align: center;
  min-width: 280px;
  max-width: 90vw;
}

.loader-global-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
}

.loader-global-avatar {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #0891b2;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.loader-global-spinner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: loader-spin 1.4s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

.loader-global-mensaje {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.loader-global-submensaje {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 16px;
}

.loader-global-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loader-global-bar-fill {
  position: absolute;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #0891b2, #fbbf24, #0891b2);
  border-radius: 2px;
  animation: loader-bar-slide 1.5s ease-in-out infinite;
}

@keyframes loader-bar-slide {
  0%   { left: -40%; }
  100% { left: 100%; }
}

/* Respetar reduce-motion: el spinner/barra dejan de girar. */
@media (prefers-reduced-motion: reduce) {
  .loader-global-spinner, .loader-global-bar-fill { animation: none; }
}
