/* ─────────────────────────────────────────────────────────────────────────────
   Page Loader
───────────────────────────────────────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.pl-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Spinning ring around icon ── */
.pl-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
}

.pl-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #1c3f2f;
  animation: pl-spin 0.9s linear infinite;
}

.pl-ring-outer {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid #eef7f1;
}

.pl-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1c3f2f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(28, 63, 47, 0.18);
}

/* ── Wordmark ── */
.pl-wordmark {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-top: -4px;
}

/* ── Animated progress bar ── */
.pl-progress {
  width: 100px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.pl-progress-fill {
  height: 100%;
  width: 40%;
  background: #1c3f2f;
  border-radius: 9999px;
  animation: pl-slide 1.1s ease-in-out infinite;
}

@keyframes pl-spin {
  to { transform: rotate(360deg); }
}

@keyframes pl-slide {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(400%);  }
}


/* ─────────────────────────────────────────────────────────────────────────────
   Image Skeleton Shimmer
   Applied via JS (.img-skel) while an img is still loading;
   removed automatically once the image fires its load event.
───────────────────────────────────────────────────────────────────────────── */
@keyframes skel-shimmer {
  0%   { background-position:  200% center; }
  100% { background-position: -200% center; }
}

.img-skel {
  background: linear-gradient(
    90deg,
    #f3f4f6 0%,
    #e5e7eb 40%,
    #f3f4f6 80%
  );
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
}

/* Ensure image pixels are invisible until loaded so the shimmer shows */
.img-skel-wrap {
  position: relative;
  overflow: hidden;
}

.img-skel-wrap img {
  transition: opacity 0.35s ease;
}

.img-skel-wrap img:not(.img-loaded) {
  opacity: 0;
}

.img-skel-wrap img.img-loaded {
  opacity: 1;
}
