/* Page Builder: entrance animations. A node with an entrance carries the class pb-anim, and its compiled rule names
   the keyframes (--pb-entrance), the duration and the delay. The script marks the page with pb-motion and each node
   with pb-anim-in once it comes into view.
   Until the script has run, at most three seconds, such a node is not shown, so it does not appear twice; a page
   whose script never runs shows it after the three seconds. A visitor who asked for less motion sees every node at
   once and nothing moves. The editor's canvas never sets pb-anim. */

@media (prefers-reduced-motion: no-preference) {
    .pb-root .pb-anim {
        animation: pb-anim-wait 3s step-end both;
    }

    html.pb-motion .pb-root .pb-anim {
        animation: var(--pb-entrance, pb-fade) var(--pb-entrance-duration, 600ms) cubic-bezier(.2, .6, .2, 1) var(--pb-entrance-delay, 0ms) both paused;
    }

    html.pb-motion .pb-root .pb-anim.pb-anim-in {
        animation-play-state: running;
    }
}

@keyframes pb-anim-wait {
    from {
        opacity: 0;
    }
}

@keyframes pb-fade {
    from {
        opacity: 0;
    }
}

@keyframes pb-fade-up {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
}

@keyframes pb-fade-down {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
}

@keyframes pb-fade-left {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
}

@keyframes pb-fade-right {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }
}

@keyframes pb-zoom-in {
    from {
        opacity: 0;
        transform: scale(.85);
    }
}

@keyframes pb-zoom-out {
    from {
        opacity: 0;
        transform: scale(1.15);
    }
}

@keyframes pb-slide-up {
    from {
        transform: translate3d(0, 100%, 0);
    }
}

@keyframes pb-flip-up {
    from {
        opacity: 0;
        transform: perspective(800px) rotateX(-70deg);
    }
}

@keyframes pb-flip-left {
    from {
        opacity: 0;
        transform: perspective(800px) rotateY(70deg);
    }
}
