/* Outrank native responsive image rules so only the filtered image is visible. */
.wp-block-group.has-hx-background-effects {
    position: relative;
    isolation: isolate;
    background-image: none !important;
}
.wp-block-group.has-hx-background-effects::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    border-radius: inherit;
    background-image: var(--hx-bg-base-image, var(--hx-bg-image));
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    background-attachment: inherit;
    opacity: var(--hx-bg-base-opacity, var(--hx-bg-opacity, 1));
    mix-blend-mode: var(--hx-bg-base-blend, var(--hx-bg-blend, normal));
    filter: var(--hx-bg-base-filter, var(--hx-bg-filter, none));
    transform: var(--hx-bg-base-transform, none);
    transform-origin: center;
    --hx-bg-rotation-from: var(--hx-bg-base-transform, none);
    --hx-bg-rotation-to: var(--hx-bg-base-rotation-end, none);
    animation: var(--hx-bg-base-animation, none);
}

@keyframes hx-background-spin {
    from { transform: var(--hx-bg-rotation-from); }
    to { transform: var(--hx-bg-rotation-to); }
}
@media (prefers-reduced-motion: reduce) {
    .wp-block-group.has-hx-background-effects::before { animation: none !important; }
}

/* Native WordPress gradients overlay images, without rotating with the image. */
.wp-block-group.has-hx-background-effects::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    background-image: var(--hx-bg-base-gradient, none);
}
