/* ==========================================================================
   WB Block Animations – Base Styles
   ==========================================================================
   The initial "from" state (opacity, transform) is applied inline by the JS
   engine so content remains visible when JavaScript is disabled (progressive
   enhancement). This stylesheet only provides optimisation hints and editor
   overrides.
   ========================================================================== */

/* ── GPU optimisation hint ─────────────────────────────────────────────────
   Applied only after the JS engine has initialised the element.
   ────────────────────────────────────────────────────────────────────────── */
[data-wb-block-anim] {
    will-change: transform, opacity;
}

/* ── Elementor Editor Override ─────────────────────────────────────────────
   Inside the editor, show every widget in its final (animated) state so the
   designer can work without invisible blocks.
   ────────────────────────────────────────────────────────────────────────── */
.elementor-editor-active [data-wb-block-anim] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Preview iframe: same reset when admin body class does not wrap canvas nodes (see wb-global-styles). */
body[class*='elementor-device-'] [data-wb-block-anim] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ── Cleanup after animation completes (triggered mode) ────────────────── */
[data-wb-block-anim].wb-block-anim-done {
    will-change: auto;
}
