/* Globe Race extension (ext/globerace): the boats and their paths over the globe. */

#raceOverlay {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 16;
  overflow: hidden;
  /* Nothing here is a target: every press, drag and wheel reaches the globe. */
  pointer-events: none;
}

#raceOverlay.is-active {
  display: block;
}

#raceSvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* --race-color is set on each element from the boat's color. */
.race-path {
  fill: none;
  stroke: var(--race-color);
  stroke-width: 2;
  stroke-opacity: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.race-boat {
  fill: var(--race-color);
  stroke: rgba(0, 0, 0, 0.75);
  stroke-width: 1;
  stroke-linejoin: round;
}

/* A past competitor replayed on this race's clock: dotted and paler. */
.race-path.is-ghost {
  stroke-dasharray: 1 5;
  stroke-opacity: 0.7;
}

.race-boat.is-ghost {
  fill-opacity: 0.6;
}

/* Out of the race: still where it stopped, but not under sail. */
.race-path.is-retired {
  stroke-opacity: 0.45;
}

.race-boat.is-retired {
  fill-opacity: 0.5;
}
