/* CodeBobby — css/ticker.css
   Loaded on EVERY page (root + subdirectories).
   Owns all ticker styling and the positional offsets
   that account for the ticker sitting above the nav.

   To update ticker content → edit api/ticker.html only.
   If ticker height changes → update the 28px figure below.
   Ticker height ≈ 28px (0.7rem text + 0.4rem×2 padding + 1px border)
   ─────────────────────────────────────────────────────────────────── */

/* ── Page wrap ── */
.page-wrap { position: relative; z-index: 1; }

/* ── Ticker bar — fixed above the nav ── */
.ticker-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;            /* above nav z-index: 100 */
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
  overflow: hidden;
}

/* ── Ticker inner — width:max-content so translateX(-50%)
   travels exactly one full set of items for a seamless loop ── */
.ticker-inner {
  display: flex;
  width: max-content;
  animation: tick 30s linear infinite;
  will-change: transform;
}

@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Ticker items ── */
.ticker-item {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0 3rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Type badges — mirror search result .sr-type color coding ──
   Tutorial → purple  (same as .sr-video  .sr-type in main.css)
   Article  → green   (same as .sr-article .sr-type in main.css) */
.tick-type {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.1rem 0.42rem;
  border: 1px solid;
  margin-right: 0.55rem;
  display: inline-block;
  vertical-align: middle;
  line-height: 1.6;
}
.tick-tutorial {
  color: var(--purple);
  background: rgba(168,85,247,0.1);
  border-color: rgba(168,85,247,0.3);
}
.tick-article {
  color: var(--accent);
  background: rgba(0,245,160,0.08);
  border-color: rgba(0,245,160,0.25);
}

/* ══════════════════════════════════════════════════════════
   POSITIONAL OFFSETS
   Every value below = main.css base value + 28px ticker height.
   These override main.css and apply on ALL pages that load
   this file (every page has the ticker so every page needs them).
   ══════════════════════════════════════════════════════════ */

/* Nav: was top:0, now sits 28px below the ticker */
nav { top: 28px; }

/* Search bar injected by search.js: was top:65px (nav height),
   now 28px ticker + 65px nav = 93px */
.search-bar-wrap { top: 93px; }

/* Tutorial/article page layouts: was padding-top:125px,
   now 125px + 28px = 153px */
.page-layout,
.article-layout { padding-top: 153px; }

/* TOC sidebar: was top:125px / height:calc(100vh - 125px),
   now accounts for ticker */
.toc-sidebar {
  top: 153px;
  height: calc(100vh - 153px);
}

/* Newsletter filter bar: was sticky top:125px, now 153px */
.filter-section { top: 153px; }
