/* App start preloader — LMS FullPageLoader, brand tokens */

html,
body {
  background: var(--q-dark, #f8fafc);
}

.full-page-loader {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--q-info, #ffffff) 80%, transparent);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  color: var(--q-accent, #0f172a);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#app-boot-loader.full-page-loader {
  position: fixed;
  inset: 0;
  z-index: 4000;
  height: 100%;
}

.full-page-loader .particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.full-page-loader .particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--q-primary, #e11d48) 55%, white),
    var(--q-primary, #e11d48)
  );
  border-radius: 50%;
  opacity: 0.4;
  animation: app-boot-float 4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.full-page-loader .particle:nth-child(1) {
  top: 20%;
  left: 15%;
}
.full-page-loader .particle:nth-child(2) {
  top: 60%;
  left: 10%;
}
.full-page-loader .particle:nth-child(3) {
  top: 80%;
  left: 25%;
}
.full-page-loader .particle:nth-child(4) {
  top: 15%;
  right: 20%;
}
.full-page-loader .particle:nth-child(5) {
  top: 50%;
  right: 15%;
}
.full-page-loader .particle:nth-child(6) {
  top: 75%;
  right: 25%;
}

@keyframes app-boot-float {
  0%,
  100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-20px) translateX(var(--x, 10px)) scale(1.2);
    opacity: 0.7;
  }
}

.full-page-loader .loader-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: app-boot-fade-in 0.6s ease-out;
}

@keyframes app-boot-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.full-page-loader .spinner-container {
  position: relative;
  width: 96px;
  height: 96px;
}

.full-page-loader .spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--q-primary, #e11d48) 22%, white);
  border-top-color: var(--q-primary, #e11d48);
  animation: app-boot-spin 1.2s linear infinite;
}

.full-page-loader .orbit {
  position: absolute;
  inset: -8px;
  animation: app-boot-spin 3s linear infinite;
}

.full-page-loader .orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--q-primary, #e11d48);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  box-shadow: 0 0 8px rgba(var(--q-primary-rgb, 225, 29, 72), 0.5);
}

.full-page-loader .orbit-dot:nth-child(1) {
  transform: rotate(0deg) translateX(56px) translateY(-50%);
  animation: app-boot-orbit-pulse 1.5s ease-in-out infinite;
}

.full-page-loader .orbit-dot:nth-child(2) {
  transform: rotate(120deg) translateX(56px) translateY(-50%);
  animation: app-boot-orbit-pulse 1.5s ease-in-out 0.5s infinite;
  opacity: 0.7;
  width: 6px;
  height: 6px;
}

.full-page-loader .orbit-dot:nth-child(3) {
  transform: rotate(240deg) translateX(56px) translateY(-50%);
  animation: app-boot-orbit-pulse 1.5s ease-in-out 1s infinite;
  opacity: 0.4;
  width: 4px;
  height: 4px;
}

@keyframes app-boot-orbit-pulse {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(var(--q-primary-rgb, 225, 29, 72), 0.5);
  }
  50% {
    box-shadow: 0 0 16px rgba(var(--q-primary-rgb, 225, 29, 72), 0.8);
  }
}

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

.full-page-loader .logo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--q-primary, #e11d48),
    color-mix(in srgb, var(--q-primary, #e11d48) 80%, black)
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(var(--q-primary-rgb, 225, 29, 72), 0.4);
  animation: app-boot-breathe 2s ease-in-out infinite;
}

.full-page-loader .logo-center--image {
  background: transparent;
  box-shadow: none;
}

.full-page-loader .logo-center--image .logo-glow {
  display: none;
}

.full-page-loader .logo-letter {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.25rem;
  z-index: 1;
}

.full-page-loader .logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  z-index: 1;
}

.full-page-loader .logo-glow {
  position: absolute;
  inset: -4px;
  background: radial-gradient(circle, rgba(var(--q-primary-rgb, 225, 29, 72), 0.3) 0%, transparent 70%);
  border-radius: 16px;
  animation: app-boot-glow 2s ease-in-out infinite;
}

@keyframes app-boot-breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes app-boot-glow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.full-page-loader .text-content {
  text-align: center;
  max-width: 320px;
  padding: 0 1rem;
  margin-top: 0.5rem;
}

.full-page-loader .title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--q-accent, #0f172a);
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem 0;
}

.full-page-loader .title .word {
  display: inline-block;
  animation: app-boot-slide 0.5s ease-out 0.2s both;
}

.full-page-loader .title .accent {
  color: var(--q-primary, #e11d48);
  display: inline-block;
  animation: app-boot-slide 0.5s ease-out 0.4s both;
}

@keyframes app-boot-slide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.full-page-loader .loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.full-page-loader .dot {
  width: 6px;
  height: 6px;
  background: var(--q-primary, #e11d48);
  border-radius: 50%;
  animation: app-boot-bounce 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}

@keyframes app-boot-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
