/* Boot splash styles.
 *
 * Two variants live side by side in index.html and the deploy picks one via the
 * data-splash attribute on <html> (replaced from the SPLASH_VARIANT release
 * variable):
 *
 *   data-splash="expad"  -> branded Expad splash (logo on purple)
 *   anything else        -> brand-neutral spinner (white-label safe default,
 *                           also what an unreplaced #{SPLASH_VARIANT}# token
 *                           falls back to)
 */

/* ---------- neutral (default) ---------- */

body, html {
  margin:0;
  height:100%;
  background: #ffffff;
  background-size: 100% 100%;
}

.center {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

/* Brand-neutral boot spinner (no logo) shown while the app loads. */
.loader {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(0, 0, 0, 0.12);
  border-top-color: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  animation: splash-spin 0.9s linear infinite;
}

@keyframes splash-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

#splash-brand {
  display: none;
}

/* ---------- expad (branded) ---------- */

html[data-splash="expad"],
html[data-splash="expad"] body {
  background: #652ECB;
  background-size: 100% 100%;
}

html[data-splash="expad"] #splash-brand {
  display: block;
}

html[data-splash="expad"] #splash-neutral {
  display: none;
}

.contain {
  display:block;
  width:100%; height:100%;
  object-fit: contain;
}

.stretch {
  display:block;
  width:100%; height:100%;
}

.cover {
  display:block;
  width:100%; height:100%;
  object-fit: cover;
}

@media (prefers-color-scheme: dark) {
  body, html {
    margin:0;
    height:100%;
    background: #14151a;
    background-size: 100% 100%;
  }
  .loader {
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(255, 255, 255, 0.7);
  }

  html[data-splash="expad"],
  html[data-splash="expad"] body {
    background: #652ECB;
    background-size: 100% 100%;
  }
}
