/* 
 * OriumAI Skeleton Loaders
 * Premium loading states for a high-end experience
 */

/* Base skeleton animation */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

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

.skeleton-pulse {
  background: #f0f0f0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* Dark theme skeleton */
.skeleton-dark {
  background: linear-gradient(
    90deg,
    #2a2a2a 25%,
    #3a3a3a 50%,
    #2a2a2a 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Text skeletons */
.skeleton-text {
  height: 16px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-text-sm {
  height: 12px;
  width: 60%;
  margin-bottom: 6px;
}

.skeleton-text-lg {
  height: 24px;
  width: 80%;
  margin-bottom: 12px;
}

.skeleton-title {
  height: 32px;
  width: 50%;
  margin-bottom: 16px;
}

/* Avatar/Circle skeletons */
.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.skeleton-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

/* Button skeletons */
.skeleton-button {
  height: 44px;
  width: 120px;
  border-radius: 12px;
}

.skeleton-button-full {
  height: 48px;
  width: 100%;
  border-radius: 12px;
}

/* Card skeletons */
.skeleton-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.skeleton-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.skeleton-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Score skeleton (for credit score displays) */
.skeleton-score {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto;
}

.skeleton-score-sm {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

/* Table skeletons */
.skeleton-table {
  width: 100%;
}

.skeleton-table-row {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.skeleton-table-cell {
  flex: 1;
  height: 16px;
}

.skeleton-table-cell-sm {
  flex: 0 0 80px;
  height: 16px;
}

/* Badge skeleton */
.skeleton-badge {
  height: 24px;
  width: 80px;
  border-radius: 20px;
}

/* Image skeleton */
.skeleton-image {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
}

.skeleton-image-square {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
}

/* Stat card skeleton */
.skeleton-stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.skeleton-stat-value {
  height: 40px;
  width: 60%;
  margin-bottom: 8px;
}

.skeleton-stat-label {
  height: 14px;
  width: 40%;
}

/* Dashboard specific skeletons */
.skeleton-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.skeleton-greeting {
  height: 32px;
  width: 200px;
  margin-bottom: 8px;
}

.skeleton-subtext {
  height: 16px;
  width: 150px;
}

/* Credit report skeleton */
.skeleton-credit-report {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.skeleton-bureaus {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}

.skeleton-bureau-score {
  text-align: center;
}

/* List item skeleton */
.skeleton-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

/* Navigation skeleton */
.skeleton-nav {
  display: flex;
  gap: 16px;
}

.skeleton-nav-item {
  height: 40px;
  width: 100px;
  border-radius: 8px;
}

/* Utility classes */
.skeleton-w-25 { width: 25% !important; }
.skeleton-w-50 { width: 50% !important; }
.skeleton-w-75 { width: 75% !important; }
.skeleton-w-100 { width: 100% !important; }

.skeleton-mb-0 { margin-bottom: 0 !important; }
.skeleton-mb-1 { margin-bottom: 4px !important; }
.skeleton-mb-2 { margin-bottom: 8px !important; }
.skeleton-mb-3 { margin-bottom: 16px !important; }
.skeleton-mb-4 { margin-bottom: 24px !important; }

/* Hide skeleton when content loads */
.skeleton-loaded .skeleton,
.skeleton-loaded .skeleton-pulse {
  display: none;
}

/* Show content when loaded */
.skeleton-content {
  display: none;
}

.skeleton-loaded .skeleton-content {
  display: block;
}

/* Common skeleton patterns */

/* Client card skeleton */
.skeleton-client-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.skeleton-client-card .skeleton-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skeleton-client-info {
  flex: 1;
}

/* Letter skeleton */
.skeleton-letter {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.skeleton-letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Responsive skeletons */
@media (max-width: 768px) {
  .skeleton-bureaus {
    flex-direction: column;
    gap: 16px;
  }
  
  .skeleton-stat-card {
    padding: 16px;
  }
  
  .skeleton-score {
    width: 100px;
    height: 100px;
  }
}
