/* Animation only: Gutenberg and the theme own all layout and visual styling. */
/* Contain the offscreen travel without adding a page scrollbar or changing block sizes. */
.ywp-editorial-section:has(img[data-ywp-editorial-reveal]) { overflow-x: clip; }
.ywp-editorial-section .ywp-editorial-image img[data-ywp-editorial-reveal="pending"] {
    opacity: 0;
    transform: translate3d(var(--ywp-editorial-offset, 0px), 0, 0) var(--ywp-editorial-base-transform, translateZ(0));
}
.ywp-editorial-section .ywp-editorial-image img[data-ywp-editorial-reveal="visible"] {
    opacity: 1;
    animation: ywp-editorial-enter 1400ms cubic-bezier(.25, .1, .25, 1) both;
}
/* Keyboard focus bypasses any in-flight reveal immediately. */
.ywp-editorial-section .ywp-editorial-image:focus-within img {
    opacity: 1 !important;
    transform: var(--ywp-editorial-base-transform, none) !important;
    animation: none !important;
    transition: none !important;
}
@media (max-width: 600px), (prefers-reduced-motion: reduce) {
    .ywp-editorial-section .ywp-editorial-image img[data-ywp-editorial-reveal] {
        opacity: 1; transform: var(--ywp-editorial-base-transform, none); animation: none; transition: none;
    }
}
:is(.editor-styles-wrapper, .block-editor-page, .wp-admin) .ywp-editorial-section img[data-ywp-editorial-reveal] {
    opacity: 1; transform: var(--ywp-editorial-base-transform, none); animation: none; transition: none;
}
@media print {
    .ywp-editorial-section .ywp-editorial-image img[data-ywp-editorial-reveal] {
        opacity: 1; transform: var(--ywp-editorial-base-transform, none); animation: none; transition: none;
    }
}

/* One timeline owns both properties, including the initial pose on a fast entry. */
@keyframes ywp-editorial-enter {
    from { opacity: 0; transform: translate3d(var(--ywp-editorial-offset, 0px), 0, 0) var(--ywp-editorial-base-transform, translateZ(0)); }
    28.571% { opacity: 1; }
    to { opacity: 1; transform: translate3d(0, 0, 0) var(--ywp-editorial-base-transform, translateZ(0)); }
}
