/**
 * Skeleton Loader Styles
 * Animated loading placeholders
 */

/* Base Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

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

/* Recipe Card Skeleton */
.skeleton-recipe-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-image {
  width: 100%;
  height: 200px;
  border-radius: 0;
}

.skeleton-content {
  padding: 20px;
}

.skeleton-title {
  height: 24px;
  margin-bottom: 16px;
  width: 80%;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 12px;
  width: 100%;
}

.skeleton-text-short {
  width: 60%;
}

.skeleton-text-xs {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.skeleton-tag {
  height: 24px;
  width: 60px;
  border-radius: 12px;
}

/* Recipe Grid Skeleton */
.skeleton-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px;
}

/* List Item Skeleton */
.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-list-content {
  flex: 1;
}

.skeleton-title-small {
  height: 18px;
  width: 70%;
  margin-bottom: 8px;
}

/* Text Block Skeleton */
.skeleton-text-block {
  padding: 20px;
}

.skeleton-text-block .skeleton-text {
  margin-bottom: 16px;
}

/* Meal Plan Card Skeleton */
.skeleton-meal-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-meal-header {
  height: 20px;
  width: 40%;
  margin-bottom: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .skeleton-recipe-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .skeleton-image {
    height: 160px;
  }

  .skeleton-content {
    padding: 16px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: #f0f0f0;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #1a1a1a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
  }

  .skeleton-recipe-card,
  .skeleton-list-item,
  .skeleton-meal-card {
    background: #1e1e1e;
  }
}
