/**
 * ShipSupply System - Reusable Skeleton Loading System
 * CSS Light Weight & Shimmer Animation
 */

/* Baseline Skeleton Animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-box,
.skeleton-text,
.skeleton-title,
.skeleton-avatar,
.skeleton-image,
.skeleton-btn,
.skeleton-badge {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    user-select: none;
}

/* Primitives */
.skeleton-text {
    width: 100%;
    height: 0.85rem;
    margin-bottom: 0.4rem;
}

.skeleton-text.sm {
    height: 0.7rem;
}

.skeleton-text.lg {
    height: 1.1rem;
}

.skeleton-text.w-75 { width: 75% !important; }
.skeleton-text.w-50 { width: 50% !important; }
.skeleton-text.w-25 { width: 25% !important; }

.skeleton-title {
    width: 60%;
    height: 1.35rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
}

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

.skeleton-avatar.sm {
    width: 32px;
    height: 32px;
}

.skeleton-avatar.lg {
    width: 54px;
    height: 54px;
}

.skeleton-image {
    width: 100%;
    height: 180px;
    border-radius: 8px;
}

.skeleton-btn {
    width: 110px;
    height: 34px;
    border-radius: 6px;
}

.skeleton-badge {
    width: 80px;
    height: 22px;
    border-radius: 12px;
}

/* Component Level Skeletons */
/* 1. Skeleton Card Stat */
.skeleton-card-stat {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}

/* 2. Skeleton Table */
.skeleton-table-wrapper {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.skeleton-table-row {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    gap: 1rem;
}

.skeleton-table-row:last-child {
    border-bottom: none;
}

/* 3. Skeleton Notification Item */
.skeleton-notification-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.65rem;
}

/* 4. Skeleton Message Item */
.skeleton-message-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-width: 80%;
}

.skeleton-message-item.me {
    margin-left: auto;
    flex-direction: row-reverse;
}

.skeleton-message-bubble {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    width: 100%;
}

/* 5. Skeleton Detail Document Card */
.skeleton-detail-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

/* Empty & Error State Container Utility */
.state-container-custom {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.state-container-custom .state-icon {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.state-container-custom .state-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.state-container-custom .state-desc {
    color: #64748b;
    font-size: 0.83rem;
    max-width: 420px;
    margin: 0 auto 1rem auto;
}
