/* Skeleton loading animations for better perceived performance */

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #EEEEEE;
    padding: 1rem;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-text {
    height: 14px;
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.skeleton-tag {
    height: 24px;
    width: 60px;
    border-radius: 12px;
}

.skeleton-button {
    height: 40px;
    width: 100%;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Progressive image wrapper */
.progressive-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.progressive-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.progressive-image-wrapper:not(.loaded) img {
    filter: blur(20px);
    transform: scale(1.1);
}

.progressive-image-wrapper.loaded img {
    filter: none;
    transform: scale(1);
}

/* Fade in animation for loaded content */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading state for tables and lists */
.skeleton-table-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.skeleton-table-cell {
    height: 16px;
    border-radius: 4px;
    flex: 1;
}

/* Brand logos skeleton */
.skeleton-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

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

.skeleton-brand-name {
    height: 16px;
    width: 80px;
    border-radius: 4px;
}
