/* Keep the loading indicator above the course, without an overlay surface. */
html.asmh-ui-pending {
  background-color: transparent !important;
}

html:is(.asmh-ui-pending, .asmh-page-arriving, .asmh-page-navigating)::after {
  --asmh-loader-size: 64px;
  content: "";
  position: fixed;
  display: block;
  inset: 0;
  width: var(--asmh-loader-size);
  height: var(--asmh-loader-size);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent url("page-loader.gif") center / contain no-repeat;
  transform: none;
  pointer-events: none;
  z-index: 2147483646;
  animation: asmh-page-loader-appear 1ms 120ms both !important;
}

@keyframes asmh-page-loader-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 600px) {
  html:is(.asmh-ui-pending, .asmh-page-arriving, .asmh-page-navigating)::after {
    --asmh-loader-size: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:is(.asmh-ui-pending, .asmh-page-arriving, .asmh-page-navigating)::after {
    background-image: url("page-loader-still.png");
    animation: none !important;
  }
}
