/* Top-layer menus escape table clipping without moving Blazor-owned DOM nodes. */
.app-action-popover[popover] {
    position: fixed !important;
    inset: auto !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
    width: min(320px, calc(100vw - 16px)) !important;
    min-width: 0 !important;
    max-width: min(320px, calc(100vw - 16px)) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
}
.app-action-popover[popover] button {
    white-space: normal !important;
    overflow-wrap: anywhere;
}
.app-action-popover::backdrop { background: transparent; pointer-events: none; }

/* The top layer needs no artificial space inside the table. */
:is(.module-page, .finance-page) :is(.table-responsive, .finance-responsive-table, .finance-table-wrapper, .payment-batches-scroll):has(.app-action-popover) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
