/* ── Security ticker bar ── */
#security-ticker {
  position: fixed;
  top: 4.5rem;
  left: 0;
  right: 0;
  z-index: 99;
  height: 40px;
  background: linear-gradient(90deg, #1c0505 0%, #0e0f1a 5%, #0e0f1a 95%, #1c0505 100%);
  border-top: 2px solid #dc2626;
  border-bottom: 1px solid rgba(220,38,38,0.2);
  box-shadow: 0 4px 28px rgba(220,38,38,0.25), inset 0 1px 0 rgba(220,38,38,0.14);
  display: flex;
  align-items: center;
  overflow: hidden;
  user-select: none;
}
@media (max-width: 860px) {
  #security-ticker {
    top: 4rem;
    height: 32px;
  }
}

/* ── LIVE THREATS label — solid with slight transparency ── */
.ticker-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0 16px;
  height: 100%;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(185,28,28,0.55);
  border-right: 1px solid rgba(220,38,38,0.5);
  box-shadow: inset 0 0 24px rgba(220,38,38,0.2), 4px 0 16px rgba(185,28,28,0.3);
  white-space: nowrap;
}

.ticker-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* ── Scrolling track ── */
.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 275s linear infinite;
  padding-left: 100vw;
  flex-shrink: 0;
}

.ticker-mobile-link {
  display: none;
  margin-left: auto;
  margin-right: 10px;
  min-height: 44px;
  align-items: center;
  color: #eaf3fb;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#security-ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Base item ── */
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  color: #8b97a8;
  text-decoration: none;
  transition: color 0.15s;
  line-height: 40px;
  border-radius: 3px;
}
.ticker-item:hover {
  color: #00e5ff;
  text-decoration: underline;
  text-decoration-color: rgba(0,229,255,0.4);
}
@media (max-width: 860px) {
  .ticker-label {
    gap: 6px;
    padding: 0 10px;
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .ticker-mobile-link {
    display: inline-flex;
  }

  .ticker-track {
    display: none;
  }

  #security-ticker {
    justify-content: space-between;
  }
}

/* ── KEV: highest alert — white text, red tint, pulsing badge ── */
.ticker-item--kev {
  color: #fecaca;
  background: rgba(185,28,28,0.12);
  padding: 0 10px;
  border-left: 2px solid rgba(220,38,38,0.5);
  margin-left: 6px;
}
.ticker-item--kev .ticker-title { font-weight: 700; }
.ticker-item--kev:hover { color: #fca5a5; }

/* ── CRIT: strong orange-red ── */
.ticker-item--crit {
  color: #fca5a5;
}
.ticker-item--crit .ticker-title { font-weight: 600; }
.ticker-item--crit:hover { color: #ff7b7b; }

/* ── HIGH: amber ── */
.ticker-item--high {
  color: #fdba74;
}
.ticker-item--high:hover { color: #fbbf24; }

/* ── advisory: cyan (matches site accent) ── */
.ticker-item--advisory {
  color: #67d7e8;
}

/* ── news: muted grey ── */
.ticker-item--news {
  color: #8b97a8;
}

/* ── Badges ── */
.ticker-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
  font-family: 'Space Mono', monospace;
}

.badge-kev {
  background: rgba(109,40,217,0.3);
  color: #e9d5ff;
  border: 1px solid rgba(139,92,246,0.65);
  box-shadow: 0 0 8px rgba(139,92,246,0.4), 0 0 16px rgba(109,40,217,0.2);
  animation: badge-pulse-kev 1.8s ease-in-out infinite;
}
@keyframes badge-pulse-kev {
  0%, 100% { box-shadow: 0 0 6px rgba(139,92,246,0.4); }
  50%       { box-shadow: 0 0 14px rgba(139,92,246,0.7), 0 0 24px rgba(109,40,217,0.3); }
}

.badge-crit {
  background: rgba(185,28,28,0.3);
  color: #fecaca;
  border: 1px solid rgba(220,38,38,0.7);
  box-shadow: 0 0 8px rgba(220,38,38,0.4), 0 0 16px rgba(185,28,28,0.2);
  animation: badge-pulse-crit 2.2s ease-in-out infinite;
}
@keyframes badge-pulse-crit {
  0%, 100% { box-shadow: 0 0 6px rgba(220,38,38,0.35); }
  50%       { box-shadow: 0 0 12px rgba(220,38,38,0.65), 0 0 20px rgba(185,28,28,0.3); }
}

.badge-high {
  background: rgba(180,83,9,0.25);
  color: #fed7aa;
  border: 1px solid rgba(234,88,12,0.6);
  box-shadow: 0 0 6px rgba(234,88,12,0.25);
}

.badge-advisory {
  background: rgba(0,229,255,0.1);
  color: #00e5ff;
  border: 1px solid rgba(0,229,255,0.4);
  box-shadow: 0 0 6px rgba(0,229,255,0.15);
}

.badge-news {
  background: rgba(22,163,74,0.12);
  color: #86efac;
  border: 1px solid rgba(22,163,74,0.35);
}

/* ── CVE ID + score ── */
.ticker-cveid {
  color: #4b5563;
  font-size: 10.5px;
  font-family: 'Space Mono', monospace;
}
.ticker-score {
  color: #4b5563;
  font-size: 10.5px;
  font-family: 'Space Mono', monospace;
}

/* CVE ID brighter for high-priority items */
.ticker-item--kev  .ticker-cveid,
.ticker-item--crit .ticker-cveid { color: #6b7280; }

/* ── Separator ── */
.ticker-dot {
  color: rgba(220,38,38,0.25);
  margin: 0 16px;
  font-size: 10px;
}

.ticker-loading {
  color: #374151;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  padding: 0 24px;
}
