/* ==============================
   EASELYTICS GLOBAL LOADER
================================ */

/* Prevent scroll while loading */
body:not(.ready) {
  overflow: hidden;
}

/* ===== Loader container ===== */
.ease-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96),
    rgba(236, 253, 245, 0.96)
  );

  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
overflow: hidden;

  transition: opacity .35s ease, visibility .35s ease;
  pointer-events: all;
}

/* Hidden state */
.ease-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* 🔥 THIS fixes button issues */
}

/* ===== Logo pulse ===== */
@keyframes ea-logo-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 20px 40px rgba(15,23,42,0.18);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 28px 60px rgba(99,102,241,0.35);
  }
}

/* ===== Bar wave ===== */
@keyframes ea-bar-wave {
  0% {
    height: 6px;
    opacity: 0.4;
  }
  50% {
    height: 22px;
    opacity: 1;
  }
  100% {
    height: 6px;
    opacity: 0.4;
  }
}

/* ===== Page fade-in ===== */
main.wrap {
  opacity: 0;
  transition: opacity .35s ease;
}

body.ready main.wrap {
  opacity: 1;
}

.ea-loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ea-loader-logo {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  animation: ea-logo-pulse 2.2s ease-in-out infinite;
}

.ea-loader-bars {
  display: flex;
  gap: 6px;
  height: 22px;
}

.ea-loader-bars span {
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, #6366f1, #22c55e);
  animation: ea-bar-wave 1.4s ease-in-out infinite;
}

.ea-loader-bars span:nth-child(2) { animation-delay: .15s; }
.ea-loader-bars span:nth-child(3) { animation-delay: .3s; }
.ea-loader-bars span:nth-child(4) { animation-delay: .45s; }
.ea-loader-bars span:nth-child(5) { animation-delay: .6s; }

.ea-loader-text {
  font-size: 13px;
  color: #475569;
  letter-spacing: .4px;
}
