/* BuilderUtilsWatermark — shared low-opacity preview overlay.
   Applied via BuilderUtilsWatermark.attach(host, asset). */

.preview-watermark-host {
    position: relative;
    overflow: hidden;
}

/* Watermark is inserted as the first child and uses no z-index, so per the
   stacking-context tree-order rules it paints below its sibling content
   (which is lifted to "positioned, no z-index" via the rule below). We
   intentionally avoid `isolation: isolate` on the host — it would create a
   stacking context that traps any popover/menu rendered inside (e.g., the
   asset-row ellipsis menu) beneath later cards. */
.preview-watermark {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Lift host's other children above the watermark by making them positioned
   without z-index — same stacking layer as the watermark, but later in tree
   order, so they paint on top. No-op for layout (relative + auto z-index).
   Wrapped in :where() so the rule is zero-specificity — any explicit
   position declaration on a host child (e.g., .behavior-tile-delete uses
   absolute) still wins. */
:where(.preview-watermark-host > *:not(.preview-watermark)) {
    position: relative;
}

.preview-watermark > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.1;
    filter: blur(2px);
}
