/* ===== SKELETON LOADING SHIMMER =====
 * Applied by js/skeleton.js while images and videos are loading.
 * Respects both light and dark themes via CSS variables.
 * ===================================== */

:root {
  --skeleton-base:      #e4eaf4;
  --skeleton-highlight: #f2f6fc;
}

[data-theme="dark"] {
  --skeleton-base:      #162430;
  --skeleton-highlight: #1e3040;
}

@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Container state while loading */
.skeleton-loading {
  position: relative;
  overflow: hidden;
}

/* Shimmer overlay */
.skeleton-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 20;
  background: linear-gradient(
    90deg,
    var(--skeleton-base)      25%,
    var(--skeleton-highlight) 50%,
    var(--skeleton-base)      75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  pointer-events: none;
}

/* Match the rounded corners of .works and .videoz (border-radius: 24px) */
a.skeleton-loading::after {
  border-radius: 24px;
}

/* Match the rounded corners of .slide-inner (border-radius: 32px / 24px at ≤1024px) */
.slide-inner.skeleton-loading::after {
  border-radius: 32px;
}

@media screen and (max-width: 1024px) {
  .slide-inner.skeleton-loading::after {
    border-radius: 24px;
  }
}

/* ── Text content containers ────────────────────────────────────────────────
 * Triggered by js/skeleton.js while custom fonts are loading (document.fonts.ready).
 * border-radius: inherit picks up each element's own value automatically:
 *   .procov → 12px   .cover → 32px
 * ─────────────────────────────────────────────────────────────────────────── */
.procov.skeleton-loading::after,
.cover.skeleton-loading::after {
  border-radius: inherit;
  z-index: 1; /* sits above text, below any overlaid UI */
}
