/* A feed post about a cup (cup/feedBody.leaf), without the calendar: the cup's races as a card of timeline rows. With the
   calendar the races are its own sections (CupRaceListing). The look is copied from the calendar's group card
   (calendar-common.css, calendar-list.css) under the cup's own class names: a plugin's styles are its own and the calendar
   may be off (FEED-CUP-SUMMARY.md, A). */
.cup-feed-list { --cup-feed-dot: var(--color-cup); --cup-feed-gutter: 39px; --cup-feed-gutter-gap: 21px; }
.cup-feed-chevron { transition: transform 120ms, color 120ms; }
.cup-feed-row:hover .cup-feed-chevron { transform: translateX(2px); }

/* The races' timeline. The gutter variables keep
   the line, the dots, the row padding and the divider inset in sync, so the phone layout only retunes the two numbers. */
.cup-feed-row { position: relative; padding-left: calc(var(--cup-feed-gutter) + var(--cup-feed-gutter-gap)); }
.cup-feed-row + .cup-feed-row {
  border-top: 1px solid var(--color-divider);
  /* The divider starts at the date column, clear of the timeline gutter. */
  border-image: linear-gradient(to right, transparent calc(var(--cup-feed-gutter) + var(--cup-feed-gutter-gap)), var(--color-divider) 0) 1;
}
.cup-feed-row:hover { background: rgba(0,0,0,0.02); }
.cup-feed-row::before {
  /* top: -1px bridges the 1px row separator so the line stays unbroken. */
  content: ""; position: absolute; left: calc(var(--cup-feed-gutter) - 1px); top: -1px; bottom: 0;
  width: 2px; background: var(--color-surface-muted);
}
.cup-feed-row:first-child::before { top: 50%; }
.cup-feed-row:last-child::before { bottom: 50%; }
.cup-feed-row::after {
  content: ""; position: absolute; left: var(--cup-feed-gutter); top: 50%; transform: translate(-50%,-50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cup-feed-dot, var(--color-success));
  box-shadow: 0 0 0 2px var(--color-white);
}

/* A phone: a race's title its own line with the date and the state as a meta line under it,
   the chevron pinned to the right edge. */
@media (max-width: 575.98px) {
  .cup-feed-card .cup-feed-list { --cup-feed-gutter: 36px; --cup-feed-gutter-gap: 36px; }
  /* !important throughout: the row carries Bootstrap's py-3/gap-3 utilities. */
  .cup-feed-card .cup-feed-row {
    flex-wrap: wrap; align-items: baseline !important;
    column-gap: 8px !important; row-gap: 6px !important;
    padding-top: 13px !important; padding-bottom: 13px !important;
    padding-right: 40px !important;
  }
  .cup-feed-card .cup-feed-title { order: 1; flex: 0 0 100%; line-height: 1.3; }
  .cup-feed-card .cup-feed-date {
    order: 2; width: auto !important; line-height: 1.25;
    display: flex; align-items: baseline; gap: 4px; text-align: left !important;
  }
  .cup-feed-card .cup-feed-date > div { margin-top: 0 !important; font-size: 0.8rem !important; }
  .cup-feed-card .cup-feed-day { font-size: 0.95rem !important; }
  .cup-feed-card .cup-feed-state { order: 3; }
  .cup-feed-card .cup-feed-chevron { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
  .cup-feed-card .cup-feed-row:hover .cup-feed-chevron { transform: translateY(-50%) translateX(2px); }
}
