@font-face {
  font-family: 'NGG1 Loader';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/libre-franklin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'NGG1 Loader';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/libre-franklin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'NGG1 Loader';
  font-style: normal;
  font-weight: 800;
  src: url('fonts/libre-franklin-800.woff2') format('woff2');
}

/* Loader card from quiz-ngg1.html, scoped to this screen. */
.center-stage[data-screen="analyzing"] {
  grid-template-columns: minmax(0, 1fr);
}

.loading-modal {
  width: 450px;
  max-width: 100%;
  padding: 28px 24px;
  border: 1px solid #dbe5ef;
  border-radius: 22px;
  background: linear-gradient(#f8fbff 0%, #fff 22%);
  box-shadow: 0 18px 48px #18385a0f;
  color: #18385a;
  font: 400 16px/normal 'NGG1 Loader', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  text-align: center;
}

.loading-modal h1 {
  margin: 2px 0 0;
  color: #18385a;
  font: 800 23px/1.25 'NGG1 Loader', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: normal;
  text-shadow: none;
  outline: none;
}

.loading-modal .product-reveal {
  height: 204px;
  margin-top: 24px;
  position: relative;
  display: grid;
  place-items: center;
}

.loading-modal .product-reveal img {
  grid-area: 1 / 1;
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
  opacity: 0;
  filter: blur(10px);
  transform: scale(.92);
  transition: opacity .22s ease, filter .45s ease, transform .45s ease;
  will-change: opacity, filter, transform;
}

.loading-modal .product-reveal img.active {
  opacity: .8;
  filter: blur(7px);
  transform: scale(.98);
}

.loading-modal .product-reveal.resolved img.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.loading-modal .loading-status {
  margin: 8px 0 14px;
  color: #667b93;
  font-size: 14px;
}

.loading-modal progress {
  display: block;
  width: 100%;
  height: 9px;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  appearance: none;
  background: #e1ecf7;
}

.loading-modal progress::-webkit-progress-bar {
  background: #e1ecf7;
  border-radius: 9px;
}

.loading-modal progress::-webkit-progress-value {
  background: #377dbd;
  border-radius: 9px;
  transition: width .05s linear;
}

.loading-modal progress::-moz-progress-bar {
  background: #377dbd;
  border-radius: 9px;
}

.loading-modal .loading-percent {
  margin-top: 9px;
  color: #3979b9;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.loading-modal .loading-stages {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 18px;
  border-radius: 12px;
  background: #f5f8fc;
  list-style: none;
  text-align: left;
}

.loading-modal .loading-stages li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a99aa;
  font-size: 13px;
  line-height: 1.4;
}

.loading-modal .stage-number {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid #dae3ee;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.loading-modal .loading-stages li.active {
  color: #245eb3;
  font-weight: 700;
}

.loading-modal .loading-stages li.active .stage-number {
  border-color: #5d94d3;
  background: #e9f3ff;
  animation: loader-stage-pulse 1s ease-in-out infinite;
}

.loading-modal .loading-stages li.done {
  color: #375f87;
}

.loading-modal .loading-stages li.done .stage-number {
  border-color: #377dbd;
  background: #377dbd;
  color: #fff;
}

@keyframes loader-stage-pulse {
  50% { box-shadow: 0 0 0 4px #377dbd12; }
}

@media (max-width: 600px) {
  .loading-modal { padding: 24px 20px; }
  .loading-modal .loading-stages { padding: 14px; gap: 10px; margin-top: 18px; }
}

@media (max-height: 650px) {
  .loading-modal .product-reveal { height: 154px; margin-top: 20px; }
  .loading-modal .product-reveal img { width: 140px; height: 140px; }
  .loading-modal h1 { font-size: 21px; }
  .loading-modal .loading-stages { gap: 8px; padding: 12px; margin-top: 14px; }
  .loading-modal .loading-stages li { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-modal .product-reveal img,
  .loading-modal progress::-webkit-progress-value { transition: none; }
  .loading-modal .product-reveal img { transform: none !important; }
  .loading-modal .loading-stages li.active .stage-number { animation: none; }
}
