/* ============================================
   DDD Supply-Change Feed
   Shared component used on /chains and /issuers.
   Converted from a scrolling marquee to a static
   responsive grid of cards.
   ============================================ */

.ticker-wrap {
  max-width: 680px;
  margin: 1.2rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.ticker-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

/* JS still wraps the entries in .ticker-set spans as a legacy from the
   old duplicated-marquee layout (two identical copies for seamless scroll).
   Unwrap the first so its children flow into the grid; hide the duplicate. */
.ticker-set { display: contents; }
.ticker-set + .ticker-set { display: none; }

.ticker-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.018);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  min-width: 0;
}

.ticker-entry-button {
  width: 100%;
  appearance: none;
  cursor: pointer;
  text-align: left;
}

.ticker-entry-static {
  opacity: 0.7;
}

.ticker-entry-button:hover {
  border-color: rgba(45, 212, 191, 0.2);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
}

.ticker-entry-button:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.65);
  outline-offset: 2px;
}

.ticker-entry-active {
  border-color: rgba(45, 212, 191, 0.35);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.12) inset;
  background: rgba(45, 212, 191, 0.06);
}

.ticker-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  flex-shrink: 0;
  overflow: hidden;
}

.ticker-badge img {
  display: block;
  width: 0.66rem;
  height: 0.66rem;
}

.ticker-badge.gw-rail-logo-fallback {
  background: rgba(255,255,255,0.9);
  color: #111827;
  font-family: var(--mono);
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ticker-name {
  color: rgba(255,255,255,0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.ticker-arrow-up { color: #2DD4BF; }
.ticker-arrow-down { color: #ef4444; }
.ticker-delta-up { color: #2DD4BF; }
.ticker-delta-down { color: #ef4444; }

/* Separators from the old inline layout — hidden in the card grid. */
.ticker-sep { display: none; }

.ticker-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.5;
  padding: 0.5rem 0;
}

/* Keep live badge and range bar styling consistent */
.ticker-wrap .gw-live-badge {
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.ticker-wrap .gw-range-bar {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .ticker-strip {
    grid-template-columns: 1fr;
  }

  .ticker-entry {
    font-size: 0.71rem;
    padding: 0.48rem 0.58rem;
  }
}
