/* Bewegung (seit v1.233.0, Chat 2026-11-03: „eye-candy, smoothe Übergänge … dass es sich nicht so statisch anfühlt“).
   Eine zentrale Datei für alle Seiten. Grundsätze: kurz (unter 0,5 s), nichts verzögert die Arbeit,
   „Bewegung reduzieren“ am Gerät schaltet alles hier ab (siehe unten). Die zugehörige Logik steht in
   core.js (Swim24h.motion): Einblend-Zeitfenster, Knopf-Welle, Konfetti, Hochzählen, Menü-Markierung. */
:root {
  --s24-ease: cubic-bezier(.2, .8, .2, 1);
  --s24-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* 1 · Seitenwechsel: weich überblenden, Seitenleiste bleibt stehen (Chrome/Edge 126+, Safari 18.2+). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
#appNav .topnav { view-transition-name: s24nav; }
::view-transition-group(s24nav) { animation: none; }
::view-transition-old(s24nav) { display: none; }
::view-transition-new(s24nav) { animation: none; }

/* 2 · Seitenaufbau: Karten blenden kurz nacheinander ein – nur im Zeitfenster nach dem Laden
   (html.s24-enter, gesetzt von core.js), damit spätere Aktualisierungen nicht jedes Mal neu einblenden. */
@keyframes s24Up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes s24Fade { from { opacity: 0; } to { opacity: 1; } }
html.s24-enter :is(.card, .ix-card, .ix-chips, .ix-welcome):not(.app-modal-overlay *, .login-overlay *, #modalRoot *, [hidden]) {
  animation: s24Up .5s var(--s24-ease) both;
  animation-delay: calc(var(--s24-i, 0) * 55ms);
}
html.s24-enter :is(.card, .ix-card):nth-child(2) { --s24-i: 1; }
html.s24-enter :is(.card, .ix-card):nth-child(3) { --s24-i: 2; }
html.s24-enter :is(.card, .ix-card):nth-child(4) { --s24-i: 3; }
html.s24-enter :is(.card, .ix-card):nth-child(5) { --s24-i: 4; }
html.s24-enter :is(.card, .ix-card):nth-child(n+6) { --s24-i: 5; }
/* Bereichswechsel ohne Neuladen (z. B. Einstellungen): Inhalt blendet kurz über. */
.s24-swap { animation: s24Up .32s var(--s24-ease) both; }

/* 3 · Laden: schimmernde Platzhalter statt „Lädt…“ (core.js markiert solche Texte mit .s24-loading). */
@keyframes s24Shimmer { to { background-position: -200% 0; } }
.s24-loading { position: relative; color: transparent !important; min-height: 64px; user-select: none; }
.s24-loading::before {
  content: ""; position: absolute; left: 0; top: 6px; width: min(340px, 90%); height: 52px;
  --s24-sk: rgba(127,127,127,.14); --s24-hi: rgba(255,255,255,.6);
  background: linear-gradient(90deg, transparent 30%, var(--s24-hi) 50%, transparent 70%) 0 0 / 200% 100%, var(--s24-sk);
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 82% 12px no-repeat, linear-gradient(#000 0 0) 0 20px / 58% 12px no-repeat, linear-gradient(#000 0 0) 0 40px / 70% 12px no-repeat;
          mask: linear-gradient(#000 0 0) 0 0 / 82% 12px no-repeat, linear-gradient(#000 0 0) 0 20px / 58% 12px no-repeat, linear-gradient(#000 0 0) 0 40px / 70% 12px no-repeat;
  animation: s24Shimmer 1.2s linear infinite;
}
html:not(.light) .s24-loading::before { --s24-sk: rgba(255,255,255,.08); --s24-hi: rgba(255,255,255,.12); }

/* 4 · Überfahren: anklickbare Karten und Chips heben sich leicht an. */
.card.clickable, a.ix-card, .ix-home .ix-card, .ix-chip, a.ix-kchip {
  transition: transform .22s var(--s24-ease), box-shadow .22s var(--s24-ease), border-color .15s, background .15s;
}
@media (hover: hover) {
  .card.clickable:hover, a.ix-card:hover, .ix-home .ix-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(20, 40, 80, .10); }
  html:not(.light) :is(.card.clickable, a.ix-card, .ix-home .ix-card):hover { box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
  .ix-chip:hover, a.ix-kchip:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(20, 40, 80, .10); }
  .ix-tk { transition: background .18s, padding .18s, margin .18s; border-radius: 8px; }
  .ix-tk:hover { background: rgba(85, 194, 255, .06); padding-left: 6px; padding-right: 6px; margin: 0 -6px; }
}

/* 5 · Klick-Feedback: Knöpfe geben nach, kurze Welle (core.js), erledigte Zeilen gleiten weg. */
.btn:active:not(:disabled) { transform: scale(.96); }
.s24-ripple-wrap { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.s24-ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: s24Ripple .55s ease-out forwards; }
.btn-secondary .s24-ripple, .ix-lnk .s24-ripple { background: rgba(85, 194, 255, .25); }
@keyframes s24Ripple { to { transform: scale(2.6); opacity: 0; } }
.s24-leave { animation: s24Leave .4s var(--s24-ease) forwards; overflow: hidden; }
@keyframes s24Leave { to { opacity: 0; transform: translateX(28px); } }
.s24-yes, .s24-yes:hover { background: #2fbf7f !important; border-color: #2fbf7f !important; color: #fff !important; }
.s24-done { animation: s24Done .45s var(--s24-spring); }
@keyframes s24Done { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: none; } }
.s24-conf { position: fixed; width: 7px; height: 7px; border-radius: 2px; pointer-events: none; z-index: 10001; animation: s24Conf .9s ease-out forwards; }
@keyframes s24Conf { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* 6 · Aufklappen weich statt Sprung. <details> (Chrome 131+), eingeklappte Startseiten-Zeilen, Reiter. */
:root { interpolate-size: allow-keywords; }
details::details-content { block-size: 0; overflow-y: clip; transition: block-size .3s var(--s24-ease), content-visibility .3s allow-discrete; }
details[open]::details-content { block-size: auto; }
.ix-tk[data-more]:not([hidden]) { animation: s24Up .32s var(--s24-ease) both; }
.ix-opane:not([hidden]) { animation: s24Pane .3s var(--s24-ease); }
@keyframes s24Pane { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.ix-otabs { position: relative; }
.ix-otabs.s24-glide .ix-otab.on { border-bottom-color: transparent; }
.s24-tabline { position: absolute; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none;
  transition: left .35s var(--s24-spring), width .35s var(--s24-spring); }

/* 7 · Menü: Markierung gleitet zum neuen Punkt (core.js), Gruppen klappen weich auf. */
.s24-navglide { position: fixed; z-index: 3001; border-radius: 9px; background: rgba(85, 194, 255, .14); pointer-events: none;
  transition: top .38s var(--s24-spring), left .38s var(--s24-spring), width .38s var(--s24-spring), height .38s var(--s24-spring), opacity .2s; }
#appNav .s24-gliding { background: transparent !important; }
#appNav[inert] { pointer-events: none; }

/* 8 · Hinweise fahren ein, Fenster öffnen mit leichtem Zoom. */
.toast.show { animation: s24Toast .42s var(--s24-spring); }
@keyframes s24Toast { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes s24Pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
html .app-modal-overlay .card, .login-overlay .modal-card, .hm-modal, .rk-modal-card, #modalRoot .modal-card { animation: s24Pop .3s var(--s24-spring); }
.login-overlay, .hm-modal-overlay, .rk-modal-overlay { animation: s24Fade .2s ease; }

/* Wer am Gerät „Bewegung reduzieren“ eingestellt hat, bekommt nichts von alledem. */
@media (prefers-reduced-motion: reduce) {
  html.s24-enter *, .s24-swap, .s24-loading::before, .s24-leave, .s24-done, .ix-tk[data-more], .ix-opane,
  .toast.show, .app-modal-overlay .card, .login-overlay, .login-overlay .modal-card, .hm-modal, .hm-modal-overlay, .rk-modal-card, .rk-modal-overlay, #modalRoot .modal-card { animation: none !important; }
  .s24-tabline, .s24-navglide, .ix-tk, .ix-chip, .card.clickable, a.ix-card, .ix-home .ix-card, details::details-content { transition: none !important; }
  .btn:active:not(:disabled), .ix-chip:hover, .card.clickable:hover, a.ix-card:hover, .ix-home .ix-card:hover { transform: none !important; }
}
