/* =============================================================================
   UNIVERSE.CSS — Page-Specific Styles: Stock Universe
   AI Supply Chain Dashboard
   Created: 2025-02-27

   ACCENT: Purple (#a78bfa) — represents "breadth / all stocks"

   SHARED MODULES IMPORTED:
   - base.css, scores.css, index-bar.css, table.css, admin.css

   REVERT: Paste rules back into universe.html <style>.
   ============================================================================= */

:root {
    --acc:          #a78bfa;
    --acc-dim:      rgba(167,139,250,0.08);
    --acc-glow:     rgba(167,139,250,0.15);
    --ambient-colour: rgba(168,85,247,0.06);
}

/* -------------------------------------------------------------------------
   MA MINI DOTS — tiny coloured dots beside MA value in table cells
   e.g. ● 10E  ● 20E  ● 50S  ● 200S
   ------------------------------------------------------------------------- */
.ma-mini {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
}

.ma-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   CONTEXT LABEL — the trend context string (e.g. "STRONG TREND")
   Shown in screener results and universe table.
   ------------------------------------------------------------------------- */
.ctx-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* -------------------------------------------------------------------------
   NEWS PANEL — slide-in panel showing news for selected stock
   ------------------------------------------------------------------------- */
.news-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.news-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.news-panel {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    height: 100vh;
    background: #08080d;
    border-left: 1px solid var(--border);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
}

.news-panel.open { right: 0; }

.news-panel-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.news-panel-ticker {
    font-weight: 800;
    font-size: 13px;
    color: var(--text-hi);
}

.news-panel-close {
    font-size: 20px;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.news-panel-close:hover { color: var(--text-hi); }

.news-panel-body {
    overflow-y: auto;
    flex: 1;
    padding: 12px;
}

.news-filter-bar {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.news-filter-btn {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-data);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.news-filter-btn.active {
    border-color: var(--acc);
    color: var(--acc);
    background: var(--acc-dim);
}

.news-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: opacity 0.15s;
}

.news-item:hover { opacity: 0.8; }

.news-item-title {
    font-size: 11px;
    color: var(--text-hi);
    line-height: 1.4;
    margin-bottom: 4px;
}

.news-item-source {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.news-item-source.benzinga { background: rgba(59,130,246,0.1); color: #60a5fa; }
.news-item-source.other    { background: rgba(255,255,255,0.04); color: var(--text-dim); }

.news-item-time {
    font-size: 8px;
    color: var(--text-dim);
    margin-left: 6px;
}

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