/*
  The splash is laid out to match LoadingPageWidget (lib/Pages/LoadingPage/
  loading_page_screen.dart) — a 260x65 logo box, 20px gap, 60px spinner slot —
  so the hand-over to Flutter lands exactly on top of it instead of jumping.
  Change one, change the other.
*/
html,
body {
  margin: 0;
  height: 100%;
  background-color: #000;
}

/*
  The styles the Flutter engine puts on <body> when it mounts
  (FullPageEmbeddingStrategy._setHostStyles), applied up front so mounting
  changes nothing. It also centres on the same viewport Flutter does — 100vh is
  the large viewport on mobile and sits below centre while the toolbar shows.
*/
body {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Org-coloured gradient behind the splash, set from fetchMetaData. */
#splashBg {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

#splash {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#splashBg, #orgImage, #progressbar {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Fixed box, so neither the image loading nor the org logo swapping in can move the bar. */
#orgImage {
  width: 260px;
  height: 65px;
  object-fit: contain;
  margin-bottom: 20px;
}

/* The footprint of Flutter's 60px loading spinner, with the bar centred in it. */
.progress-slot {
  height: 60px;
  display: flex;
  align-items: center;
}

/* Styles for the progress bar container */
.progress-container {
  width: 260px;
  height: 8px;
  background-color: #868484;
  border-radius: 10px;
  overflow: hidden;
}

/* Styles for the progress bar */
.progress-bar {
  display: block;
  height: 100%;
  background-color: #e5edf3;
  width: 0;
  transition: width 0.5s ease;
}

/* CSS for a fade-in animation */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

/* Keyframes for the fadeIn animation */
@keyframes fadeIn {
  0% {
      opacity: 0;
  }
  60% {
      opacity: 0;
  }
  100% {
      opacity: 1;
  }
}
