/* ==========================================================================
   Custom Table & Dashboard Skeleton Loading Component (SPIL Design System)
   Ultra-modern, sleek, organic rounded aesthetics (Linear & Apple inspired)
   ========================================================================== */

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

.table-skeleton-row {
    pointer-events: none;
    user-select: none;
    background-color: #ffffff;
}

.table-skeleton-row td {
    padding: 14px 12px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f4f6f8 !important;
    border-bottom: 1px solid #f4f6f8 !important;
}

/* Base bone element with sleek pill-rounded shape and fluid diagonal shimmer */
.skeleton-bone {
    display: inline-block;
    height: 14px;
    border-radius: 20px; /* Full organic rounded pill - no stiffness */
    background: linear-gradient(110deg, #eaedf2 0%, #f6f8fb 32%, #ffffff 50%, #f6f8fb 68%, #eaedf2 100%);
    background-size: 250% 100%;
    animation: table-shimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Specialty shapes for action buttons / status badges */
.skeleton-bone.skeleton-badge {
    height: 20px;
    width: 65px;
    border-radius: 20px;
}

.skeleton-bone.skeleton-btn {
    height: 24px;
    width: 58px;
    border-radius: 20px;
    background: linear-gradient(110deg, #e2e7ee 0%, #f3f6fa 35%, #ffffff 50%, #f3f6fa 65%, #e2e7ee 100%);
    background-size: 250% 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.skeleton-bone.skeleton-circle {
    height: 26px;
    width: 26px;
    border-radius: 50%;
}

/* Metric cards / Dashboard counters skeleton (Glassmorphism Capsule Pill with Ambient Sheen) */
.skeleton-bone.skeleton-stat {
    height: 34px;
    width: 68px;
    border-radius: 20px; /* Modern sleek capsule / pill shape - eliminate boxy stiffness */
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.42) 35%, rgba(255, 255, 255, 0.75) 50%, rgba(255, 255, 255, 0.42) 65%, rgba(255, 255, 255, 0.16) 100%);
    background-size: 250% 100%;
    animation: table-shimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 2px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Card header count skeleton (Matching table skeleton grey shimmer) */
.skeleton-bone.skeleton-card-count {
    height: 18px;
    width: 42px;
    border-radius: 9px;
    background: linear-gradient(110deg, #d8dee8 0%, #eef2f7 32%, #ffffff 50%, #eef2f7 68%, #d8dee8 100%);
    background-size: 250% 100%;
    animation: table-shimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    vertical-align: middle;
    border: 1px solid #ced5e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Card body amount skeleton (Matching table skeleton grey shimmer) */
.skeleton-bone.skeleton-card-amount {
    height: 20px;
    width: 130px;
    max-width: 85%;
    border-radius: 10px;
    background: linear-gradient(110deg, #eaedf2 0%, #f6f8fb 32%, #ffffff 50%, #f6f8fb 68%, #eaedf2 100%);
    background-size: 250% 100%;
    animation: table-shimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    vertical-align: middle;
    border: 1px solid #dbe2ec;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Staggered row animation delays for natural wave motion */
.table-skeleton-row:nth-child(1) .skeleton-bone { animation-delay: 0.0s; }
.table-skeleton-row:nth-child(2) .skeleton-bone { animation-delay: 0.12s; }
.table-skeleton-row:nth-child(3) .skeleton-bone { animation-delay: 0.24s; }
.table-skeleton-row:nth-child(4) .skeleton-bone { animation-delay: 0.36s; }
.table-skeleton-row:nth-child(5) .skeleton-bone { animation-delay: 0.48s; }
.table-skeleton-row:nth-child(6) .skeleton-bone { animation-delay: 0.60s; }
