/* Aquacert Bewegung – wiederverwendbare Klassen für die echte App.
   Benötigt tokens.css. Alle Effekte entfallen bei "Bewegung reduzieren". */

/* Inhalt eines Screens beim Öffnen gestaffelt einblenden:
   <main class="aq-enter"> … Kinder erscheinen nacheinander */
.aq-enter > * {
  opacity: 0;
  translate: 0 18px;
  animation: aq-up var(--aq-dur-screen) var(--aq-ease-out) forwards;
}
.aq-enter > *:nth-child(1) { animation-delay: calc(var(--aq-stagger) * 0); }
.aq-enter > *:nth-child(2) { animation-delay: calc(var(--aq-stagger) * 1); }
.aq-enter > *:nth-child(3) { animation-delay: calc(var(--aq-stagger) * 2); }
.aq-enter > *:nth-child(4) { animation-delay: calc(var(--aq-stagger) * 3); }
.aq-enter > *:nth-child(5) { animation-delay: calc(var(--aq-stagger) * 4); }
.aq-enter > *:nth-child(n+6) { animation-delay: calc(var(--aq-stagger) * 5); }

/* Listeneinträge von rechts hereingleiten: <div class="aq-slide-list"> */
.aq-slide-list > * {
  opacity: 0;
  translate: 30px 0;
  animation: aq-slide var(--aq-dur-base) var(--aq-ease-out) forwards;
}
.aq-slide-list > *:nth-child(2) { animation-delay: .15s; }
.aq-slide-list > *:nth-child(3) { animation-delay: .3s; }
.aq-slide-list > *:nth-child(n+4) { animation-delay: .45s; }

/* Neuer Screen schiebt sich von rechts über den alten (Detailansicht) */
.aq-push-in { animation: aq-push var(--aq-dur-screen) var(--aq-ease-out) both; }
.aq-push-out { animation: aq-push var(--aq-dur-screen) var(--aq-ease-out) reverse both; }

/* Tipp-Rückmeldung: per JS kurz die Klasse setzen, z. B. on pointerdown */
.aq-press { animation: aq-press var(--aq-dur-base) ease-out; }

/* Lade-Icon dreht, solange Synchronisation läuft */
.aq-spin { animation: aq-spin .9s linear infinite; }

/* Toast oben, Klasse .is-visible zum Zeigen */
.aq-toast {
  position: fixed;
  left: 14px; right: 14px;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  translate: 0 -150%;
  transition: translate var(--aq-dur-base) var(--aq-ease-out);
  z-index: 1000;
}
.aq-toast.is-visible { translate: 0 0; }

/* PIN-Feld füllt sich */
.aq-pin-dot { scale: 0; transition: scale var(--aq-dur-fast) var(--aq-ease-pop); }
.aq-pin-dot.is-filled { scale: 1; }

/* Fortschrittsbalken wächst weich */
.aq-progress > i { transition: width var(--aq-dur-screen) var(--aq-ease-out); }

@keyframes aq-up { to { opacity: 1; translate: 0 0; } }
@keyframes aq-slide { to { opacity: 1; translate: 0 0; } }
@keyframes aq-push { from { translate: 100% 0; } to { translate: 0 0; } }
@keyframes aq-press {
  0% { scale: 1; }
  35% { scale: .94; box-shadow: 0 0 0 10px rgba(0, 61, 253, .18); }
  100% { scale: 1; box-shadow: 0 0 0 0 rgba(0, 61, 253, 0); }
}
@keyframes aq-spin { to { rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .aq-enter > *, .aq-slide-list > * { opacity: 1; translate: none; animation: none; }
  .aq-push-in, .aq-push-out, .aq-press, .aq-spin { animation: none; }
  .aq-toast, .aq-pin-dot, .aq-progress > i { transition: none; }
}
