/*
 * Sportradar blocks: winter sports. Loaded after sportradar.css (the base) by the blocks that need it.
 */

/* Winter sports */

.sr-block .sr-table tr.sr-after-cut > td {
  border-block-start: 2px dashed var(--sr-border);
}

.sr-block .sr-winter .sr-col-run,
.sr-block .sr-winter .sr-col-handicap {
  font-size: 0.9em;
  color: var(--sr-muted);
}

.sr-block .sr-race {
  display: inline-flex;
  gap: 0.4em;
  align-items: center;

  /* Like .sr-person: in a line of text (the results footer) the flag would set the baseline. */
  vertical-align: middle;
}

.sr-block .sr-race__discipline {
  display: block;
  font-size: 0.85em;
  color: var(--sr-muted);
}

.sr-block .sr-winter-calendar .sr-col-podium {
  text-align: start;
}

/* Rank in its own column, so a wrapped name lines up under the first line. */
.sr-block .sr-podium {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15em 0.4em;
  font-size: 0.9em;
  counter-reset: podium;

  /* A subgrid row rather than display: contents, which can drop the item's list semantics. */
  & > .sr-podium__item {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    counter-increment: podium;
  }

  & > .sr-podium__item::before {
    color: var(--sr-muted);
    text-align: end;
    content: counter(podium) ".";
  }
}

.sr-block .sr-best {
  display: block;
  font-size: 0.85em;
  font-weight: 600;

  /* A line of text ("Best [flag]: 16. E. Hallberg"): the name (no flag of its own here) on the text's baseline. */
  & .sr-person {
    vertical-align: baseline;
  }
}

.sr-block tr.is-cancelled {
  color: var(--sr-muted);
  text-decoration: line-through;

  & .sr-col-podium {
    text-decoration: none;
  }
}
