/* Users admin page — header button and the tier × page access modal. */

.page-header--actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Wider than the permissions modal: one column per tier. Fixed at the
   permissions panel's height cap (which Page access always reaches), so
   switching tabs never resizes the modal. */
.tiers-modal__panel {
  width: min(900px, calc(100vw - 2rem));
  height: calc(100vh - 3rem);
}

/* Swapped into the modal's scrolling body; the actions row sticks to its bottom. */
.tiers-form {
  display: flex;
  flex-direction: column;
}

.tiers-form__scroll {
  overflow-x: auto;
}

.tier-matrix__tier {
  text-align: center;
  white-space: nowrap;
}

.tier-matrix__count {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.tier-matrix__name {
  font-weight: 600;
  font-size: 0.88rem;
}

.tier-matrix__desc {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 40ch;
}

.tier-matrix__cell {
  text-align: center;
  vertical-align: middle;
}

.tier-matrix__cell .pill-toggle {
  margin-top: 0;
}

.tiers-form__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
}

.tiers-form__saved {
  margin-right: auto;
  font-size: 0.8rem;
  color: var(--good);
}

.tiers-form .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tabs sit flush with the modal body, not inset like the comment drawer's.
   Doubled class: comments.css loads after this file and would win a tie. */
.comment-tabs.tiers-tabs {
  padding: 0 0 0.75rem;
}

.tier-new {
  margin-top: 0;
}

.tier-new__hint {
  margin: 0.4rem 0 0.9rem;
}

.tier-members__tier {
  white-space: nowrap;
  vertical-align: top;
}

.tier-members__people {
  font-size: 0.85rem;
  line-height: 1.5;
}

.tier-members__inactive {
  color: var(--text-muted);
}

.tier-members__action {
  text-align: right;
  vertical-align: middle;
}
