/* Shared action-column colors, independent of the dashboard theme. */
:root { --pg-actions-bg:#e6f5ee; --pg-actions-active:#d5eddf; --pg-actions-border:#e1eae7; }
.dark { --pg-actions-bg:#243e32; --pg-actions-active:#2d4c3e; --pg-actions-border:#34463f; }
/* Keep trailing record actions visible inside horizontally scrolling tables. */
.fi-ta-table > tbody > .fi-ta-row > .fi-ta-cell:last-child:has(> .fi-ta-actions),
.fi-ta-table > thead > tr > .fi-ta-actions-header-cell:last-child {
    position:sticky;
    inset-inline-end:0;
    z-index:1;
    background:var(--pg-actions-bg);
    border-inline-start:1px solid var(--pg-actions-border);
}
.fi-ta-table > thead > tr > .fi-ta-actions-header-cell:last-child {
    z-index:2;
    background:var(--pg-actions-active);
}
.fi-ta-table > tbody > .fi-ta-row:is(.fi-striped, .fi-selected, :hover) > .fi-ta-cell:last-child:has(> .fi-ta-actions) {
    background:var(--pg-actions-active);
}
/* x-float uses fixed positioning but keeps menus inside the sticky cell.
   Raise the owning cell while its dropdown is open, including keyboard use. */
.fi-ta-table > tbody > .fi-ta-row > .fi-ta-cell:last-child:has(> .fi-ta-actions .fi-dropdown-trigger[aria-expanded="true"]) {
    z-index:3;
}
/* Stacked mobile rows already show their actions without horizontal scrolling. */
@media (max-width:639px) {
    .fi-ta-table-stacked-on-mobile > tbody > .fi-ta-row > .fi-ta-cell:last-child:has(> .fi-ta-actions) {
        position:static;
        border-inline-start:0;
    }
}
