/* Skeleton Loaders - Skeuomorphic Style */

@keyframes skeletonShimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton-loader {
  background: linear-gradient(145deg, #e8eaed, #ddd, #c0c4c8);
  border: 2px solid #b0b4b8;
  border-radius: 12px;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.skeleton-loader::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  background-size: 1000px 100%;
  animation: skeletonShimmer 1.5s infinite;
}

/* Skeleton Card */
.skeleton-card {
  background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
  border: 3px solid #c0c4c8;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 3px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.skeleton-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: skeletonShimmer 2s infinite;
}

/* Skeleton Text */
.skeleton-text {
  height: 16px;
  background: linear-gradient(145deg, #d0d4d8, #c0c4c8);
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #b0b4b8;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.skeleton-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.medium {
  width: 80%;
}

.skeleton-text.long {
  width: 100%;
}

/* Skeleton Avatar */
.skeleton-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d0d4d8, #c0c4c8);
  border: 2px solid #b0b4b8;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.skeleton-avatar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

/* Skeleton Button */
.skeleton-button {
  height: 40px;
  width: 120px;
  background: linear-gradient(145deg, #d0d4d8, #c0c4c8);
  border: 2px solid #b0b4b8;
  border-radius: 12px;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.skeleton-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

/* Skeleton Image */
.skeleton-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(145deg, #d0d4d8, #c0c4c8);
  border: 2px solid #b0b4b8;
  border-radius: 12px;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.skeleton-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: skeletonShimmer 1.5s infinite;
}

/* Skeleton Grid */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.skeleton-grid-item {
  background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
  border: 3px solid #c0c4c8;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 3px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.skeleton-grid-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: skeletonShimmer 2s infinite;
}

/* Fade in when content loads */
.skeleton-fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
