/* Colors, the panel look, the error box and the footer come from https://andrewmacheret.com/projects.css */

html, body, #map {
  height: 100%;
  margin: 0;
}

body {
  line-height: 1.4;
}

#status {
  position: absolute;
  z-index: 1000;
  top: 12px;
  left: 56px;
  width: min(320px, calc(100vw - 68px));
  padding: 12px 16px;
}

#status-text:not(.alert),
details p {
  margin-top: 6px;
  color: var(--muted);
}

details {
  margin-top: 8px;
  font-size: 13px;
}

summary {
  color: var(--muted);
}

/* Center the label on the vehicle's position */
.vehicle span {
  display: inline-block;
  transform: translate(-50%, -50%);
  padding: 1px 5px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

/* A triangle that orbits the vehicle's position, pointing the way it's going */
.vehicle .arrow {
  position: absolute;
  left: -5px;
  top: calc(-1 * var(--distance));
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-bottom: 8px solid;
  border-top-width: 0;
  /* Turn around the vehicle's position, not the triangle's own center */
  transform-origin: 5px var(--distance);
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.8));
}

.vehicle.rail span {
  border-radius: 3px;
  border-width: 2px;
  font-size: 12px;
}
