/**
 * demo_loading.css — full-screen progress overlay shown while a demo provisions.
 *
 * Markup: templates/components/demo_loading_overlay.html
 * Behaviour: static/js/controllers/demo_loading_controller.js
 *
 * Design tokens (--orange, --sandstone, --black) are defined in
 * chippie-marketing.css :root; this file loads alongside it in the
 * public_base.html head, with literal fallbacks for safety.
 *
 * The fill is driven by width transitions (not a fixed keyframe) so completion is
 * a real signal: .is-active eases the bar toward 90% while the POST is in flight,
 * then .is-complete carries it the rest of the way to 100% before the controller
 * navigates. Transitions compose, so the snap-to-100% starts from wherever the bar
 * currently sits — no reset-to-zero jump. Removing the classes (bfcache restore via
 * the back button) returns the bar to zero for the next run.
 */
.demo-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sandstone, #F7F1E6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.demo-loading-overlay.is-active {
  opacity: 1;
  visibility: visible;
}
body.demo-loading-lock { overflow: hidden; }

.demo-loading-card {
  text-align: center;
  padding: 0 24px;
  max-width: 460px;
  width: 100%;
}
.demo-loading-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange, #E85D1F);
  margin-bottom: 10px;
}
.demo-loading-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--black, #1A1A1A);
  margin-bottom: 26px;
}
.demo-loading-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(232, 93, 31, 0.15);
  overflow: hidden;
}
.demo-loading-fill {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange, #E85D1F), var(--orange-deep, #C44A14));
  overflow: hidden;
  transition: width 0.45s ease-out;
}
/* In flight: ease toward 90% (slows as it approaches, like the old keyframe). */
.demo-loading-overlay.is-active .demo-loading-fill {
  width: 90%;
  transition: width 11s cubic-bezier(0.16, 0.65, 0.3, 1);
}
/* Resolved: finish to 100% over ~0.45s before the controller navigates away. */
.demo-loading-overlay.is-active.is-complete .demo-loading-fill {
  width: 100%;
  transition: width 0.45s ease-out;
}
.demo-loading-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: demo-loading-shimmer 1.4s linear infinite;
}
@keyframes demo-loading-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.demo-loading-message {
  margin-top: 16px;
  font-size: 15px;
  color: rgba(26, 26, 26, 0.7);
  min-height: 1.5em;
}
@media (prefers-reduced-motion: reduce) {
  .demo-loading-fill::after { animation: none; }
}
