/* Keep the package-builder welcome screen inside Safari's visible viewport. */
html.alp-welcome-active,
body.alp-builder-app-page.alp-welcome-active {
  width: 100%;
  height: var(--alp-app-height, 100dvh);
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #fff;
}

body.alp-builder-app-page {
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body.alp-builder-app-page.alp-welcome-active {
  position: fixed;
  inset: 0;
}

body.alp-builder-app-page.alp-welcome-active .alp-builder-app-shell,
body.alp-builder-app-page.alp-welcome-active .alp-builder-welcome {
  width: 100%;
  height: var(--alp-app-height, 100dvh);
  min-height: var(--alp-app-height, 100dvh);
  max-height: var(--alp-app-height, 100dvh);
  overflow: hidden;
}

@supports (-webkit-touch-callout: none) {
  body.alp-builder-app-page .alp-builder-app-shell,
  body.alp-builder-app-page .alp-builder-app-content {
    min-height: var(--alp-app-height, 100dvh);
  }
}

/* Soft staggered entrance for the base-service cards. */
.alp-builder-step.active[data-step="1"] .alp-service-choice {
  animation: alpServiceCardIn .68s cubic-bezier(.22, 1, .36, 1) both;
}

.alp-builder-step.active[data-step="1"] .alp-service-choice:nth-child(2) { animation-delay: 90ms; }
.alp-builder-step.active[data-step="1"] .alp-service-choice:nth-child(3) { animation-delay: 180ms; }
.alp-builder-step.active[data-step="1"] .alp-service-choice:nth-child(4) { animation-delay: 270ms; }
.alp-builder-step.active[data-step="1"] .alp-service-choice:nth-child(n+5) { animation-delay: 340ms; }

@keyframes alpServiceCardIn {
  from { opacity: 0; filter: blur(5px); transform: translateY(34px) scale(.98); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .alp-builder-step.active[data-step="1"] .alp-service-choice { animation: none; }
}
