// One loader position for the boot markup, the code-loading fallback and every
// screen's own spinner, so handing over between them never moves the spinner.
// The layer covers the content area; the spinner is pinned to its centre and
// remains in the same place across nested and independently loaded sections.
.arraysubs-page-loader {
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 32px);
  inset-inline-end: 0;
  bottom: 0;
  inset-inline-start: 160px;
  z-index: 20;
  color: #50575e;
  pointer-events: none;

  .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    float: none;
    margin: -10px 0 0 -10px;
  }
}

body.folded .arraysubs-page-loader {
  inset-inline-start: 36px;
}

@media screen and (max-width: 960px) {
  body.auto-fold .arraysubs-page-loader {
    inset-inline-start: 36px;
  }
}

@media screen and (max-width: 782px) {
  body.wp-admin .arraysubs-page-loader,
  body.folded .arraysubs-page-loader,
  body.auto-fold .arraysubs-page-loader {
    inset-inline-start: 0;
  }
}

// The router may retain the previous screen while its next chunk downloads.
.arraysubs-page-loader--route {
  display: none;
}

html.arraysubs-route-pending .arraysubs-page-loader--route {
  display: block;
}
