/* ==========================================================================
   Manage Users page (CompanyUserManagement.aspx) — page-specific overrides
   layered on top of grid.css.
   ----------------------------------------------------------------------------
   Scoped via `body.page-company-users`. Shared chrome (card, filters, search,
   grid, pager) comes from grid.css via the additional `body.page-grid` class;
   the primary CTA pill is the opt-in `a.q88-btn-primary-add` (components.css).

   Grid columns are user-configurable via GridCustomColumns (tblGridColumn), so
   per-column nth-child width locks are unreliable and none are set here.
   ========================================================================== */

/* QEN-8932 — Fleet vessel control is irrelevant on this page (it filters the
   grid by a vessel the company doesn't manage users per-vessel by) and
   confuses users. The markup sets inline `display:none` on it, but grid.css's
   `body.page-grid .modV2TRight-FleetVessel` rule unhides it with !important.
   Force it back off, page-scoped (mirrors scheduledreports.css §1). */
body.page-company-users .modV2TRight-FleetVessel {
    display: none !important;
}

/* Edit-column header blank caption — the Edit column is server-pinned as
   the last column via `AlwaysLastColumn="edit"` on GridCustomColumns (and
   `ColumnsHideAlwaysShow="^^edit^^"` prevents users hiding it), so
   `:last-child` targets it robustly even though this grid is DB-driven
   and column order is otherwise user-adjustable. */
body.page-company-users td.dxgvHeader:last-child,
body.page-company-users th.dxgvHeader:last-child,
body.page-company-users td.dxgvHeader:last-child *,
body.page-company-users th.dxgvHeader:last-child * {
    font-size: 0 !important;
    color: transparent !important;
}

/* Edit-column icon centering — unlike the other grids, the C# template
   (CompanyUserManagement.ascx.cs) sets `hlk.Width = new Unit("100%")`,
   which renders as inline `style="width:100%"` and overrides grid.css's
   canonical 20px `.jqEdit` box. Force it back to 20px and center the
   cell's content so the pencil sits mid-column. */
body.page-company-users tr.dxgvDataRow > td:last-child .jqEdit,
body.page-company-users tr.dxgvAlternateRow > td:last-child .jqEdit {
    width: 20px !important;
}
body.page-company-users tr.dxgvDataRow > td:last-child,
body.page-company-users tr.dxgvAlternateRow > td:last-child {
    text-align: center !important;
}

/* QEN-9276 backstop for the edit column's MinWidth (set in the grid's code-behind):
   if the edit cell is ever narrower than its icon, grid.css's ellipsis paints a
   stray "..." beside it. Keyed to the edit anchor, not :last-child, so a data
   column that ends up last keeps its ellipsis. */
body.page-company-users table[id$='_DXMainTable'] > tbody > tr > td:has(> a.jqEdit) {
    text-overflow: clip;
}
