/* Decorative layer: never contributes margins, height or pointer targets. */
.h4b-hero > .h4b-wave-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
}

.h4b-wave-background canvas,
.h4b-wave-preview canvas {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@media (min-width: 782px) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .h4b-hero > .h4b-wave-background > canvas {
        transform: translateY(var(--h4b-wave-scroll-offset, 0px));
    }
}

/* Editor placeholder stays selectable without affecting saved hero content. */
.editor-styles-wrapper .h4b-wave-editor {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 16px;
    margin: 0 0 16px;
    border: 1px dashed #004852;
    background: #f1f8f9;
    color: #004852;
    pointer-events: auto;
    font-size: 14px;
}

.h4b-wave-editor p { margin: 0 0 12px; }
.h4b-wave-preview { position: relative; height: 260px; margin-top: 12px; overflow: hidden; }

/* Let the background follow the full content height on phones. */
@media (max-width: 781px) {
    .h4b-hero:has(> .h4b-wave-background) {
        height: auto;
        min-height: 100svh;
    }
}
