/* Skeleton Loading Styles */
.skeleton-content {
  min-height: 100vh;
}

.content-loaded {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* Article-specific skeleton optimizations */
.article-skeleton-content {
  min-height: 100vh;
  background: white;
}

/* Optimized skeleton animation for articles */
.article-skeleton-content .animate-pulse {
  animation: skeleton-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Faster skeleton loading for article pages */
.article-skeleton-content .skeleton-content {
  padding-top: 0;
}

/* Skeleton animation */
@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Optimized skeleton animation for faster perceived performance */
.skeleton-content .animate-pulse {
  animation: skeleton-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse {
    animation: none;
  }

  .skeleton-content .animate-pulse {
    animation: none;
  }
}

/* Skeleton background colors */
.bg-gray-200 {
  background-color: #e5e7eb;
}

/* Responsive skeleton adjustments */
@media (max-width: 768px) {
  .skeleton-content {
    padding-top: 120px; /* Account for fixed header and tab bar */
  }
}

/* Dark mode support for skeleton */
/* @media (prefers-color-scheme: dark) {
  .bg-gray-200 {
    background-color: #374151;
  }

  .skeleton-content {
    background-color: #1f2937;
  }
} */

/* Skeleton loading states for different content types */
.skeleton-article {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.skeleton-sidebar-item {
  margin-bottom: 2rem;
}

.skeleton-tab {
  border-bottom: 2px solid transparent;
}

/* Skeleton loading for mobile optimization */
@media (max-width: 640px) {
  .skeleton-content .animate-pulse {
    animation-duration: 1.5s; /* Slightly faster on mobile */
  }
}

/* Skeleton loading accessibility */
.skeleton-content[aria-hidden="true"] {
  display: none;
}

/* Skeleton loading focus management */
.skeleton-content:focus {
  outline: none;
}

/* Skeleton loading for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse {
    animation: none;
  }

  .skeleton-content {
    opacity: 0.7;
  }
}
