/* ══ FlybirdQuant · Motion ════════════════════════════════════════════════════════
   Kurz, funktional, nie im Weg: Panelwechsel, Wert-Blitz bei Kursänderung, Skeleton,
   Toasts, Hover-Lift. Aus bei prefers-reduced-motion, „Animationen aus“ (tx-no-motion)
   und Workbench „Bewegung aus“ (wb-no-motion). */

@keyframes txFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes txRise { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@keyframes txPop { from { opacity: 0; transform: translateY(-6px) scale(.985) } to { opacity: 1; transform: none } }
@keyframes txBarIn { from { transform: scaleY(0) } to { transform: scaleY(1) } }
@keyframes txPulse { 0% { box-shadow: 0 0 0 0 rgba(46, 189, 133, .45) } 70% { box-shadow: 0 0 0 7px rgba(46, 189, 133, 0) } 100% { box-shadow: 0 0 0 0 rgba(46, 189, 133, 0) } }
@keyframes txShimmer { from { background-position: -320px 0 } to { background-position: 320px 0 } }
@keyframes txFlashUp { 0% { background-color: var(--tx-pos-soft); color: var(--tx-pos) } 100% { background-color: transparent } }
@keyframes txFlashDown { 0% { background-color: var(--tx-neg-soft); color: var(--tx-neg) } 100% { background-color: transparent } }
@keyframes txSlideIn { from { opacity: 0; transform: translateX(24px) } to { opacity: 1; transform: none } }
@keyframes txSpin { to { transform: rotate(360deg) } }

/* Panelwechsel: Inhalt hebt sich leicht an */
.panel-wrap:not(.hidden){ animation: txRise var(--tx-slow) var(--tx-ease); }
/* Karten/Kacheln,die neu gerendert werden{ animation: txRise var(--tx-slow) var(--tx-ease) both; }

/* Wert-Blitz (txFlash() in theme.js setzt die Klasse) */
.tx-flash-up{ animation: txFlashUp 700ms var(--tx-ease); border-radius: 3px; }
.tx-flash-down{ animation: txFlashDown 700ms var(--tx-ease); border-radius: 3px; }
html.tx-no-flash .tx-flash-up,html.tx-no-flash .tx-flash-down{ animation: none !important; }

/* Skeleton statt „Lädt …“ */
.tx-skel{ position: relative; overflow: hidden; border-radius: var(--tx-r-sm); background: var(--tx-bg-3); color: transparent !important; min-height: 10px; }
.tx-skel::after{ content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .045), transparent); background-size: 320px 100%; animation: txShimmer 1.2s linear infinite; }

/* Toasts / Alarm-Karten */
.notif-card{ animation: txSlideIn var(--tx-slow) var(--tx-ease) !important; }

/* Hover-Lift für klickbare Karten */
.platform-card,.bt-kpi,.jnl-kpi-card,.nt-feed-item{ transition: transform var(--tx-base) var(--tx-ease), border-color var(--tx-fast), background-color var(--tx-fast); }
.platform-card:hover,.nt-feed-item:hover{ transform: translateY(-1px); }
.symbol-dropdown:not(.hidden),#cab-ind-dropdown:not(.hidden){ animation: txPop var(--tx-base) var(--tx-ease); }

/* Bewegung aus */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
:root.tx-no-motion .tx-skel::after,:root.wb-no-motion .tx-skel::after{ animation: none; }
/* Ergebnis-Kacheln nach einer Nutzeraktion gestaffelt einblenden (nicht bei Auto-Refresh-Kacheln) */
.bt-kpi-row > *{ animation: txRise var(--tx-slow) var(--tx-ease) both; }
.bt-kpi-row > *:nth-child(2){ animation-delay: 30ms } .bt-kpi-row > *:nth-child(3){ animation-delay: 60ms } .bt-kpi-row > *:nth-child(4){ animation-delay: 90ms }
.bt-kpi-row > *:nth-child(n+5){ animation-delay: 120ms }
.tx-skel-row{ display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--tx-line-soft); }
.tx-skel-row .tx-skel{ height: 10px; display: block; }
.tx-skel-row .tx-skel + .tx-skel{ height: 8px; opacity: .7; }
