/* 
 * GLOBAL SKELETON LOADER SYSTEM
 * Standardized skeleton styles for VIPER CREW
 */

:root {
    --skeleton-base: #e1e4e8;
    --skeleton-highlight: #f0f2f5;
    --skeleton-base-dark: #2d313a;
    --skeleton-highlight-dark: #3a3f4b;
}

[data-bs-theme="dark"] {
    --skeleton-base: var(--skeleton-base-dark);
    --skeleton-highlight: var(--skeleton-highlight-dark);
}

/* Base Animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Base Class */
.skeleton {
    background-color: var(--skeleton-base);
    background-image: linear-gradient(90deg,
            var(--skeleton-base),
            var(--skeleton-highlight),
            var(--skeleton-base));
    background-size: 200px 100%;
    background-repeat: no-repeat;
    display: inline-block;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s infinite linear;
    color: transparent !important;
    cursor: default;
    pointer-events: none;
    user-select: none;
}

/* Shapes & Sizes */
.skeleton-text {
    height: 1em;
    width: 80%;
    margin-bottom: 0.25em;
    border-radius: 4px;
}

.skeleton-text.w-100 {
    width: 100%;
}

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

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

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

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-rect {
    display: block;
    width: 100%;
    height: 100%;
}

.skeleton-btn {
    height: 38px;
    width: 100px;
    border-radius: 6px;
}

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

/* Table Specific Helper */
/* Use this inside a <tr><td>...</td></tr> before data loads */
.skeleton-table-row td>div {
    height: 20px;
    width: 90%;
    background-color: var(--skeleton-base);
    background-image: linear-gradient(90deg,
            var(--skeleton-base),
            var(--skeleton-highlight),
            var(--skeleton-base));
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 4px;
}