/* Both snapshots travel the same distance at the same speed, so the two
   rooms remain edge-to-edge throughout the swipe. */
:root.gallery-swipe-enter::view-transition-old(root),
:root.gallery-swipe-enter::view-transition-new(root),
:root.gallery-swipe-return::view-transition-old(root),
:root.gallery-swipe-return::view-transition-new(root) {
    height: 100%;
    width: 100%;
    mix-blend-mode: normal;
    animation-duration: 500ms;
    animation-timing-function: cubic-bezier(.4, 0, .2, 1);
    animation-fill-mode: both;
}
:root.gallery-swipe-enter::view-transition-old(root) { animation-name: gallery-slide-left-out; }
:root.gallery-swipe-enter::view-transition-new(root) { animation-name: gallery-slide-left-in; }
:root.gallery-swipe-return::view-transition-old(root) { animation-name: gallery-slide-right-out; }
:root.gallery-swipe-return::view-transition-new(root) { animation-name: gallery-slide-right-in; }

@keyframes gallery-slide-left-out { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes gallery-slide-left-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes gallery-slide-right-out { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes gallery-slide-right-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
