/* ModuleShell (`ui.module-shell`, ADR-0060): loading bar at the top edge while a page change inside a
   module takes longer than 150 ms. public/js/ui-module-shell.js shows and hides it with `hidden`. */

.ui-module-shell-progress {
  position: fixed;
  z-index: 1080;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  background: var(--color-surface-soft);
}

.ui-module-shell-progress[hidden] {
  display: none;
}

.ui-module-shell-progress::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: var(--color-brand);
  content: "";
  animation: ui-module-shell-progress 1.1s ease-in-out infinite;
}

@keyframes ui-module-shell-progress {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(250%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-module-shell-progress::before {
    width: 100%;
    animation: none;
    opacity: 0.6;
  }
}
