/**
 * High-Performance Skeleton Loading Stylesheet
 *
 * @package mi-theme
 * @version 1.0.0
 */

.skeleton-shim {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-light, #f1f5f9);
    border-radius: 4px;
    width: 100%;
}

.skeleton-shim::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.6) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: skeletonShimmerAnimation 1.6s infinite;
    content: "";
}

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

.skeleton-text-heading {
    height: var(--text-xl);
    margin-bottom: var(--space-3);
    width: 60%;
}

.skeleton-text-body {
    height: var(--text-base);
    margin-bottom: var(--space-2);
}

.skeleton-text-body.short {
    width: 40%;
}

@keyframes skeletonShimmerAnimation {
    100% {
        transform: translateX(100%);
    }
}

/* ─── Skeleton Loader Component Styles ────── */
.skeletons-wrapper-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.skeleton-card {
    background-color: var(--color-surface-1);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.skeleton-card-media {
    aspect-ratio: 16 / 9;
    width: 100%;
    background-color: var(--color-border-light);
}

.skeleton-card-body {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.skeleton-bar {
    background-color: var(--color-border-light);
    border-radius: var(--radius-sm);
}

.skeleton-bar.title {
    height: 16px;
    width: 65%;
    margin-bottom: var(--space-3);
}

.skeleton-bar.line-full {
    height: 12px;
    width: 100%;
    margin-bottom: var(--space-2);
}

.skeleton-bar.line-half {
    height: 12px;
    width: 50%;
    margin-bottom: var(--space-4);
}

.skeleton-bar.button {
    height: 32px;
    width: 35%;
    margin-top: auto;
}

.skeleton-map-box {
    height: 200px;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background-color: var(--color-border-light);
}

.skeleton-comments-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--space-3);
}

.skeleton-comment-item {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    background-color: var(--color-surface-1);
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-3);
}

.skeleton-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

