/*
 * Moving between screens in place (js/softNav.js).
 *
 * The bar along the top of the window while the next screen is fetched. It only
 * appears once a fetch has taken 150ms, so a quick screen arrives with no bar at
 * all; it creeps towards the right and never reaches it on its own, then fills
 * and fades when the screen is in.
 */
.soft-nav-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 2000;
  width: 0;
  height: 3px;
  background: var(--primary-600, #487fff);
  box-shadow: 0 0 6px rgba(72, 127, 255, 0.5);
  opacity: 0;
  pointer-events: none;
}

.soft-nav-progress.is-loading {
  width: 85%;
  opacity: 1;
  transition: width 8s cubic-bezier(0.1, 0.7, 0.2, 1), opacity 0.15s ease;
}

.soft-nav-progress.is-done {
  width: 100%;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.3s ease 0.2s;
}

/* Focus moves to the new content, as a page load would start from the top; the
   content is not a control, so it is not outlined. */
.dashboard-main-body:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .soft-nav-progress.is-loading,
  .soft-nav-progress.is-done {
    transition: opacity 0.15s ease;
  }
}
