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

.cmf-tree-container {
  height: 100%;
  padding: 0 0 15px 30px;
}

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

.scroll-container {
  max-height: calc(100vh - 180px);
}

.cmf-tree {
  // min-width:300px;
  // не min-width: ; иначе прыгает sidenav
  height: 100%;
  background-color: var(--menu-bg-color);

  ul,
  li {
    list-style: none;
  }

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

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

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

  .mat-tree-node span {
    overflow: hidden;
    max-width: 245px;

    /* font-size: 14px; */
    margin: 7px;
    margin-left: 2px;
  }

  mat-tree-node {
    user-select: none;
    padding-left: 16px;
    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-button-disabled {
      color: var(--color-gray-aaa);
    }
  }

  .mat-icon {
    height: 30px;

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

  .mat-icon.class-icon {
  }

  .mat-tree-node:hover {
    background: var(--theme-hack-bg-color, #ebecef);
  }

  .nested:hover {
    background: var(--theme-hack-bg-color, #ebecef);
  }

  .cmf-tree-selected > a > .mat-tree-node {
    background: var(--theme-hack-bg-color, #ebecef);
  }

  mat-tree-node.cmf-tree-selected a.mat-tree-node,
  mat-tree-node.cmf-tree-selected .role-person {
    background: var(--theme-hack-bg-color, #ebecef);
  }

  .mat-tree-node {
    cursor: pointer;
    color: var(--default-color);
  }

  &.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;
  }

  &.cmf-tree-disabled {
    cursor: not-allowed;

    .mat-tree-node, .mat-nested-tree-node {
      color: var(--color-gray-666);
      pointer-events: none;
      background-color: transparent;
    }
  }
}

mat-nested-tree-node.cmf-tree-selected > li > .nested {
  background: var(--theme-hack-bg-color, #ebecef);
}

.mat-toolbar-tree-button {
  background-color: var(--menu-bg-color);
}

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

  .mat-icon-button.mat-button-disabled {
    cursor: not-allowed;
  }
}

.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: var(--color-gray-222);
  vertical-align: middle;
}

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

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

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

.nested {
  display: flex;

  .mat-button-icon {
    position: inherit;

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

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

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

.filterSelected {
  background: darkgrey;
}

ngx-simplebar {
  height: calc(100vh - 220px);
}
