/* Single source for stack-driven z-index — OFW029 allowlist.
   Overlays are viewport-fixed below TopMenu. Never position:absolute
   inside .clubivate-main-stage (that ties geometry to the scrollport). */

.ui-stack-overlay-root {
    position: fixed;
    top: var(--clubivate-topmenu-height, 0px);
    right: 0;
    bottom: var(--clubivate-footer-height, 0px);
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.ui-stack-layer {
    position: relative;
    z-index: var(--ui-stack-z);
}

.ui-stack-layer--viewport-host {
    position: fixed;
    top: var(--clubivate-topmenu-height, 0px);
    right: 0;
    bottom: var(--clubivate-footer-height, 0px);
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--clubivate-modal-edge-gap, 10px);
    overflow-x: hidden;
    overflow-y: auto;
    pointer-events: none;
    z-index: var(--ui-stack-z);
}

.ui-stack-layer--viewport-host > [role="dialog"],
.ui-stack-layer--viewport-host > .modal-dialog,
.ui-stack-layer--viewport-host > .clubivate-confirm-dialog {
    pointer-events: auto;
}

.ui-backdrop {
    position: fixed;
    top: var(--clubivate-topmenu-height, 0px);
    right: 0;
    bottom: var(--clubivate-footer-height, 0px);
    left: 0;
    z-index: var(--ui-stack-z);
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.blazor-error-ui-stack {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    pointer-events: none;
}

.blazor-error-ui-stack #blazor-error-ui {
    pointer-events: auto;
}
