.PermissionsPage-groups {
  background: var(--control-bg);
  border-radius: var(--border-radius);
  display: block;
  overflow-x: auto;
  padding: 10px;
}
.Group {
  width: 90px;
  display: inline-block;
  text-align: center;
  color: var(--text-color);
  font-weight: bold;
  padding-left: 10px;
  padding-right: 10px;
}
.Group-name {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.Group--add {
  color: var(--muted-color);
  width: auto;
  margin-left: 10px;
  font-weight: normal;

  .Group-icon {
    font-size: 14px;
    margin-top: 5px;
  }
}


.PermissionsPage-permissions {
  margin: 20px 0 30px;
  overflow-x: auto;
  max-height: 75vh;
}

.PermissionGrid {
  white-space: nowrap;

  td, th {
    padding: 5px;
    text-align: left;
  }
  td {
    color: var(--muted-color);
  }
  thead th {
    position: sticky;
    top: 0;
    padding-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 12px;
    color: var(--muted-color);
    background: var(--body-bg);
    min-width: 140px;
    z-index: 1;

    &:first-child {
      z-index: 3;
      background: var(--body-bg);

      @media @tablet-up {
        left: 0;
      }
    }

    &:not(:hover) .PermissionGrid-removeScope {
      display: none;
    }
  }
  tbody {
    th {
      padding-right: 50px;
      z-index: 4;
      background: inherit;

      @media @tablet-up {
        position: sticky;
        left: 0;
      }

      .icon {
        margin-right: 5px;
        font-size: 14px;
        width: 18px;
        text-align: center;
        color: var(--muted-color);
      }
    }
    .Dropdown {
      .Dropdown-toggle {
        width: 100%;
        margin: -2px 0;
      }
      .Dropdown-menu {
        margin: 6px 0 0;
      }
    }
    .Button {
      text-decoration: none;

      .Badge {
        margin: 0 2px 0 0;
      }
    }
    td:not(:hover) .Select-caret,
    td:not(:hover) .Dropdown:not(.open) .Button-caret {
      display: none;
    }
    .open .Dropdown-toggle {
      box-shadow: none;
    }
  }
}
.PermissionGrid-removeScope {
  margin: -1px 0;
}
.PermissionDropdown {
  .Badge {
    margin: 0 3px 0 0;
    box-shadow: none;
  }
}
.PermissionGrid-section {
  background: var(--body-bg);

  td, th {
    padding-top: 10px;
  }
}
.PermissionGrid-child {
  background: var(--body-bg);

  td, th {
    position: relative;
  }
  th {
    font-weight: normal;
  }

  &:hover {
    background: var(--control-bg-light);
  }
}
