/* The waiting cover: after a big form is sent (Sign in, Create account, Pay, Book), the page dims and a hexagon spins in
   the middle of the screen until the next page comes. Shown by site.js when the pressed button has data-cover; the markup
   is in views/partials/body-start.php. With reduced motion the hexagon does not turn: it slowly fades in and out. */
.cover {
  position: fixed;
  inset: 0;
  z-index: var(--z-cover);
  display: grid;
  place-items: center;
  background-color: var(--c-backdrop);
  animation: cover-in var(--duration-base) var(--ease);
}

.cover[hidden] {
  display: none;
}

.cover__hex {
  width: var(--cover-hex);
  height: var(--cover-hex);
  overflow: visible;
  animation: cover-spin 1.2s linear infinite;
}

.cover__track,
.cover__arc {
  fill: none;
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.cover__track {
  stroke: var(--c-cover-track);
}

.cover__arc {
  stroke: var(--c-page);
  stroke-dasharray: 30 70;
}

@keyframes cover-in {
  from {
    opacity: 0;
  }
}

@keyframes cover-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cover-pulse {
  50% {
    opacity: 0.4;
  }
}

/* base.css stops every animation under reduced motion; this one still shows it is working, without movement */
@media (prefers-reduced-motion: reduce) {
  .cover__hex {
    animation: cover-pulse 2s var(--ease) infinite !important;
  }
}
