/* ============================================================
   RSS FEED PAGE — Reader with Sidebar Filters
   ============================================================ */

/* --- Layout --- */
.rss-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: var(--space-xl);
    align-items: start;
}

/* --- Sidebar --- */
.sidebar {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-lg));
    max-height: calc(100vh - var(--nav-height) - var(--space-2xl));
    overflow-y: auto;
    padding-right: var(--space-sm);
}

.sidebar__section {
    margin-bottom: var(--space-xl);
}

.sidebar__title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: left;
    transition: all var(--duration) var(--ease);
    width: 100%;
}

.filter-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.filter-btn--active {
    background: var(--accent-soft);
    color: var(--accent);
}

.filter-btn__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: var(--space-sm);
}

.filter-btn__label {
    flex: 1;
    display: flex;
    align-items: center;
}

.filter-btn__dot--deep-green { background: var(--deep-green); }
.filter-btn__dot--green { background: var(--green); }
.filter-btn__dot--neutral { background: var(--neutral); }
.filter-btn__dot--blue { background: var(--blue); }
.filter-btn__dot--deep-blue { background: var(--deep-blue); }

.filter-clear {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.8rem;
    cursor: pointer;
    padding: var(--space-xs) 0;
    margin-top: var(--space-sm);
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.filter-clear--visible { opacity: 1; }

/* --- Mobile filter toggle --- */
.filter-toggle-mobile {
    display: none;
    position: sticky;
    top: var(--nav-height);
    z-index: 50;
    padding: var(--space-sm) 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--space-md);
}

/* --- Article Feed --- */
.article-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* --- Article Card --- */
.article-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--duration) var(--ease);
}

.article-card:hover {
    border-color: var(--border-default);
    background: var(--bg-card-hover);
}

.article-card--with-image {
    grid-template-columns: 200px 1fr;
}

.article-card__image {
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
}

.article-card__content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.article-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.article-card__source {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.article-card__category {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--bg-elevated);
    border-radius: 100px;
    color: var(--text-muted);
}

.article-card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.35;
    transition: color var(--duration) var(--ease);
}

.article-card__title:hover { color: var(--accent); }

.article-card__description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: auto;
}

/* --- Search bar for RSS page --- */
.rss-search {
    margin-bottom: var(--space-lg);
}

.rss-search .form-input {
    background: var(--bg-card);
    border-color: var(--border-subtle);
    padding: 12px 16px 12px 44px;
    font-size: 0.9rem;
    background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%236b6780' stroke-width='2'/%3E%3Cpath d='M16 16L20 20' stroke='%236b6780' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

/* --- Mobile --- */
@media (max-width: 900px) {
    .rss-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        max-height: none;
        display: none;
    }

    .sidebar--mobile-open {
        display: block;
        background: var(--bg-secondary);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }

    .filter-toggle-mobile { display: block; }

    .article-card--with-image {
        grid-template-columns: 1fr;
    }

    .article-card__image {
        height: 180px;
        min-height: auto;
    }
}
/* ============================================================
   RSS FEED — Additional styles for AJAX-based feed
   APPEND these to the bottom of your existing rss.css
   ============================================================ */

/* --- Feed status bar --- */
.feed-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding: var(--space-sm) 0 var(--space-md);
    letter-spacing: 0.02em;
}

/* --- Feed messages (loading, empty, end) --- */
.feed-message {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    color: var(--text-muted);
    font-size: 0.85rem;
}

@keyframes pulse-load {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

#feedLoading p,
#feedLoadingMore p {
    animation: pulse-load 1.5s ease-in-out infinite;
}

#feedEnd p {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
