/* Phase 10 — redesign tokens + animations
   Adds variables and bb-pulse / bb-ring keyframes used by the new CSI/AI
   homepage components. Existing tokens kept intact (forward-only). */

:root {
  /* AI accent (blue) — same hue as --color-accent but exposed via the
     spec name --color-text-info so the redesign components can reference
     it without coupling to the existing --color-accent. */
  --color-text-info: #1D4ED8;
  --color-text-info-strong: #1D4ED8;

  /* Backgrounds */
  --color-background-primary: #0a0a0a;
  --color-background-secondary: #F8FAFC;
  --color-background-tertiary: #1a1f2e;

  /* Text */
  --color-text-primary: #0F172A;
  --color-text-secondary: #b0b0b0;
  --color-text-tertiary: #6b7280;

  /* Brand surfaces */
  --color-text-success: #10b981;
  --color-text-warning: #f59e0b;
  --color-text-danger: #ef4444;

  /* Trends sidebar palette (Ryan, 2026-05-15) */
  --color-trends-bg: #F5EFEB;
  --color-trends-text: #2F4F5B;

  /* Type families */
  --font-serif: Georgia, "Times New Roman", "Tinos", serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", Courier, monospace;
  --font-body: Arial, Helvetica, system-ui, sans-serif;

  /* Radii */
  --border-radius-md: 6px;
  --border-radius-sm: 3px;
}

@keyframes bb-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

@keyframes bb-ring {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.bb-pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-info, #1D4ED8);
  animation: bb-pulse 2s infinite ease-in-out;
}

.bb-pulse-dot--red { background: var(--color-text-danger, #ef4444); }
.bb-pulse-dot--green { background: var(--color-text-success, #10b981); }

.bb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-text-info, #1D4ED8);
  animation: bb-ring 1.8s infinite ease-out;
  pointer-events: none;
}

/* Marquee for live wire ticker */
@keyframes bb-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes bb-marquee-reverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.bb-marquee {
  display: flex;
  white-space: nowrap;
  animation: bb-marquee 90s linear infinite;
}
.bb-marquee:hover { animation-play-state: paused; }
.bb-marquee--reverse {
  animation-name: bb-marquee-reverse;
}
.bb-marquee--slow {
  animation-duration: 140s;
}

/* ─── Dual-ticker (DoubleTicker.tsx) ──────────────────────────────────────
   News-wire aesthetic: pulse dot + small-caps label on the left, the
   feed scrolls in muted mid-gray with monospaced timestamps and a
   single neon accent on the source code. No bright label boxes —
   the neon shows up only as the pulse and on the code chip. */
.bb-tick-bar {
  position: relative;
  background:
    linear-gradient(180deg, rgba(8,12,10,0.92), rgba(10,14,12,0.92));
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bb-tick-bar::before {
  /* thin neon hairline at the top of the FIRST bar only */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,159,0.45), rgba(0,212,255,0.45), transparent);
  opacity: 0.65;
}
.bb-tick-bar + .bb-tick-bar::before {
  /* divider between row 1 and row 2: dimmer + cyan-leaning */
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.25), transparent);
  opacity: 0.5;
}

.bb-tick-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ff4035;
  flex-shrink: 0;
  padding-right: 12px;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.bb-tick-label--cyan { color: #1D4ED8; }

.bb-tick-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4035;
  box-shadow: 0 0 8px rgba(0,255,159,0.7);
  animation: bb-tick-blink 2.2s ease-in-out infinite;
}
.bb-tick-pulse--cyan {
  background: #1D4ED8;
  box-shadow: 0 0 8px rgba(0,212,255,0.7);
}
@keyframes bb-tick-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.85); }
}

.bb-tick-time {
  color: #5a6470;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  margin-right: 6px;
}
.bb-tick-code {
  color: #ff4035;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  margin-right: 8px;
  border: 1px solid rgba(0,255,159,0.25);
  border-radius: 2px;
  background: rgba(0,255,159,0.06);
}
.bb-tick-code--cyan {
  color: #1D4ED8;
  border-color: rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.06);
}
.bb-tick-text {
  color: #c8ccd1;
  font-size: 13px;
  letter-spacing: 0.01em;
  font-weight: 400;
}
.bb-tick-text:hover {
  color: #ffffff;
}
.bb-tick-item {
  display: inline-flex;
  align-items: center;
  padding: 0 24px 0 0;
  white-space: nowrap;
}
.bb-tick-item + .bb-tick-item {
  border-left: 1px solid rgba(255,255,255,0.05);
  padding-left: 24px;
}

/* Smoother marquee easing — keep the linear feel (real tickers are linear)
   but slightly slower so text is legible. */
.bb-tick-bar .bb-marquee { animation-duration: 110s; }
.bb-tick-bar .bb-marquee--slow { animation-duration: 170s; }
