/**
 * Skeleton Loading Styles
 * Provides loading placeholder animations for better UX
 */

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

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

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: #e8e8e8;
    }
    .dark .skeleton {
        background: #30363d;
    }
}

/* Dark mode skeleton */
.dark .skeleton {
    background: linear-gradient(90deg, #21262d 25%, #30363d 50%, #21262d 75%);
    background-size: 200% 100%;
}

/* Skeleton elements */
.skeleton-text {
    height: 16px;
}

.skeleton-text-sm {
    height: 12px;
}

.skeleton-text-lg {
    height: 24px;
}

.skeleton-title {
    height: 40px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.skeleton-btn {
    height: 40px;
    border-radius: 8px;
}

.skeleton-input {
    height: 56px;
    border-radius: 12px;
}

/* Skeleton card */
.skeleton-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.dark .skeleton-card {
    background: #161b22;
    border-color: #30363d;
}

/* Skeleton table row */
.skeleton-row {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.dark .skeleton-row {
    border-color: #30363d;
}

.skeleton-row:last-child {
    border-bottom: none;
}

/* Table-friendly skeleton bars */
.skeleton-line {
    height: 14px;
    border-radius: 8px;
}

.skeleton-line-lg {
    height: 18px;
    border-radius: 9px;
}

.skeleton-badge {
    height: 22px;
    border-radius: 9999px;
}

.skeleton-pill {
    height: 18px;
    border-radius: 9999px;
}

.skeleton-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.skeleton-progress-track {
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.dark .skeleton-progress-track {
    background-color: #30363d;
}

.skeleton-progress-fill {
    height: 100%;
    border-radius: inherit;
}

.skeleton-table {
    width: 100%;
    border-collapse: collapse;
}

.skeleton-table th,
.skeleton-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.skeleton-table tbody tr:last-child td {
    border-bottom: none;
}

.dark .skeleton-table th,
.dark .skeleton-table td {
    border-color: #30363d;
}


/* Skeleton stat card */
.skeleton-stat {
    text-align: center;
    padding: 24px;
}


/* Mobile responsive */
@media (max-width: 768px) {
    .skeleton-title {
        height: 32px;
    }
    
    .skeleton-row {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .skeleton-card {
        padding: 16px;
    }

    .skeleton-table th,
    .skeleton-table td {
        padding: 10px 12px;
    }
    
    .skeleton-stat {
        padding: 16px;
    }
}

