/* ============================================
   FeediX News — Terminal Layout CSS
   Theme: signal (Bloomberg Terminal / dark data-feed)
   Layout: dense row list — TIME | [CAT] | HEADLINE | SOURCE | ♡
           Monospace font, no images, no hero.
   ============================================ */

/* -----------------------------------------------
   COLUMN HEADER BAR
----------------------------------------------- */

.nh-term-col-header {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 12px;
  background: var(--nh-header-bg);
  border-bottom: 1px solid var(--nh-accent);
  font-family: 'IBM Plex Sans', 'Courier New', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-accent);
  position: sticky;
  top: var(--nh-header-height, 72px);
  z-index: 50;
}

/* Signal theme glow on column header */
[data-news-theme="signal"] .nh-term-col-header {
  background: #000000;
  border-bottom: 1px solid var(--nh-accent);
  text-shadow: 0 0 8px rgba(34,197,94,0.4);
}

/* -----------------------------------------------
   TERMINAL LIST
----------------------------------------------- */

#nh-feed.nh-term-list {
  background: var(--nh-bg);
  border: none;
  border-radius: 0;
  min-height: 40vh;
  overflow: visible;
}

/* -----------------------------------------------
   TERMINAL ROW
----------------------------------------------- */

.nh-term-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--nh-border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background: var(--nh-bg);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
  .nh-term-row {
    transition: background 120ms ease;
  }
}

.nh-term-row:hover {
  background: var(--nh-surface);
}

.nh-term-row:active {
  background: var(--nh-surface-hover);
}

.nh-term-row:focus-visible {
  outline: 2px solid var(--nh-accent);
  outline-offset: -2px;
}

/* Signal theme: subtle scan-line hover */
[data-news-theme="signal"] .nh-term-row:hover {
  background: rgba(34,197,94,0.05);
}

/* -----------------------------------------------
   ROW COLUMNS — column widths
----------------------------------------------- */

/* TIME: fixed width HH:MM */
.nh-term-time {
  flex-shrink: 0;
  width: 44px;
  font-family: 'IBM Plex Sans', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--nh-meta);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-right: 8px;
}

/* BADGE: fixed-width category */
.nh-term-badge {
  flex-shrink: 0;
  width: 48px;
  font-family: 'IBM Plex Sans', 'Courier New', monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding-right: 8px;
  white-space: nowrap;
}

.nh-term-badge--breaking {
  color: var(--nh-accent);
}

.nh-term-badge--analysis {
  color: var(--nh-analysis);
}

.nh-term-badge--update {
  color: var(--nh-update);
}

/* HEADLINE: flex-grows to fill remaining space */
.nh-term-headline {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--nh-head);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  padding-right: 8px;
}

.nh-term-row:hover .nh-term-headline {
  color: var(--nh-accent);
}

/* SOURCE: hidden on mobile, shown on wider screens */
.nh-term-source {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 500;
  color: var(--nh-meta);
  white-space: nowrap;
  padding-right: 10px;
  display: none;
}

@media (min-width: 480px) {
  .nh-term-source {
    display: block;
    width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (min-width: 768px) {
  .nh-term-source {
    width: 120px;
  }
}

/* LIKE button: minimal, inline */
.nh-term-like {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--nh-meta);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 2px;
  min-width: 32px;
  min-height: 44px;
  justify-content: flex-end;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

@media (prefers-reduced-motion: no-preference) {
  .nh-term-like {
    transition: color 150ms ease;
  }
}

.nh-term-like:hover {
  color: var(--nh-accent);
}

.nh-term-like.liked {
  color: #ef4444;
}

.nh-term-like .like-count {
  font-size: 10px;
  font-weight: 600;
  min-width: 8px;
}

/* -----------------------------------------------
   COLUMN HEADER mirrors row layout
----------------------------------------------- */

.nh-term-col-header .nh-term-time  { width: 44px; }
.nh-term-col-header .nh-term-badge { width: 48px; }
.nh-term-col-header .nh-term-headline { flex: 1; min-width: 0; }
.nh-term-col-header .nh-term-source { display: none; }
.nh-term-col-header .nh-term-like { min-width: 32px; }

@media (min-width: 480px) {
  .nh-term-col-header .nh-term-source {
    display: block;
    width: 90px;
  }
}

@media (min-width: 768px) {
  .nh-term-col-header .nh-term-source {
    width: 120px;
  }
}

/* -----------------------------------------------
   EMPTY STATE
----------------------------------------------- */

.nh-term-empty {
  padding: 60px 20px;
  font-family: 'IBM Plex Sans', monospace;
}

/* -----------------------------------------------
   RTL support
----------------------------------------------- */

[dir="rtl"] .nh-term-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .nh-term-col-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .nh-term-time {
  padding-right: 0;
  padding-left: 8px;
}

[dir="rtl"] .nh-term-badge {
  padding-right: 0;
  padding-left: 8px;
}

[dir="rtl"] .nh-term-headline {
  text-align: right;
  padding-right: 0;
  padding-left: 8px;
}

[dir="rtl"] .nh-term-source {
  padding-right: 0;
  padding-left: 10px;
}

/* -----------------------------------------------
   REDUCED MOTION
----------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .nh-term-row {
    transition: none;
  }
}
