/* ============================================================ */
/* AQUAQUEST — SKELETON LOADERS                                  */
/* Shimmer loading states for all pages                          */
/* ============================================================ */

/* ============================================================ */
/* 1. BASE SHIMMER ANIMATION                                     */
/* ============================================================ */
@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--pc-paper) 0%,
    var(--pc-border-light) 20%,
    var(--pc-paper) 40%,
    var(--pc-paper) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
  display: block;
  position: relative;
  overflow: hidden;
}

body.dark-mode .skeleton {
  background: linear-gradient(
    90deg,
    #1A120C 0%,
    #241A14 20%,
    #1A120C 40%,
    #1A120C 100%
  );
  background-size: 200% 100%;
}

/* ============================================================ */
/* 2. SKELETON SHAPES                                            */
/* ============================================================ */
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.skeleton-line.short  { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long   { width: 85%; }
.skeleton-line.full   { width: 100%; }

.skeleton-circle {
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-rect {
  border-radius: 12px;
}

.skeleton-pill {
  border-radius: 50px;
}

/* ============================================================ */
/* 3. SKELETON CARD WRAPPER                                      */
/* ============================================================ */
.skeleton-card {
  background: var(--pc-card);
  border-radius: var(--pc-radius);
  padding: var(--pc-card-padding);
  margin-bottom: 16px;
  border: 1px solid var(--pc-border-light);
  box-shadow: var(--pc-shadow-sm);
}

/* ============================================================ */
/* 4. HERO SKELETON (Home)                                       */
/* ============================================================ */
.skeleton-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.skeleton-hero-text {
  flex: 1;
  min-width: 0;
}

.skeleton-hero-image {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .skeleton-hero-image {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 480px) {
  .skeleton-hero-image {
    width: 90px;
    height: 90px;
  }
}

/* ============================================================ */
/* 5. LIST ITEM SKELETON (Observations, Sites)                   */
/* ============================================================ */
.skeleton-list-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--pc-card);
  border-radius: 16px;
  border: 1px solid var(--pc-border-light);
  margin-bottom: 10px;
  box-shadow: var(--pc-shadow-sm);
}

.skeleton-list-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

/* ============================================================ */
/* 6. POST SKELETON (Feed)                                       */
/* ============================================================ */
.skeleton-post {
  background: var(--pc-card);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--pc-border-light);
  box-shadow: var(--pc-shadow-sm);
}

.skeleton-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* ============================================================ */
/* 7. PAGE FADE-IN ON LOAD COMPLETE                              */
/* ============================================================ */
.skeleton-loaded {
  animation: skeletonFadeIn 0.35s ease;
}

@keyframes skeletonFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================ */
/* 8. REDUCED MOTION                                             */
/* ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation-duration: 2.5s;
  }
}