.cmf-tree-hide {
  display: none;
}

.cmf-tree-container {
  width: 100%;
  height: 100%;
}

.cmf-tree-container .mat-toolbar {
  padding: 0;
  background: #f1f1f1;
}

.cmf-tree {
  height: 100%;
  // min-width:300px;
  // не min-width: ; иначе прыгает sidenav
  background: #f1f1f1;

  ul,
  li {
    list-style: none;
  }

  ul {
    margin: 0;
    padding-left: 15px;
  }

  /* Почему дублируются стили и шаблон? */
  &.cdk-drop-list-dragging .mat-tree-node:hover {
    background-color: #c1c1c173;
  }

  .mat-tree-node {
    flex: none;
    min-height: 30px;
    text-decoration: none;

    &.drop-indicator {
      border-bottom: solid 4px #3498db;
    }

    &:hover .context {
      visibility: visible;
    }

    .context {
      cursor: pointer;
      display: flex;
      align-items: center;

      padding-left: 10px;

      visibility: hidden;

      .mat-icon {
        width: 15px;
        height: 15px;
        font-size: 15px;
        color: #222;
      }
    }
  }

  .mat-tree-node .node-name {
    overflow: hidden;
    max-width: 245px;
    margin: 7px;
    margin-left: 2px;
  }

  mat-tree-node {
    user-select: none;
    outline: none !important;
  }

  mat-tree-node.is-role-with-person {
    display: block;
  }

  mat-tree-node > a > mat-icon {
    margin-left: 30px;
  }

  .mat-icon-button {
    width: 30px;
    height: 30px;
    line-height: 30px;
  }

  .mat-icon {
    height: 30px;

    font-size: 18px;
    font-weight: normal;
    line-height: 30px;
    color: #474747;
  }

  .mat-icon.class-icon {
  }

  .mat-tree-node:hover {
    // background:#EBECEF;
  }

  .nested:hover {
    // background:#EBECEF;
  }

  .cmf-tree-selected > a > .mat-tree-node {
    background: #c1c1c1;
  }

  mat-tree-node.cmf-tree-selected a.mat-tree-node,
  mat-tree-node.cmf-tree-selected .role-person {
    background: #c1c1c1;
  }

  .mat-tree-node {
    cursor: pointer;
  }

  &.cdk-drop-list-dragging [data-class='CmfList']:hover {
    outline: 1px dashed rgb(85 136 218);
  }

  .role-person {
    margin-top: -4px;
    padding-bottom: 8px;
    padding-left: 20px;

    font-size: 12px !important;
    color: #6d6d6d;
  }
}

mat-nested-tree-node.cmf-tree-selected > li > .nested {
  font-weight: 600;
  background: #c1c1c1;
}

.mat-toolbar-tree-button {
}

.add-tree-item-button {
  padding-top: 15px;
}

.add-tree-item-button .button-menu {
  position: absolute;
  z-index: 1001;
  top: 32px;
  left: 0;

  display: none;

  background: #fff !important;
  border-radius: 4px;
  box-shadow: 0 2px 5px #aaa;
}

.add-tree-item-button:hover .button-menu {
  display: block;
  background: #fff !important;
}

.add-tree-item-button .button-menu .mat-button {
  display: block;

  width: 100%;
  min-width: 150px;

  font-size: 13px;
  text-align: left;

  background: #fff !important;
}

.add-tree-item-button:hover .button-menu .mat-button:hover {
  color: #000;
}

.add-tree-item-button .button-menu .mat-button .mat-icon {
  font-size: 16px;
  line-height: 24px;
  color: #202020;
  vertical-align: middle;
}

.mat-toolbar {
  a,
  button {
    /* color: #646464; */
  }
}

:host ::ng-deep .cdk-drag-placeholder {
  display: none;
}

.node-padding {
  padding-left: 15px;
}

.nested {
  display: flex;

  &:hover .context {
    visibility: visible;
  }

  .mat-button-icon {
    position: inherit;

    .mat-icon-arrow {
      position: relative;
      top: 7px;
    }
  }

  .context {
    cursor: pointer;
    display: flex;
    align-items: center;

    padding-left: 10px;

    visibility: hidden;

    .mat-icon {
      width: 15px;
      height: 15px;
      font-size: 15px;
      color: #222;
    }
  }
}

.is-role {
  ul mat-icon {
    display: none;
  }

  ul a.mat-tree-node {
    padding-left: 39px;
    color: #000;
  }
}

.filterSelected {
  background: darkgrey;
}

ngx-simplebar {
  height: calc(100% - 50px);
}

::ng-deep .mat-icon-button.cdk-program-focused .mat-button-focus-overlay {
  opacity: 0 !important;
}

// ::ng-deep .nested .mat-tree-node {
//   flex: none;
// }

.context__menu {
  padding: 5px;

  & .mat-icon {
    color: #222;
  }

  a.context__menu__item {
    display: flex;
    width: 100%;
  }

  &.context__menu__item__icon {
    display: flex;
    align-items: center;
    padding-right: 10px;
  }
}
