/* Skeleton Loading States for Graph Containers */

.graph-skeleton {
    width: 100%;
    height: 300px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

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

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

.graph-skeleton::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    animation: skeleton-pulse 1.2s infinite;
}

.graph-skeleton-dark::before {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.graph-skeleton::after {
    content: 'Loading graph...';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.graph-skeleton-dark::after {
    color: #999;
}

/* Loading State Variations */
.graph-skeleton.chart-bars {
    background-image: 
        linear-gradient(90deg, transparent 20%, rgba(0,0,0,0.05) 25%, transparent 30%),
        linear-gradient(90deg, transparent 40%, rgba(0,0,0,0.05) 45%, transparent 50%),
        linear-gradient(90deg, transparent 60%, rgba(0,0,0,0.05) 65%, transparent 70%),
        linear-gradient(90deg, transparent 80%, rgba(0,0,0,0.05) 85%, transparent 90%);
}

.graph-skeleton.chart-line {
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(0,0,0,0.05) 50%, transparent 60%);
}

/* Container States */
.graph-container {
    position: relative;
    min-height: 300px;
    transition: all 0.3s ease;
}

.graph-container.loading {
    pointer-events: none;
}

.graph-container.loaded .graph-skeleton {
    display: none;
}

.graph-loading-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
    text-align: center;
}

.graph-loading-error-dark {
    background: #1a1a1a;
    border-color: #444;
    color: #aaa;
}

.retry-button {
    margin-top: 10px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.retry-button:hover {
    background: #0056b3;
}

.table-skeleton {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.table-skeleton-row {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    border-bottom: 1px solid #222;
}

.table-skeleton-row.header {
    background: #1e1e1e;
    margin-bottom: 2px;
    border-bottom: 2px solid #333;
}

.table-skeleton-cell {
    flex: 1;
    height: 14px;
    border-radius: 3px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.table-skeleton-row.header .table-skeleton-cell {
    height: 16px;
    opacity: 0.8;
}

.table-skeleton-cell:first-child {
    flex: 2;
}