/* =========================================================
   Role Overrides grid / pager / menu
   Extracted from alr.css
   ========================================================= */
.role-topbar {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.role-topbar-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: end;
}

.role-topbar-search {
  min-width: 26rem;
  flex: 1 1 26rem;
}

.role-topbar-pagesize {
  width: 7rem;
}

.role-topbar-actions {
  display: flex;
  gap: .75rem;
}

.role-table-wrap {
  width: 100%;
}

.role-pager {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-top: .35rem;
  margin-bottom: 1rem;
}

.role-pager-summary {
  color: var(--text-2);
}

.role-pager-controls {
  display: flex;
  gap: .75rem;
  margin-left: auto;
}

.role-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.role-table {
  width: 100%;
  min-width: 1565px;
  table-layout: fixed;
}

.role-table th,
.role-table td {
  vertical-align: top;
}

.role-table th {
  white-space: normal;
  line-height: 1.15;
}

.role-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.role-col-user { width: 140px; }
.role-col-email { width: 240px; }
.role-col-flag { width: 95px; }
.role-col-override { width: 105px; }
.role-col-effective { width: 105px; }
.role-col-action { width: 260px; }

.role-th-label {
  font-weight: 600;
}

.filterable {
  cursor: pointer;
}

.filterable:hover {
  color: var(--text-1);
}

.role-filter-state {
  display: inline-block;
  margin-left: .25rem;
  color: var(--text-1);
  font-weight: 700;
}

.role-action-form {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
}

.role-action-role { width: 100%; min-width: 0; }
.role-action-state { width: calc(50% - .2rem); min-width: 0; }
.role-action-reason { width: calc(50% - .2rem); min-width: 0; }

.column-menu {
  position: absolute;
  min-width: 170px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-1);
  box-shadow: var(--shadow-2);
  padding: .25rem 0;
  display: none;
  z-index: 3000;
}

.column-menu button {
  display: block;
  width: 100%;
  padding: .5rem .8rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-1);
  cursor: pointer;
}

.column-menu button:hover { background: var(--surface-3); }
.column-menu button.danger { color: var(--state-danger-text); }

.role-topbar-actions .btn + .btn { margin-left: .75rem; }
.role-pager-controls .btn + .btn { margin-left: .75rem; }
.role-table + .role-pager { margin-top: 1rem; }
.role-table td:last-child { padding-top: .5rem; padding-bottom: .5rem; }
.role-table-scroll + .role-pager { margin-top: 1rem; }

.role-pager .btn.disabled,
.role-pager .btn[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
  cursor: default;
}

.role-action-form .btn { margin-left: auto; }
