/* Boost Hub modal root — outside .wrapper.
   Needs a high stacking context so fixed overlay/modals cover header too. */
#bh-modal-root.bh-modal-root {
    position: relative;
    z-index: 20000;
}

#bh-modal-root.bh-modal-root:not(:empty) {
    display: block;
}

body.bh-modal-open,
body.is-modal-open {
    overflow: hidden;
}

body.bh-modal-open .bgModalWindow.bgModalWindow_active,
body.is-modal-open .bgModalWindow.bgModalWindow_active {
    z-index: 20000;
}

/* Native <dialog>: reset UA chrome only.
   Do NOT set max-width/background here — that overrides .wrapMw_* limits (370/654px). */
dialog.wrapMw {
    border: none;
    padding: 0;
    margin: 0;
    color: inherit;
}

dialog.wrapMw:not([open]) {
    display: none !important;
}

/* Keep legacy fixed positioning + z-index from .wrapMw / JS; avoid UA dialog centering */
dialog.wrapMw[open] {
    display: block;
}

dialog.wrapMw::backdrop {
    background: transparent;
    pointer-events: none;
}
