/* Loading state - skeleton shimmer effect */
.reader-loading {
    padding: 24px;
    min-height: calc(100vh - 60px); /* Full height minus bottom bar */
}

.skeleton-article {
    max-width: 700px;
    margin: 0 auto;
}

.skeleton-header {
    display: flex;
    align-items: center;
    padding-bottom: 12px;
    gap: 16px;
}

.skeleton-title {
    margin-bottom: 24px;
}

.skeleton-content {
    margin-top: 24px;
}

.skeleton-line {
    height: 1rem;
    background: linear-gradient(
        90deg,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 0%,
        var(--skeleton-highlight, rgba(0, 0, 0, 0.12)) 50%,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 100%
    );
    background-size: 200% 100%;
    border-radius: 24px;
    margin-bottom: 0.75rem;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    width: 100%;
}

.skeleton-line-small {
    width: 30%;
    height: 0.875rem;
    flex-shrink: 0;
}

.skeleton-header .skeleton-line-small:first-child {
    width: 40%;
}

.skeleton-header .skeleton-line-small:last-child {
    width: 25%;
}

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

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

.skeleton-line-title {
    height: 1.5rem;
    margin-bottom: 0.875rem;
    width: 100%;
}

.skeleton-line-title:last-child {
    width: 85%;
}

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

/* Dark mode support for skeleton */
@media (prefers-color-scheme: dark) {
    .skeleton-line {
        background: linear-gradient(
            90deg,
            var(--skeleton-base, rgba(255, 255, 255, 0.08)) 0%,
            var(--skeleton-highlight, rgba(255, 255, 255, 0.12)) 50%,
            var(--skeleton-base, rgba(255, 255, 255, 0.08)) 100%
        );
        background-size: 200% 100%;
    }
}

/* News card skeleton - uses same structure as real news-card */
.skeleton-news-card {
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    min-width: 0;
}

.skeleton-news-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1rem;
    flex-shrink: 0;
}

.skeleton-favicon {
    width: 20px;
    height: 20px;
    border-radius: 40px;
    background: linear-gradient(
        90deg,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 0%,
        var(--skeleton-highlight, rgba(0, 0, 0, 0.12)) 50%,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.skeleton-source-name {
    width: 120px;
    height: 1rem;
    background: linear-gradient(
        90deg,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 0%,
        var(--skeleton-highlight, rgba(0, 0, 0, 0.12)) 50%,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-time-ago {
    width: 80px;
    height: 1rem;
    background: linear-gradient(
        90deg,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 0%,
        var(--skeleton-highlight, rgba(0, 0, 0, 0.12)) 50%,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-main-headline {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 1;
}

.skeleton-headline-line {
    height: 2.88rem; /* 2.4rem * 1.2 line-height */
    margin-bottom: 0.48rem; /* 0.4rem based on line-height spacing */
    width: 100%;
}

.skeleton-headline-line:last-child {
    margin-bottom: 0;
}

.skeleton-headline-short {
    width: 75%;
}

.skeleton-related-list {
    width: 100%;
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    padding: 0 24px;
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 200px);
}

.skeleton-related-item {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
}

.skeleton-related-publisher {
    width: 100px;
    height: 0.8rem;
    font-size: 0.8rem;
    margin-bottom: 8px;
    background: linear-gradient(
        90deg,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 0%,
        var(--skeleton-highlight, rgba(0, 0, 0, 0.12)) 50%,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-related-headline {
    width: 100%;
    height: 1.44rem; /* 1.2rem * 1.2 line-height */
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 0.24rem; /* Based on line-height spacing */
    background: linear-gradient(
        90deg,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 0%,
        var(--skeleton-highlight, rgba(0, 0, 0, 0.12)) 50%,
        var(--skeleton-base, rgba(0, 0, 0, 0.08)) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.skeleton-related-headline:last-child {
    margin-bottom: 0;
}

.skeleton-related-short {
    width: 65%;
}

/* Dark mode support for news skeleton */
@media (prefers-color-scheme: dark) {
    .skeleton-favicon,
    .skeleton-source-name,
    .skeleton-time-ago,
    .skeleton-related-publisher,
    .skeleton-related-headline {
        background: linear-gradient(
            90deg,
            var(--skeleton-base, rgba(255, 255, 255, 0.08)) 0%,
            var(--skeleton-highlight, rgba(255, 255, 255, 0.12)) 50%,
            var(--skeleton-base, rgba(255, 255, 255, 0.08)) 100%
        );
        background-size: 200% 100%;
    }
}

