/**
 * Skeleton Loading Animations
 * Lightweight CSS-only loading indicators
 */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--am-border) 25%,
        var(--am-border-light) 50%,
        var(--am-border) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--am-radius-md);
    position: relative;
    overflow: hidden;
}

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

/* Skeleton variants */
.skeleton-text {
    height: var(--am-text-base);
    width: 100%;
    margin-bottom: var(--am-space-sm);
}

.skeleton-text-short {
    height: var(--am-text-base);
    width: 60%;
    margin-bottom: var(--am-space-sm);
}

.skeleton-title {
    height: var(--am-text-xl);
    width: 40%;
    margin-bottom: var(--am-space-md);
}

.skeleton-card {
    height: 120px;
    width: 100%;
    margin-bottom: var(--am-space-md);
}

.skeleton-avatar {
    height: 48px;
    width: 48px;
    border-radius: var(--am-radius-full);
}

.skeleton-button {
    height: 36px;
    width: 120px;
    border-radius: var(--am-radius-md);
}

/* Skeleton table row */
.skeleton-table-row {
    display: flex;
    gap: var(--am-space-md);
    padding: var(--am-space-md) 0;
    border-bottom: 1px solid var(--am-border);
}

.skeleton-table-row .skeleton {
    flex: 1;
    height: 20px;
}

/* Pulse animation (alternative to shimmer) */
.skeleton-pulse {
    animation: skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Usage example in HTML:
<div class="skeleton skeleton-card"></div>
<div class="skeleton skeleton-title"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text-short"></div>
*/
