/* preloaders.css */
#logo-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* full viewport width */
  height: 100vh; /* full viewport height */
  background-color: #ffffff; /* White background */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 99999; /* ensure it's above everything */
  overflow: hidden;
  pointer-events: all; /* block clicks */
  touch-action: none; /* prevent touch scrolling */
}

#logo-preloader.hidden {
  display: none;
}

#logo-preloader img {
  height: 150px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(33%) sepia(98%) saturate(1556%) hue-rotate(198deg) brightness(95%) contrast(101%); /* FORCE BLUE COLOR */
  transform: translateY(-120px); /* Move logo much more upward */
}

/* Facebook-style loading dots */
.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -100px; /* Much more reduced gap to move dots upward with logo */
  gap: 6px;
}

.loading-dots .dot {
  width: 12px;
  height: 12px;
  background-color: #1877F2; /* Blue dots */
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0s; }
.loading-dots .dot:nth-child(4) { animation-delay: 0.16s; }
.loading-dots .dot:nth-child(5) { animation-delay: 0.32s; }

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

#spinner-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* full viewport width */
  height: 100vh; /* full viewport height */
  background-color: #ffffff; /* White background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999; /* ensure it's above everything */
  overflow: hidden;
  pointer-events: all; /* block clicks */
  touch-action: none; /* prevent touch scrolling */
}

#spinner-preloader.hidden {
  display: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(24, 119, 242, 0.3);
  border-top: 3px solid #1877F2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
  #logo-preloader,
  #spinner-preloader {
    background-color: #101010;
  }
}

/* Optional: Manual dark mode class */
.dark-mode #logo-preloader,
.dark-mode #spinner-preloader {
  background-color: #101010;
}

/* Prevent background scroll when preloader is active */
body.preloader-active {
  overflow: hidden;
  height: 100vh;
}
