/* Skeleton Loading States - Professional Shimmer Effect */

/* Base skeleton element */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #f8f8f8 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

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

/* Dark mode skeleton (for dark backgrounds) */
.skeleton.dark {
    background: linear-gradient(
        90deg,
        #2a2a2a 0%,
        #3a3a3a 20%,
        #2a2a2a 40%,
        #2a2a2a 100%
    );
    background-size: 200% 100%;
}

/* Skeleton shapes */
.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 3px;
}

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

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

.skeleton-heading {
    height: 28px;
    width: 60%;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-card {
    height: 120px;
    border-radius: 8px;
    padding: 20px;
}

.skeleton-kpi {
    height: 140px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    padding: 20px;
}

.skeleton-list-item {
    height: 60px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e0e0e0;
}

.skeleton-column-tile {
    height: 80px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: white;
    border-left: 4px solid #1565c0;
    padding: 15px;
}

.skeleton-chart {
    height: 300px;
    border-radius: 8px;
}

/* Dashboard-specific skeletons */
.skeleton-dashboard-module {
    min-height: 200px;
    padding: 24px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* KPI Grid Skeleton */
.skeleton-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.skeleton-kpi-grid .skeleton-kpi {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-kpi-value {
    width: 80%;
    height: 32px;
    margin-top: 8px;
}

.skeleton-kpi-label {
    width: 60%;
    height: 14px;
}

/* Column List Skeleton */
.skeleton-column-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.skeleton-column-tile .skeleton-column-header {
    width: 70%;
    height: 18px;
    margin-bottom: 8px;
}

.skeleton-column-tile .skeleton-column-badges {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

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

/* Table Skeleton */
.skeleton-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.skeleton-table-row {
    height: 50px;
    background: white;
    border-radius: 4px;
}

.skeleton-table-cell {
    padding: 12px;
}

.skeleton-table-cell .skeleton {
    height: 14px;
    width: 80%;
}

/* Loading Container Overlay */
.loading-container {
    position: relative;
    min-height: 100px;
}

.loading-container.is-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

/* Utility classes */
.skeleton-w-full {
    width: 100%;
}

.skeleton-w-75 {
    width: 75%;
}

.skeleton-w-50 {
    width: 50%;
}

.skeleton-w-25 {
    width: 25%;
}

.skeleton-h-4 {
    height: 16px;
}

.skeleton-h-8 {
    height: 32px;
}

.skeleton-h-12 {
    height: 48px;
}

.skeleton-mb-2 {
    margin-bottom: 8px;
}

.skeleton-mb-4 {
    margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skeleton-kpi-grid {
        grid-template-columns: 1fr;
    }

    .skeleton-dashboard-module {
        min-height: 150px;
        padding: 16px;
    }
}

/* Hide skeleton on print */
@media print {
    .skeleton,
    .skeleton-container {
        display: none !important;
    }
}
