/**
 * Reusable Shimmer Loading Animation Module
 * Can be used across different pages and components
 */

/* Core Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Base Shimmer Class - Light Theme */
.shimmer {
    animation: shimmer 1.5s ease-in-out infinite;
    background: linear-gradient(to right, #f8f9fa 0%, #e9ecef 20%, #f8f9fa 40%, #f8f9fa 100%);
    background-size: 800px 104px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    display: inline-block;
}

/* Shimmer Container */
.shimmer-container {
    width: 100%;
}

/* Generic Shimmer Elements */
.shimmer-line {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.shimmer-line.short { width: 70%; }
.shimmer-line.medium { width: 85%; }
.shimmer-line.long { width: 100%; }

.shimmer-title {
    height: 24px;
    width: 80%;
    margin-bottom: 12px;
}

.shimmer-subtitle {
    height: 20px;
    width: 60%;
    margin-bottom: 10px;
}

.shimmer-text {
    height: 14px;
    width: 100%;
    margin-bottom: 6px;
}

.shimmer-button {
    height: 40px;
    width: 120px;
    border-radius: 6px;
    margin: 8px 0;
}

.shimmer-input {
    height: 45px;
    width: 100%;
    border-radius: 6px;
    margin-bottom: 15px;
}

.shimmer-avatar {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.shimmer-image {
    height: 200px;
    width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.shimmer-badge {
    height: 20px;
    width: 60px;
    border-radius: 10px;
    margin: 4px 8px 4px 0;
    display: inline-block;
}

/* Card Components */
.shimmer-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    padding: 0;
}

.shimmer-card-image {
    height: 200px;
    width: 100%;
    border-radius: 12px 12px 0 0;
}

.shimmer-card-content {
    padding: 1.5rem;
}

.shimmer-card-title {
    height: 22px;
    width: 90%;
    margin-bottom: 10px;
}

.shimmer-card-meta {
    height: 14px;
    width: 60%;
    margin-bottom: 12px;
}

.shimmer-card-text {
    height: 12px;
    width: 100%;
    margin-bottom: 6px;
}

.shimmer-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* List Components */
.shimmer-list-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.shimmer-list-item:last-child {
    border-bottom: none;
}

.shimmer-list-content {
    flex: 1;
    margin-left: 12px;
}

.shimmer-list-title {
    height: 18px;
    width: 80%;
    margin-bottom: 6px;
}

.shimmer-list-subtitle {
    height: 14px;
    width: 60%;
}

/* Table Components */
.shimmer-table {
    width: 100%;
    border-collapse: collapse;
}

.shimmer-table-row {
    border-bottom: 1px solid #f0f0f0;
}

.shimmer-table-cell {
    padding: 12px;
    vertical-align: top;
}

.shimmer-table-header {
    height: 20px;
    width: 80%;
}

.shimmer-table-data {
    height: 16px;
    width: 90%;
}

/* Form Components */
.shimmer-form-group {
    margin-bottom: 20px;
}

.shimmer-label {
    height: 16px;
    width: 30%;
    margin-bottom: 8px;
}

.shimmer-select {
    height: 40px;
    width: 100%;
    border-radius: 6px;
}

.shimmer-textarea {
    height: 80px;
    width: 100%;
    border-radius: 6px;
}

/* Navigation Components */
.shimmer-nav-item {
    height: 35px;
    width: 80px;
    margin-right: 20px;
    border-radius: 18px;
    display: inline-block;
}

.shimmer-breadcrumb {
    height: 16px;
    width: 200px;
    margin-bottom: 10px;
}

/* News/Article Specific Components */
.shimmer-news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.shimmer-news-image {
    height: 200px;
    width: 100%;
    border-radius: 12px 12px 0 0;
}

.shimmer-news-content {
    padding: 1.5rem;
}

.shimmer-news-title {
    height: 20px;
    width: 100%;
    margin-bottom: 8px;
}

.shimmer-news-title.short { width: 80%; }

.shimmer-news-meta {
    height: 14px;
    width: 60%;
    margin-bottom: 12px;
}

.shimmer-news-text {
    height: 12px;
    width: 100%;
    margin-bottom: 6px;
}

.shimmer-news-text.medium { width: 85%; }
.shimmer-news-text.short { width: 70%; }

.shimmer-news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.shimmer-news-tags {
    display: flex;
    gap: 8px;
}

.shimmer-news-tag {
    height: 18px;
    width: 50px;
    border-radius: 9px;
}

.shimmer-news-stats {
    display: flex;
    gap: 15px;
}

.shimmer-news-stat {
    height: 16px;
    width: 35px;
}

/* Article Detail Components */
.shimmer-article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.shimmer-article-back {
    height: 35px;
    width: 100px;
    margin-bottom: 20px;
    border-radius: 18px;
}

.shimmer-article-title {
    height: 32px;
    width: 90%;
    margin-bottom: 15px;
}

.shimmer-article-subtitle {
    height: 18px;
    width: 75%;
    margin-bottom: 20px;
}

.shimmer-article-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.shimmer-article-meta {
    height: 16px;
    width: 180px;
}

.shimmer-article-social {
    height: 35px;
    width: 200px;
}

.shimmer-article-image {
    height: 300px;
    width: 100%;
    margin: 20px 0;
    border-radius: 12px;
}

.shimmer-article-content-block {
    height: 100px;
    width: 100%;
    margin: 20px 0;
    border-radius: 8px;
}

.shimmer-article-paragraph {
    margin-bottom: 15px;
}

.shimmer-article-paragraph .shimmer {
    margin-bottom: 8px;
}

/* Newsletter Components */
.shimmer-newsletter {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 20px 0;
}

.shimmer-newsletter-title {
    height: 26px;
    width: 70%;
    margin: 0 auto 15px;
}

.shimmer-newsletter-text {
    height: 14px;
    width: 80%;
    margin: 0 auto 20px;
}

.shimmer-newsletter-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.shimmer-newsletter-input {
    height: 45px;
    width: 250px;
    border-radius: 6px;
}

.shimmer-newsletter-button {
    height: 45px;
    width: 120px;
    border-radius: 6px;
}

/* Search and Filter Components */
.shimmer-search-bar {
    height: 45px;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
}

.shimmer-filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.shimmer-filter-info {
    height: 16px;
    width: 150px;
}

.shimmer-filter-select {
    height: 35px;
    width: 120px;
    border-radius: 6px;
}

.shimmer-tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shimmer-tab {
    height: 32px;
    width: 75px;
    border-radius: 16px;
}

/* Related Content Components */
.shimmer-related-container {
    display: flex;
    gap: 20px;
    overflow-x: hidden;
    padding: 20px 0;
}

.shimmer-related-item {
    width: 250px;
    height: 180px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Profile Components */
.shimmer-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.shimmer-profile-avatar {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    margin-right: 20px;
}

.shimmer-profile-info {
    flex: 1;
}

.shimmer-profile-name {
    height: 24px;
    width: 200px;
    margin-bottom: 8px;
}

.shimmer-profile-bio {
    height: 16px;
    width: 300px;
}

/* Grid Layouts */
.shimmer-grid {
    display: grid;
    gap: 20px;
}

.shimmer-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shimmer-grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.shimmer-grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Responsive Design */
@media (max-width: 768px) {
    .shimmer-card-content,
    .shimmer-news-content {
        padding: 1rem;
    }
    
    .shimmer-card-image,
    .shimmer-news-image {
        height: 150px;
    }
    
    .shimmer-article-container {
        padding: 1rem;
    }
    
    .shimmer-article-image {
        height: 200px;
    }
    
    .shimmer-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shimmer-newsletter-form {
        flex-direction: column;
    }
    
    .shimmer-newsletter-input {
        width: 100%;
    }
    
    .shimmer-tabs-container {
        justify-content: center;
    }
    
    .shimmer-tab {
        width: 65px;
        height: 28px;
    }
    
    .shimmer-related-item {
        width: 200px;
        height: 150px;
    }
}

@media (max-width: 576px) {
    .shimmer-card-image,
    .shimmer-news-image {
        height: 120px;
    }
    
    .shimmer-card-content,
    .shimmer-news-content {
        padding: 0.8rem;
    }
    
    .shimmer-article-image {
        height: 160px;
    }
    
    .shimmer-related-item {
        width: 180px;
        height: 130px;
    }
    
    .shimmer-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .shimmer-profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .shimmer {
        animation: none;
        background: #f0f0f0;
    }
}

/* Force Light Theme - Dark mode support removed */
.shimmer-card,
.shimmer-news-card {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.shimmer-newsletter {
    background: #f8f9fa !important;
}

.shimmer {
    background: linear-gradient(to right, #f8f9fa 0%, #e9ecef 20%, #f8f9fa 40%, #f8f9fa 100%) !important;
}