/* BitForward News Feed Styles */

.news-feed-container {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-feed-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-feed-controls {
    display: flex;
    gap: 0.75rem;
}

.news-refresh-btn,
.news-filter-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.2s;
}

.news-refresh-btn:hover,
.news-filter-btn:hover {
    background: rgba(59, 130, 246, 0.2);
}

.news-refresh-btn svg,
.news-filter-btn svg {
    width: 1rem;
    height: 1rem;
}

.news-filter-dropdown {
    position: relative;
}

.news-filter-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    min-width: 180px;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.news-filter-option {
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.news-filter-option:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.news-filter-option.active {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    font-weight: 500;
}

.news-feed-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.news-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-item {
    display: flex;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.news-item-image {
    flex: 0 0 120px;
    height: 120px;
    overflow: hidden;
}

.news-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.news-source-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.news-source {
    color: #3b82f6;
    font-weight: 600;
}

.news-date {
    color: #64748b;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.news-summary {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0 0 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-topic-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    white-space: nowrap;
}

.news-read-more {
    font-size: 0.8rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.news-read-more:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.news-feed-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
    text-align: center;
}

.news-view-more {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.news-view-more:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #94a3b8;
}

.news-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid transparent;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.news-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #94a3b8;
    text-align: center;
    padding: 1rem;
}

.news-error svg {
    width: 2.5rem;
    height: 2.5rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.news-retry-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.news-retry-btn:hover {
    background: rgba(59, 130, 246, 0.2);
}

/* Responsive styles */
@media (max-width: 640px) {
    .news-item {
        flex-direction: column;
    }
    
    .news-item-image {
        flex: 0 0 140px;
        width: 100%;
    }
    
    .news-feed-header {
        padding: 0.75rem 1rem;
    }
    
    .section-title-sm {
        font-size: 1rem;
    }
}

/* Dark mode enhancements */
.dark-theme .news-feed-container {
    background: rgba(15, 23, 42, 0.8);
}

.dark-theme .news-item {
    background: rgba(30, 41, 59, 0.8);
}

/* Animation for new items */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.news-item-new {
    animation: fadeIn 0.5s ease-out;
}
