/* PR1.421 (#656) — Start-Ladeseite, Variante B (Kompass-Bild 1_Ladeseite.png, rechts).
   Markenflaeche: in Hell- und Dunkel-Theme identisch, deshalb feste Markenwerte statt
   Theme-Tokens (--ad-blue-700/-800/-900/-300 aus style-redesign.css).
   Gesteuert von js/components/boot-splash.js; liegt vor beiden Shells. */

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 10001; /* ueber der hoechsten App-Ebene (10000) — die Seite liegt vor allem */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, #005AA3 0, transparent 38%),
    linear-gradient(180deg, #003F75 0%, #002B52 100%);
  color: #FFFFFF;
  font-family: 'Fira Sans', system-ui, sans-serif;
  text-align: center;
  opacity: 1;
  transition: opacity 200ms ease-out;
}

.boot-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.boot-splash-mark {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
}

.boot-splash-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: boot-splash-spin 1.2s linear infinite;
}

.boot-splash-track,
.boot-splash-arc {
  fill: none;
  stroke-width: 2;
}

.boot-splash-track {
  stroke: rgba(255, 255, 255, 0.14);
}

/* Umfang 2·π·96 ≈ 603. Bogen = letzte 150 Einheiten (12 → 3 Uhr), Punkt an der Spitze. */
.boot-splash-arc {
  stroke: #62B5FF;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 150 453;
  stroke-dashoffset: 150;
}

.boot-splash-dot {
  fill: #FFFFFF;
}

.boot-splash-logo {
  position: relative;
  width: 130px;
  height: auto;
  filter: brightness(0) invert(1);
  animation: boot-splash-breathe 2.4s ease-in-out infinite alternate;
}

.boot-splash-name {
  margin: 28px 0 0;
  font-size: var(--fs-icon);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.boot-splash-status {
  margin: 20px 0 0;
  min-height: 1.5em;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: #FFFFFF;
}

.boot-splash-count {
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

.boot-splash-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.boot-splash-error[hidden] {
  display: none;
}

.boot-splash-hint {
  margin: 0;
  max-width: 36ch;
  font-size: var(--fs-body);
  color: rgba(255, 255, 255, 0.8);
}

.boot-splash-retry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 20px;
  border: 0;
  border-radius: 8px;
  background: #FFFFFF;
  color: #002B52;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.boot-splash-retry:hover {
  background: rgba(255, 255, 255, 0.88);
}

.boot-splash-retry:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

.boot-splash-retry > span {
  display: inline-flex;
}

/* Fehlerfall: kein kreisender Bogen, der „geht gleich weiter“ behauptet. */
.boot-splash.is-error .boot-splash-ring {
  animation: none;
}

.boot-splash.is-error .boot-splash-arc,
.boot-splash.is-error .boot-splash-dot {
  display: none;
}

.boot-splash.is-error .boot-splash-logo {
  animation: none;
}

@keyframes boot-splash-spin {
  to { transform: rotate(360deg); }
}

@keyframes boot-splash-breathe {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .boot-splash,
  .boot-splash-ring,
  .boot-splash-logo {
    animation: none;
    transition: none;
  }
}
