/* PATCH 005B: Entity workspace boundary */
#entity-workspace[hidden],
#entity-workspace-gate[hidden],
#entity-dialog[hidden] {
    display: none !important;
}

#entity-workspace {
    position: fixed;
    inset: 0;
    z-index: 40000;
    pointer-events: none;
    contain: layout;
}

#entity-workspace-gate {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: auto;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(2px);
}

#entity-workspace > #entity-dialog {
    z-index: 1;
    pointer-events: auto;
}

#entity-dialog:not([open]) {
    display: none !important;
}

#entity-dialog[open] {
    position: fixed;
}

/* Native backdrop is intentionally disabled. The workspace gate owns the floor. */
#entity-dialog::backdrop {
    display: none;
    background: transparent;
    pointer-events: none;
}

/* Tooltip remains a peer view and must clear the entity workspace boundary. */
body > #tooltip:not([hidden]) {
    z-index: 41000 !important;
}
