/* Skeleton Screen Styles */

/* Base skeleton styles */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.skeleton-rounded {
  border-radius: 8px;
}

.skeleton-animated {
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Text lines */
.skeleton-text-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-text-lines .skeleton {
  margin-bottom: 0.25rem;
}

.skeleton-text-lines .skeleton:last-child {
  width: 60% !important;
}

/* Card skeleton */
.skeleton-card {
  display: flex;
  flex-direction: column;
}

.skeleton-card .skeleton {
  margin-bottom: 1rem;
}

.skeleton-card .skeleton:last-child {
  margin-bottom: 0;
}

/* Table skeleton */
.skeleton-table {
  width: 100%;
}

.skeleton-table-header,
.skeleton-table-row {
  display: flex;
  gap: 1rem;
}

.skeleton-table-header .skeleton {
  height: 1.25rem;
}

.skeleton-table-row .skeleton {
  height: 1rem;
}

/* Form skeleton */
.skeleton-form {
  width: 100%;
}

.skeleton-form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.skeleton-form-field .skeleton:first-child {
  width: 30%;
  height: 0.875rem;
  margin-bottom: 0.5rem;
}

.skeleton-form-field .skeleton:last-child {
  width: 100%;
  height: 2.5rem;
}

/* List skeleton */
.skeleton-list {
  width: 100%;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.skeleton-list-item .skeleton {
  flex: 1;
}

.skeleton-list-item .skeleton:first-child {
  flex: 0 0 auto;
  border-radius: 50%;
}

/* Circle skeleton (for avatars) */
.skeleton[data-skeleton-type="circle"] {
  border-radius: 50%;
}

/* Button skeleton */
.skeleton[data-skeleton-type="button"] {
  border-radius: 6px;
  height: 2.5rem;
}

/* Image skeleton */
.skeleton[data-skeleton-type="image"] {
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}

/* Loading spinner */
.skeleton-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: skeleton-spin 0.6s linear infinite;
}

@keyframes skeleton-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Pulse animation variant */
.skeleton-pulse {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Fade in animation */
.skeleton-fade-in {
  animation: skeleton-fade-in 0.3s ease-in;
}

@keyframes skeleton-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .skeleton-table-header,
  .skeleton-table-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .skeleton-list-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

