/**
 * Skeleton loading placeholders used by pages that defer their heavy DB
 * queries to a follow-up AJAX fetch (see /js/skeleton-loader.js).
 */

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

@keyframes skeleton-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

[data-skeleton-loader] {
    animation: skeleton-fade-in .25s ease-out;
}

.skeleton-line,
.skeleton-card,
.skeleton-row,
.skeleton-chart,
.skeleton-circle {
    position: relative;
    overflow: hidden;
    background-color: #edeff2;
    border-radius: 8px;
}

.skeleton-line::after,
.skeleton-card::after,
.skeleton-row::after,
.skeleton-chart::after,
.skeleton-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, .55) 25%,
        rgba(255, 255, 255, .85) 50%,
        rgba(255, 255, 255, .55) 75%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

[data-pc-theme=dark] .skeleton-line,
[data-pc-theme=dark] .skeleton-card,
[data-pc-theme=dark] .skeleton-row,
[data-pc-theme=dark] .skeleton-chart,
[data-pc-theme=dark] .skeleton-circle {
    background-color: #263240;
}

[data-pc-theme=dark] .skeleton-line::after,
[data-pc-theme=dark] .skeleton-card::after,
[data-pc-theme=dark] .skeleton-row::after,
[data-pc-theme=dark] .skeleton-chart::after,
[data-pc-theme=dark] .skeleton-circle::after {
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, .06) 25%,
        rgba(255, 255, 255, .12) 50%,
        rgba(255, 255, 255, .06) 75%,
        rgba(255, 255, 255, 0) 100%
    );
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    width: 100%;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 65%;
}

.skeleton-card {
    height: 90px;
    width: 100%;
    margin-bottom: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.skeleton-chart {
    height: 260px;
    width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
}

.skeleton-circle {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    display: inline-block;
}

.skeleton-row {
    height: 20px;
    margin-bottom: 14px;
    width: 100%;
    border-radius: 6px;
}

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

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

.skeleton-table td {
    padding: 10px 8px;
}
