/* Dash uses this placeholder in both the initial HTML and the React startup
   render. Style the placeholder itself so it disappears as soon as the app
   mounts, without a timer or an overlay that could cover the loaded page. */
#react-entry-point ._dash-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
  margin: 0;
  padding: 24px;
  background: var(--sp-surface-page);
  color: var(--sp-text-muted);
  font-family: var(--sp-font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

/* The brand tile (black, the B, the orange ball) carries its own colours, so it reads on the dark and the light
   page alike. The original loading text stays visible and available to assistive technology. */
#react-entry-point ._dash-loading::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  background: url("brand/ballproof-tile.svg") center / contain no-repeat;
}

#react-entry-point ._dash-loading::after {
  content: "";
  display: block;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid var(--sp-border-soft);
  border-top-color: var(--sp-accent);
  border-radius: 50%;
  animation: sp-app-loading-spin 0.9s linear infinite;
}

@keyframes sp-app-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #react-entry-point ._dash-loading::after {
    animation: none;
  }
}
