/* The loading screen (index.html, boot.js): the app's colours, its badge,
   a car with its trailer driving along; still when less motion is asked. */
html,
body {
  margin: 0;
  background: #f4f1ea;
}

#loading {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: #f4f1ea;
  color: #152a4d;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  text-align: center;
}

#loading p {
  margin: 0;
}

.loading-badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #152a4d;
  color: #f2a93b;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.loading-name {
  font-size: 22px;
  font-weight: 700;
}

.loading-road {
  position: relative;
  width: 180px;
  height: 22px;
  margin: 10px 0 4px;
  overflow: hidden;
  border-bottom: 3px dashed rgba(21, 42, 77, 0.25);
}

.loading-car {
  position: absolute;
  bottom: 3px;
  left: -48px;
  width: 44px;
  height: 14px;
  border-radius: 4px 8px 2px 2px;
  background: #152a4d;
  box-shadow: -22px 2px 0 -2px #f2a93b;
  animation: loading-drive 2.2s ease-in-out infinite;
}

@keyframes loading-drive {
  to {
    left: 200px;
  }
}

.loading-slow {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 14px;
}

.loading-slow[hidden] {
  display: none;
}

.loading-call,
.loading-reload {
  display: inline-block;
  min-width: 200px;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid #152a4d;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.loading-call {
  border-color: #f2a93b;
  background: #f2a93b;
  color: #152a4d;
}

.loading-reload {
  background: #ffffff;
  color: #152a4d;
}

@media (prefers-reduced-motion: reduce) {
  .loading-car {
    left: 68px;
    animation: none;
  }
}
