/* Critical boot screen styles - loaded immediately */
html {
  height: fill-available;
  min-height: 100%;
  touch-action: manipulation;
}

::-webkit-scrollbar {
  display: none;
}


.MuiModal-root .MuiBox-root {
  z-index: 1;
}

body {
  /* Initial background set to boot screen color, updated by JavaScript after boot */
  /* background: #f5f5f5; */
  background: #0383ce;
  color: #fff;
  height: fill-available;
  min-height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  touch-action: manipulation;
}

.cl-modalBackdrop {
  padding-top: 16px;
}

/* After boot screen, body background is updated to theme.palette.background.default (#f5f5f5) */

#root {
  height: fill-available;
  min-height: 100%;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Boot loading screen styles */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0);
  }
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#boot-loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  min-height: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0383ce;
  overflow: hidden;
  pointer-events: auto;
  animation: fadeIn 0.3s ease-out;
}

.boot-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  zoom: 0.85;
}

#boot-loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.boot-loading-icon {
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.boot-loading-icon img {
  width: 120px;
  height: 120px;
}

.boot-loading-title {
  color: white;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 8px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.boot-loading-text {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.boot-loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.boot-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  animation: bounce 1.4s ease-in-out infinite;
}

.boot-loading-dot:nth-child(1) {
  animation-delay: 0s;
}

.boot-loading-dot:nth-child(2) {
  animation-delay: 0.16s;
}

.boot-loading-dot:nth-child(3) {
  animation-delay: 0.32s;
}