/* ABOUTME: Skeleton loading components for professional page load experience
   ABOUTME: Provides animated placeholders that match real content dimensions */

/* ============================================
   SKELETON BASE STYLES
   ============================================ */

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

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

/* ============================================
   SKELETON COMPONENTS
   ============================================ */

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

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

.skeleton-text--lg {
    height: 20px;
    width: 80%;
}

.skeleton-text--xl {
    height: 28px;
    width: 70%;
}

/* Stat card skeleton */
.skeleton-stat {
    height: 100px;
    width: 100%;
    border-radius: 12px;
}

/* Table row skeleton */
.skeleton-table-row {
    height: 60px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 8px;
}

/* Card skeleton */
.skeleton-card {
    height: 200px;
    width: 100%;
    border-radius: 12px;
}

/* Avatar skeleton */
.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-avatar--lg {
    width: 60px;
    height: 60px;
}

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

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

/* ============================================
   SKELETON LAYOUTS
   ============================================ */

/* Job header skeleton */
.skeleton-job-header {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.skeleton-job-header__title {
    height: 32px;
    width: 60%;
    margin-bottom: 16px;
    border-radius: 6px;
}

.skeleton-job-header__meta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.skeleton-job-header__meta-item {
    height: 20px;
    width: 120px;
    border-radius: 4px;
}

/* Stats grid skeleton */
.skeleton-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Table skeleton */
.skeleton-table {
    background: white;
    border-radius: 12px;
    padding: 24px;
}

.skeleton-table__header {
    height: 24px;
    width: 200px;
    margin-bottom: 20px;
    border-radius: 4px;
}

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

/* ============================================
   FADE IN ANIMATION (when replacing skeletons)
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.2s ease-out forwards;
}

/* ============================================
   LOADING STATE UTILITIES
   ============================================ */

.loading-hidden {
    display: none !important;
}

.loading-visible {
    display: block !important;
}

/* Hide real content while loading */
[data-skeleton-target] {
    min-height: 20px; /* Prevent layout shift */
}

[data-skeleton-target].loading {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

[data-skeleton-target].loaded {
    opacity: 1;
    height: auto;
    animation: fadeIn 0.2s ease-out;
}
