/* ════════════════════════════════════════
   NEWS – RSS Feed Reader
   ════════════════════════════════════════ */

.news-loading {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Source tabs ── */
.news-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.news-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Inter', sans-serif;
}

.news-tab:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.news-tab.active { font-weight: 700; }

/* ── News grid ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.news-grid .news-card-featured {
  grid-column: 1 / -1;
}

@media (max-width: 800px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid .news-card-featured { grid-column: 1 / -1; }
}

@media (max-width: 500px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* ── News card ── */
.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  user-select: none;
}

.news-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(96,165,250,0.25);
  transform: translateY(-2px);
}

.news-card:focus { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

/* Thumbnail */
.news-thumb {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.news-card-featured .news-thumb { height: 200px; }

.news-card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-card-featured .news-card-body { padding: 14px 18px; }

.news-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  width: fit-content;
}

.news-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-featured .news-title { font-size: 15px; font-weight: 700; -webkit-line-clamp: 2; }

.news-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
}

/* ── Footer ── */
.news-footer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}


/* ════════════════════════════════════════
   INLINE ARTICLE READER PANEL
   ════════════════════════════════════════ */

#newsReader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  visibility: hidden;
}

#newsReader.open {
  pointer-events: all;
  visibility: visible;
}

/* Backdrop */
.nr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#newsReader.open .nr-backdrop { opacity: 1; }

/* Slide-in panel from right */
.nr-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(680px, 92vw);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32,0,0.15,1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}

#newsReader.open .nr-panel { transform: translateX(0); }

/* Panel header */
.nr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}

.nr-source {
  font-size: 13px;
  font-weight: 700;
}

.nr-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nr-open-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid rgba(96,165,250,0.3);
  border-radius: 20px;
  background: rgba(96,165,250,0.08);
  transition: all 0.18s;
}

.nr-open-btn:hover {
  background: rgba(96,165,250,0.15);
  border-color: rgba(96,165,250,0.5);
}

.nr-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  font-family: 'Inter', sans-serif;
}

.nr-close-btn:hover {
  background: rgba(248,113,113,0.12);
  border-color: rgba(248,113,113,0.3);
  color: var(--accent-red);
}

/* Panel body */
.nr-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

/* Thumbnail */
.nr-thumb {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.04);
  display: none;
}

/* Article content */
.nr-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 20px 24px 8px;
}

.nr-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 24px 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.nr-content {
  padding: 0 24px 32px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.nr-content p {
  margin: 0 0 14px;
}

.nr-content p:first-child {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.nr-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

.nr-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.nr-fallback-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.nr-fallback-note a {
  color: var(--accent-blue);
  font-weight: 600;
}
