/* S107 - the "we're getting things ready" screen: a rendered golfer swings, the ball
 * flies off, then it repeats. The animation is an animated WebP with transparency
 * (3.6s loop), so it sits straight on the page background. Shown by
 * itinerary_loading_controller.js when the captain taps "View Itinerary", which is the
 * slow moment (the itinerary page works out routes and drive times on the server before
 * it can render).
 * Colours are the DESIGN.md tokens in design_tokens.css.
 */

.itin-loading {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: var(--bg);
  text-align: center;
}
.itin-loading[hidden] { display: none; }

.itin-loading-anim,
.itin-loading-still {
  width: min(320px, 80vw);
  height: auto;
  aspect-ratio: 1;
}
/* The still picture is only for reduced motion, see below. */
.itin-loading-still { display: none; }

.itin-loading-title {
  font-family: 'Archivo', sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}
.itin-loading-sub {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}

/* S111: on a phone the swing is a quarter of its desktop width (320px -> 80px). */
@media (max-width: 640px) {
  .itin-loading-anim,
  .itin-loading-still { width: 80px; }
}

/* For anyone who has asked their device for less motion: show the still golfer instead
 * of the animation, so the screen is still readable, just still. */
@media (prefers-reduced-motion: reduce) {
  .itin-loading-anim { display: none; }
  .itin-loading-still { display: block; }
}
