/* ── NewsPanel ── */
.news-panel-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-primary, #1a1a2e);
    color: var(--text-primary, #e0e0e0);
}

/* ── Header ── */
.news-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
    flex-shrink: 0;
}

.news-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-panel-icon {
    font-size: 18px;
}

.news-panel-stock {
    font-weight: 700;
    font-size: 15px;
}

.news-panel-subtitle {
    color: var(--text-secondary, #888);
    font-size: 13px;
}

.news-panel-actions {
    display: flex;
    gap: 8px;
}

.news-panel-close-btn,
.news-panel-refresh-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #888);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.news-panel-close-btn:hover,
.news-panel-refresh-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary, #e0e0e0);
}

/* ── Body ── */
.news-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* ── Content ── */
.news-text {
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.6;
}

.news-spacer {
    height: 8px;
}

.news-panel-content {
    line-height: 1.7;
    font-size: 14px;
}

.news-section-title {
    margin: 16px 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #e0e0e0);
}

.news-item {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.04));
}

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

.news-bullet {
    color: var(--accent-color, #f97316);
    flex-shrink: 0;
    margin-top: 2px;
}

.news-item-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.news-item-text strong {
    color: var(--text-primary, #e0e0e0);
}

/* ── Citations ── */
.news-citations {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.08));
}

.news-citations-title {
    font-size: 12px;
    color: var(--text-tertiary, #666);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-citation-link {
    display: inline-block;
    font-size: 12px;
    color: var(--link-color, #60a5fa);
    text-decoration: none;
    margin-right: 12px;
    margin-bottom: 4px;
}

.news-citation-link:hover {
    text-decoration: underline;
}

/* ── Skeleton ── */
.news-panel-skeleton {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-skeleton-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.06) 25%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.06) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.news-skeleton-title {
    width: 70%;
    height: 16px;
}

.news-skeleton-date {
    width: 30%;
    height: 12px;
}

.news-skeleton-text {
    width: 100%;
}

.news-skeleton-text.short {
    width: 60%;
}

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

.news-panel-loading-text {
    text-align: center;
    color: var(--text-secondary, #888);
    font-size: 13px;
    margin-top: 16px;
}

/* ── Error ── */
.news-panel-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(220,53,69,0.08);
    border: 1px solid rgba(220,53,69,0.2);
    border-radius: 8px;
    color: var(--text-error, #ff6b6b);
    font-size: 14px;
}

.news-error-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ── Light theme ── */
[data-theme="light"] .news-panel-container {
    background: #fff;
    color: #1a1a1a;
}

[data-theme="light"] .news-panel-close-btn:hover,
[data-theme="light"] .news-panel-refresh-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #1a1a1a;
}

[data-theme="light"] .news-item-text strong {
    color: #1a1a1a;
}

[data-theme="light"] .news-skeleton-line {
    background: linear-gradient(90deg,
        rgba(0,0,0,0.06) 25%,
        rgba(0,0,0,0.10) 50%,
        rgba(0,0,0,0.06) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}
