/* ================================================
   ALIDADE Skeleton Loading System
   OBSIDIAN-native placeholder shapes for module mount()
   ================================================ */

/* ---- Base shimmer animation ---- */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ---- Core skeleton block ---- */
.skel {
    background: linear-gradient(90deg,
            var(--obsidian-raised, #18181B) 25%,
            var(--obsidian-border, #27272A) 50%,
            var(--obsidian-raised, #18181B) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: 4px;
    pointer-events: none;
    user-select: none;
}

/* ---- Anti-flicker gate (120ms) ---- */
.skel-root {
    opacity: 0;
    animation: skel-reveal 0s 120ms forwards;
}

@keyframes skel-reveal {
    to {
        opacity: 1;
    }
}

/* ---- Variants ---- */
.skel-text {
    height: 12px;
    width: 60%;
    margin-bottom: 8px;
}

.skel-text-sm {
    height: 10px;
    width: 40%;
    margin-bottom: 6px;
}

.skel-text-lg {
    height: 16px;
    width: 80%;
    margin-bottom: 10px;
}

.skel-heading {
    height: 20px;
    width: 50%;
    margin-bottom: 14px;
}

.skel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skel-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.skel-btn {
    height: 36px;
    width: 100%;
    border-radius: 6px;
}

.skel-badge {
    height: 20px;
    width: 64px;
    border-radius: 999px;
}

.skel-img {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
}

/* ---- Card skeleton ---- */
.skel-card {
    background: var(--obsidian-surface, #111113);
    border: 1px solid var(--obsidian-border, #27272A);
    border-radius: 8px;
    padding: 14px;
}

/* ---- List skeleton ---- */
.skel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

/* ---- Reduced motion: no shimmer ---- */
@media (prefers-reduced-motion: reduce) {
    .skel {
        animation: none;
        background: var(--obsidian-raised, #18181B);
    }

    .skel-root {
        opacity: 1;
        animation: none;
    }
}