/* ============================================================
   WHO'S RACING -- recent-finishes strip on the lobby
   Direction A idiom (style-a.css): white floating card rows,
   navy ink, muted secondary text. Deliberately lighter than
   .player-row -- this is ambient activity, not a roster.
   ============================================================ */

.recent-finishes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.recent-finishes h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-mute);
}

/* The one animated thing on the strip. It is doing the work the whole feature
   exists for -- "this is live" -- so nothing else needs to move. */
.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(92, 184, 92, 0.55);
  animation: live-pulse 2.2s var(--ease) infinite;
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(92, 184, 92, 0.5); }
  70%  { box-shadow: 0 0 0 0.4rem rgba(92, 184, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(92, 184, 92, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

#recent-finishes-list {
  list-style: none;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.finish-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.45rem 0.8rem;
  background: var(--card);
  border-radius: 9px;
  box-shadow: var(--card-shadow);
  font-size: 0.92rem;
}

.finish-name {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 800;
  color: var(--navy);
  /* A username is user-supplied and can be long; it truncates rather than
     pushing the timestamp off the row. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finish-name-guest {
  font-weight: 700;
  color: var(--navy-mute);
}

.finish-detail {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--navy-soft);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finish-when {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--navy-mute);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.recent-finishes-empty {
  color: var(--navy-mute);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 480px) {
  /* Two lines instead of one: on a narrow screen the detail text would
     otherwise be ellipsed down to nothing. */
  .finish-row {
    flex-wrap: wrap;
    row-gap: 0.1rem;
  }
  .finish-detail {
    flex-basis: 100%;
    font-size: 0.85rem;
  }
}
