/* ============================================================
   NewsReader – shared theme overrides
   Applied via  <html data-theme="blue|crimson|phosphorus">
   ============================================================ */

/* --- Theme Switcher Widget --- */
.nr-theme-switcher {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    vertical-align: middle;
}
.nr-theme-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.nr-theme-btn:hover { transform: scale(1.2); }
.nr-theme-btn.active { border-color: #fff; transform: scale(1.28); box-shadow: 0 0 6px currentColor; }
.nr-theme-btn[data-nr-theme="blue"]       { background: #38bdf8; }
.nr-theme-btn[data-nr-theme="crimson"]    { background: #dc2626; }
.nr-theme-btn[data-nr-theme="phosphorus"] { background: #00ff41; }


/* ============================================================
   CRIMSON THEME  – black background, white text, red accents
   ============================================================ */
[data-theme="crimson"] body {
    background: #0a0000 !important;
    color: #ffffff !important;
}
[data-theme="crimson"] .header,
[data-theme="crimson"] header {
    background: rgba(35,0,0,0.92) !important;
    border-bottom: 1px solid rgba(180,20,20,0.25) !important;
    box-shadow: 0 4px 20px rgba(180,0,0,0.2) !important;
}
[data-theme="crimson"] .map-panel { background: #0a0000 !important; }
[data-theme="crimson"] .globe-bg  { background-image: none !important; }

[data-theme="crimson"] .map-card {
    background: rgba(35,5,5,0.94) !important;
    border-color: rgba(200,40,40,0.2) !important;
    color: #fff !important;
}
[data-theme="crimson"] .insight-card {
    background: rgba(28,4,4,0.94) !important;
    border-color: rgba(200,40,40,0.2) !important;
}
[data-theme="crimson"] .map-callout {
    background: #140000 !important;
    border-color: rgba(200,40,40,0.35) !important;
    color: #fff !important;
}
[data-theme="crimson"] .stat {
    background: rgba(160,10,10,0.15) !important;
    border-color: rgba(200,40,40,0.22) !important;
    color: #fca5a5 !important;
}
[data-theme="crimson"] .stat .dot { background: #ef4444 !important; }
[data-theme="crimson"] .map-card-title,
[data-theme="crimson"] .map-card-title:visited { color: #fff !important; }
[data-theme="crimson"] .map-card-meta    { color: #fca5a5 !important; }
[data-theme="crimson"] .map-card-summary { color: #fca5a5 !important; }
[data-theme="crimson"] .insight-title    { color: #fca5a5 !important; }
[data-theme="crimson"] .insight-list     { color: #fff !important; }
[data-theme="crimson"] .map-hint         { color: #fca5a5 !important; }

[data-theme="crimson"] .nav-link         { color: #fca5a5 !important; }
[data-theme="crimson"] .nav-link:hover   { background: rgba(200,30,30,0.2) !important; color: #fff !important; }
[data-theme="crimson"] a                 { color: #fca5a5; }
[data-theme="crimson"] .map-search-link  { color: #fca5a5 !important; }

[data-theme="crimson"] .map-country { stroke: #5f1e1e !important; }
[data-theme="crimson"] .map-country.animated { stroke: #facc15 !important; }

[data-theme="crimson"] .filter-input,
[data-theme="crimson"] .search-input,
[data-theme="crimson"] select,
[data-theme="crimson"] input[type="text"],
[data-theme="crimson"] input[type="date"] {
    background: rgba(25,0,0,0.75) !important;
    border-color: rgba(180,30,30,0.35) !important;
    color: #fff !important;
}
[data-theme="crimson"] .filter-drawer,
[data-theme="crimson"] .filter-panel {
    background: #0f0000 !important;
    border-color: rgba(180,30,30,0.2) !important;
}
[data-theme="crimson"] .spin-toggle,
[data-theme="crimson"] .animate-toggle,
[data-theme="crimson"] .source-toggle,
[data-theme="crimson"] .clear-filters,
[data-theme="crimson"] .filter-toggle,
[data-theme="crimson"] .range-apply,
[data-theme="crimson"] button {
    background: rgba(160,10,10,0.18) !important;
    border-color: rgba(200,40,40,0.28) !important;
    color: #fca5a5 !important;
}
[data-theme="crimson"] .spin-toggle.active,
[data-theme="crimson"] .animate-toggle.active {
    background: rgba(200,30,30,0.42) !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
/* home.html and visual_feed.html cards */
[data-theme="crimson"] .card,
[data-theme="crimson"] .article-card,
[data-theme="crimson"] .news-card {
    background: rgba(35,5,5,0.97) !important;
    border-color: rgba(200,40,40,0.2) !important;
    color: #fff !important;
}
[data-theme="crimson"] .card a,
[data-theme="crimson"] .article-card a { color: #fca5a5 !important; }


/* ============================================================
   PHOSPHORUS THEME  – matrix green on black
   ============================================================ */
[data-theme="phosphorus"] body {
    background: #000500 !important;
    color: #00ff41 !important;
}
[data-theme="phosphorus"] .header,
[data-theme="phosphorus"] header {
    background: rgba(0,12,0,0.92) !important;
    border-bottom: 1px solid rgba(0,200,50,0.2) !important;
    box-shadow: 0 4px 20px rgba(0,180,50,0.12) !important;
}
[data-theme="phosphorus"] .map-panel { background: #000500 !important; }
[data-theme="phosphorus"] .globe-bg  { background-image: none !important; }

[data-theme="phosphorus"] .map-card {
    background: rgba(0,20,0,0.94) !important;
    border-color: rgba(0,200,50,0.18) !important;
    color: #00ff41 !important;
}
[data-theme="phosphorus"] .insight-card {
    background: rgba(0,16,0,0.94) !important;
    border-color: rgba(0,200,50,0.18) !important;
}
[data-theme="phosphorus"] .map-callout {
    background: #000d00 !important;
    border-color: rgba(0,220,60,0.35) !important;
    color: #00ff41 !important;
}
[data-theme="phosphorus"] .stat {
    background: rgba(0,140,35,0.12) !important;
    border-color: rgba(0,200,50,0.2) !important;
    color: #00ff41 !important;
}
[data-theme="phosphorus"] .stat .dot { background: #00ff41 !important; }
[data-theme="phosphorus"] .map-card-title,
[data-theme="phosphorus"] .map-card-title:visited { color: #39ff14 !important; }
[data-theme="phosphorus"] .map-card-meta    { color: #00cc33 !important; }
[data-theme="phosphorus"] .map-card-summary { color: #00cc33 !important; }
[data-theme="phosphorus"] .insight-title    { color: #00cc33 !important; }
[data-theme="phosphorus"] .insight-list     { color: #00ff41 !important; }
[data-theme="phosphorus"] .map-hint         { color: #00cc33 !important; }

[data-theme="phosphorus"] .nav-link         { color: #00ff41 !important; }
[data-theme="phosphorus"] .nav-link:hover   { background: rgba(0,200,50,0.15) !important; color: #39ff14 !important; }
[data-theme="phosphorus"] a                 { color: #00ff41; }
[data-theme="phosphorus"] .map-search-link  { color: #00ff41 !important; }

[data-theme="phosphorus"] .map-country { stroke: #1a5f1a !important; }
[data-theme="phosphorus"] .map-country.animated { stroke: #facc15 !important; }

[data-theme="phosphorus"] .filter-input,
[data-theme="phosphorus"] .search-input,
[data-theme="phosphorus"] select,
[data-theme="phosphorus"] input[type="text"],
[data-theme="phosphorus"] input[type="date"] {
    background: rgba(0,12,0,0.8) !important;
    border-color: rgba(0,180,40,0.3) !important;
    color: #00ff41 !important;
}
[data-theme="phosphorus"] .filter-drawer,
[data-theme="phosphorus"] .filter-panel {
    background: #000800 !important;
    border-color: rgba(0,180,40,0.2) !important;
}
[data-theme="phosphorus"] .spin-toggle,
[data-theme="phosphorus"] .animate-toggle,
[data-theme="phosphorus"] .source-toggle,
[data-theme="phosphorus"] .clear-filters,
[data-theme="phosphorus"] .filter-toggle,
[data-theme="phosphorus"] .range-apply,
[data-theme="phosphorus"] button {
    background: rgba(0,140,35,0.15) !important;
    border-color: rgba(0,200,50,0.25) !important;
    color: #00ff41 !important;
}
[data-theme="phosphorus"] .spin-toggle.active,
[data-theme="phosphorus"] .animate-toggle.active {
    background: rgba(0,200,50,0.32) !important;
    border-color: #00ff41 !important;
    color: #39ff14 !important;
}
/* home.html and visual_feed.html cards */
[data-theme="phosphorus"] .card,
[data-theme="phosphorus"] .article-card,
[data-theme="phosphorus"] .news-card {
    background: rgba(0,20,0,0.97) !important;
    border-color: rgba(0,200,50,0.18) !important;
    color: #00ff41 !important;
}
[data-theme="phosphorus"] .card a,
[data-theme="phosphorus"] .article-card a { color: #00ff41 !important; }
/* Matrix scanline text effect on phosphorus */
[data-theme="phosphorus"] h1,
[data-theme="phosphorus"] h2,
[data-theme="phosphorus"] h3 {
    color: #39ff14 !important;
    text-shadow: 0 0 8px rgba(0,255,65,0.4);
}
