/**
 * Finance Hub — News Component Styles (light theme, aligned with style.css)
 */

#news-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 0.5rem;
}

.news-card {
    background-color: #ffffff;
    border-radius: var(--radius, 10px);
    box-shadow: var(--shadow, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05));
    margin-bottom: 1rem;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    color: var(--text-color, #1f2937);
    border: 1px solid var(--border-color, #e5e7eb);
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
    border-color: rgba(37, 99, 235, 0.25);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.news-meta {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--light-text, #4b5563);
}

.news-source {
    font-weight: 600;
    margin-right: 0.5rem;
    color: var(--text-color, #1f2937);
}

.news-date {
    position: relative;
    padding-left: 0.5rem;
}

.news-date::before {
    content: '•';
    position: absolute;
    left: 0.1rem;
}

.news-sentiment {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.news-sentiment.positive {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.news-sentiment.negative {
    background-color: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.news-sentiment.neutral {
    background-color: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    line-height: 1.4;
    color: var(--text-color, #1f2937);
}

.news-summary {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--light-text, #4b5563);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.5em;
}

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

.news-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.news-categories .badge {
    font-size: 0.7rem;
    background-color: #f3f4f6;
    color: var(--light-text, #4b5563);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.read-more {
    font-size: 0.8rem;
    color: var(--primary-color, #2563eb);
    display: flex;
    align-items: center;
    text-decoration: none;
}

#news-modal .modal-content {
    background-color: #ffffff;
    color: var(--text-color, #1f2937);
    border: 1px solid var(--border-color, #e5e7eb);
}

#news-modal .modal-header {
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    background-color: #f9fafb;
}

#news-modal .modal-footer {
    border-top: 1px solid var(--border-color, #e5e7eb);
    background-color: #f9fafb;
}

#news-modal .modal-title {
    font-weight: 700;
    color: var(--text-color, #1f2937);
}

#news-modal .news-article-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding-bottom: 1rem;
}

#news-modal .news-meta {
    font-size: 0.9rem;
    color: var(--light-text, #4b5563);
    margin-bottom: 0.5rem;
}

#news-modal .impact-score-badge {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    margin: 1rem 0;
    background-color: #f3f4f6;
}

#news-modal .impact-score-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.5rem;
    color: var(--light-text, #4b5563);
}

#news-modal .impact-score-value.positive { color: #059669; }
#news-modal .impact-score-value.negative { color: #dc2626; }
#news-modal .impact-score-value.neutral { color: #6b7280; }

#news-modal .news-summary {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color, #2563eb);
    color: var(--text-color, #1f2937);
}

#news-modal .news-content {
    line-height: 1.6;
    font-size: 1rem;
    color: var(--text-color, #1f2937);
}

#news-modal #news-image-caption {
    font-size: 0.8rem;
    color: var(--light-text, #4b5563);
    text-align: center;
}

#news-modal .company-card {
    background-color: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #e5e7eb);
}

#news-modal .company-card:hover {
    background-color: #f3f4f6;
    cursor: pointer;
    border-color: rgba(37, 99, 235, 0.3);
}

.news-notification {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filters-container .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
    .news-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-sentiment {
        margin-top: 0.5rem;
    }

    .news-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .read-more {
        margin-top: 0.5rem;
    }

    .filters-container {
        justify-content: center;
    }
}
