/* =========================================================
   News App — scoped under .app-news
   Adapts to light/dark via CSS custom properties.
   ========================================================= */

/* ── Root layout ─────────────────────────────────────────── */
.app-news .news-root {
  display: flex;
  height: 100%;
  background: var(--win-bg);
  color: var(--win-fg);
  overflow: hidden;
  font-family: var(--font-system);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.app-news .news-sidebar {
  width: 210px;
  flex: 0 0 210px;
  background: var(--sidebar-bg);
  border-right: 0.5px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-news .news-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px 12px;
  border-bottom: 0.5px solid var(--sidebar-border);
}

.app-news .news-logo {
  font-size: 22px;
  line-height: 1;
}

.app-news .news-sidebar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--sidebar-fg);
  letter-spacing: -0.3px;
}

.app-news .news-channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 6px;
}

.app-news .news-channel-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--sidebar-fg);
  text-align: left;
  transition: background 0.12s ease;
  cursor: default;
}

.app-news .news-channel-row:hover {
  background: var(--win-hover);
}

.app-news .news-channel-row.active {
  background: var(--accent);
  color: #fff;
}

.app-news .nch-glyph {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex: 0 0 auto;
}

.app-news .nch-label {
  font-size: 13px;
  font-weight: 500;
}

/* ── Main feed area ──────────────────────────────────────── */
.app-news .news-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--win-bg);
  scroll-behavior: smooth;
}

/* ── Feed header ─────────────────────────────────────────── */
.app-news .news-feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 22px 12px;
  border-bottom: 0.5px solid var(--win-border);
}

.app-news .nfh-channel {
  font-size: 20px;
  font-weight: 800;
  color: var(--win-fg);
  letter-spacing: -0.4px;
}

.app-news .nfh-date {
  font-size: 12px;
  color: var(--win-muted);
  font-weight: 400;
}

/* ── Hero card ───────────────────────────────────────────── */
.app-news .news-hero-card {
  margin: 18px 20px 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-bg);
  border: 0.5px solid var(--win-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  cursor: default;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}

.app-news .news-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.16);
}

.app-news .news-hero-img {
  height: 200px;
  width: 100%;
}

.app-news .news-hero-content {
  padding: 18px 20px 20px;
}

.app-news .news-hero-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--win-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.app-news .news-hero-headline {
  font-size: 20px;
  font-weight: 800;
  color: var(--win-fg);
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.app-news .news-hero-summary {
  font-size: 13.5px;
  color: var(--win-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-news .news-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-news .news-hero-read-btn {
  padding: 7px 18px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.12s ease;
  cursor: default;
}

.app-news .news-hero-read-btn:hover {
  background: var(--accent-light);
}

/* ── Save button (shared) ────────────────────────────────── */
.app-news .news-save-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--win-muted);
  background: var(--control-bg);
  transition: background 0.12s ease, color 0.12s ease;
  cursor: default;
  flex: 0 0 auto;
}

.app-news .news-save-btn:hover {
  background: var(--win-hover);
  color: var(--win-fg);
}

.app-news .news-save-btn.saved {
  color: var(--accent);
  background: rgba(10,132,255,0.10);
}

/* ── Card feed grid ──────────────────────────────────────── */
.app-news .news-card-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px 20px 24px;
}

/* ── Regular article card ────────────────────────────────── */
.app-news .news-card {
  border-radius: 13px;
  overflow: hidden;
  background: var(--card-bg);
  border: 0.5px solid var(--win-border);
  display: flex;
  flex-direction: column;
  cursor: default;
  transition: transform 0.14s var(--ease-out), box-shadow 0.14s var(--ease-out);
}

.app-news .news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.14);
}

.app-news .news-card-img {
  height: 130px;
  flex: 0 0 130px;
}

.app-news .news-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.app-news .news-card-source {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--win-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.app-news .news-card-headline {
  font-size: 14px;
  font-weight: 700;
  color: var(--win-fg);
  line-height: 1.3;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-news .news-card-summary {
  font-size: 12px;
  color: var(--win-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.app-news .news-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 8px;
}

/* ── Empty state ─────────────────────────────────────────── */
.app-news .news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  gap: 10px;
  text-align: center;
}

.app-news .ne-glyph {
  font-size: 48px;
  margin-bottom: 4px;
}

.app-news .ne-msg {
  font-size: 17px;
  font-weight: 600;
  color: var(--win-fg);
}

.app-news .ne-sub {
  font-size: 13px;
  color: var(--win-muted);
}

/* ── Reader pane ─────────────────────────────────────────── */
.app-news .news-reader {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--win-bg);
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

.app-news .news-reader-backbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 0.5px solid var(--win-border);
  background: var(--win-bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-news .news-back-btn {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  transition: background 0.1s ease;
  cursor: default;
}

.app-news .news-back-btn:hover {
  background: var(--win-hover);
}

.app-news .news-reader-save-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--win-muted);
  background: var(--control-bg);
  transition: background 0.12s ease, color 0.12s ease;
  cursor: default;
}

.app-news .news-reader-save-btn:hover {
  background: var(--win-hover);
  color: var(--win-fg);
}

.app-news .news-reader-save-btn.saved {
  color: var(--accent);
  background: rgba(10,132,255,0.10);
}

.app-news .news-reader-hero {
  width: 100%;
  height: 240px;
  flex: 0 0 240px;
}

.app-news .news-reader-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px 0;
}

.app-news .nrm-source {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-news .nrm-time {
  font-size: 12px;
  color: var(--win-muted);
}

.app-news .nrm-time::before {
  content: '·';
  margin-right: 10px;
  color: var(--win-border);
}

.app-news .news-reader-headline {
  font-size: 22px;
  font-weight: 800;
  color: var(--win-fg);
  line-height: 1.22;
  letter-spacing: -0.5px;
  padding: 10px 28px 4px;
}

.app-news .news-reader-summary {
  font-size: 15px;
  font-weight: 400;
  color: var(--win-muted);
  line-height: 1.6;
  padding: 0 28px 16px;
  border-bottom: 0.5px solid var(--win-border);
}

.app-news .news-reader-body {
  padding: 18px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-news .news-reader-para {
  font-size: 15px;
  line-height: 1.75;
  color: var(--win-fg);
  margin: 0;
}

.app-news .news-reader-end {
  margin: 8px 24px 28px;
  padding: 18px 20px;
  background: var(--card-bg);
  border: 0.5px solid var(--win-border);
  border-radius: 12px;
  text-align: center;
  cursor: default;
  transition: background 0.12s ease;
}

.app-news .news-reader-end:hover {
  background: var(--win-hover);
}

.app-news .nre-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.app-news .nre-hint {
  font-size: 12px;
  color: var(--win-muted);
}

/* ── Scrollbar styling ───────────────────────────────────── */
.app-news .news-main::-webkit-scrollbar,
.app-news .news-reader::-webkit-scrollbar,
.app-news .news-channel-list::-webkit-scrollbar {
  width: 6px;
}

.app-news .news-main::-webkit-scrollbar-thumb,
.app-news .news-reader::-webkit-scrollbar-thumb,
.app-news .news-channel-list::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}
