/* Photo tiles for a list of races, on the events home and the results list: a 16:9 cover or the drawn
   stand-in, chips on the picture, then the date, the name and the details. Tokens come from theme.css. */

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.75rem 1.75rem;
}

@media (max-width: 1060px) { .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .event-grid { grid-template-columns: minmax(0, 1fr); } }

.event-tile__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: .75rem;
  background: var(--ysi-soft);
}

.event-tile__img,
.event-tile__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}

.event-tile:hover .event-tile__img,
.event-tile:hover .event-tile__placeholder { transform: scale(1.03); }

/* What a race with no cover shows: the brand navy with a road's lane markings, rather than an empty box. */
.event-tile__placeholder {
  background:
    repeating-linear-gradient(-58deg, transparent 0 22px, rgba(255, 255, 255, .18) 22px 24px),
    linear-gradient(135deg, #00506E, #0b6f8f);
}

.event-tile__chips {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--ysi-ink);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1;
}

.chip--cyan { background: var(--ysi-cyan); color: #fff; }
.chip--ink { background: var(--ysi-ink); color: #fff; }

.event-tile__when {
  margin: .875rem 0 .25rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ysi-cyan-text);
}

.event-tile__kind { color: var(--ysi-ink-3); font-weight: 600; }

.event-tile__name {
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0 0 .25rem;
}

.event-tile__name a { color: var(--ysi-ink); }
.event-tile__name a:hover { color: var(--ysi-cyan-text); text-decoration: none; }

.event-tile__place { margin: 0 0 .125rem; font-size: .9375rem; color: var(--ysi-ink-2); }
.event-tile__when { margin-top: .75rem; }
.event-tile__meta { margin: 0; font-size: .9375rem; color: var(--ysi-ink-2); }
.event-tile__meta a { font-weight: 600; }
