/* A control group's slot (js/ui/motion.js revealControls) opens/closes with its dust; a transition,
   not @keyframes, so it can't fight `.mark-forming`'s animation. */
.reveal-group-transition {
    overflow: hidden;
    /* The app's usual (0.16, 1, .3, 1) is ~half done in 30ms: a whole row read as snapping open. */
    transition: max-width var(--reveal-ms, 320ms) var(--reveal-ease, cubic-bezier(0.22, 0.61, 0.36, 1)),
                max-height var(--reveal-ms, 320ms) var(--reveal-ease, cubic-bezier(0.22, 0.61, 0.36, 1));
}
@media (prefers-reduced-motion: reduce) {
    .reveal-group-transition { transition: none; }
}

/* Transition's group (revealControls modeFx): it grows in, and shrinks leaving. Sliding slides its picture whole
   instead (motion/control/modeGhost.js): its children sliding in a shrinking slot squeezed it (user report). */
:root[data-motion="transition"] .reveal-mode-in { animation: revealGrow var(--reveal-mode-ms, 520ms) cubic-bezier(0.22, 0.61, 0.36, 1) both; }
:root[data-motion="transition"] .reveal-mode-out { animation: revealGrow var(--reveal-mode-ms, 400ms) cubic-bezier(0.4, 0, 0.6, 1) reverse both; }
@keyframes revealGrow { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .reveal-mode-in, .reveal-mode-out, :is(.reveal-mode-in, .reveal-mode-out) > * { animation: none; }
}

/* A selection bar leaving (motion.js revealBar) is HELD at its height, then its whole footprint closes,
   so the list below never jumps (user report). */
.bar-held { height: var(--bar-h); max-height: var(--bar-h); overflow: hidden; }
.bar-held.bar-closing {
    height: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0;
    /* The gentle S (motion.js REVEAL_EASE_OUT). */
    transition: height var(--reveal-ms, 400ms) cubic-bezier(0.45, 0.05, 0.6, 0.9),
                max-height var(--reveal-ms, 400ms) cubic-bezier(0.45, 0.05, 0.6, 0.9),
                padding-top var(--reveal-ms, 400ms) cubic-bezier(0.45, 0.05, 0.6, 0.9),
                padding-bottom var(--reveal-ms, 400ms) cubic-bezier(0.45, 0.05, 0.6, 0.9),
                border-bottom-width var(--reveal-ms, 400ms) cubic-bezier(0.45, 0.05, 0.6, 0.9);
}
@media (prefers-reduced-motion: reduce) {
    .bar-held.bar-closing { transition: none; }
}

/* Filtering (motion.js createFilterAnimator): what stops matching has no CSS exit (a list that opts in
   dissolves it in dust); the rows LEFT arrive, behind their gathering motes. Opacity + transform only. */
.filter-entering {
    animation: rowFilterIn 0.34s cubic-bezier(0, 0, 0.6, 1) both;
}
@keyframes rowFilterIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: var(--rest-opacity, 1); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .filter-entering { animation: none; }
}
