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

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

  &:hover {
    .node__tools__add {
      visibility: visible;
    }
  }
}

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

.cmf-tree {
  height: 100%;
  padding-right: 9px;
  font-family: var(--menu-item-font);
  background: none;

  ul,
  li {
    list-style: none;
  }

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

  &.cdk-drop-list-dragging .mat-tree-node:hover {
    background-color: var(--user-sidebar-bg-color, var(--tree-selected-color));
  }

  .mat-tree-node {
    min-height: 30px;
    font: var(--menu-item-font);

    // color: #163948;
    color: var(--user-sidebar-color, var(--menu-item-color));
    text-decoration: none;

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

  .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:not(.header-project) > a {
    color: var(--menu-color-active);
  }

  .cmf-tree-selected > a > .mat-tree-node {
    background: var(--user-sidebar-bg-color, var(--tree-selected-color));
  }

  mat-tree-node.cmf-tree-selected a.mat-tree-node,
  mat-tree-node.cmf-tree-selected .role-person {
    background: var(--user-sidebar-bg-color, var(--tree-selected-color));
  }

  .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 {
  background: var(--user-sidebar-bg-color, var(--tree-selected-color));
}

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

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

.header-project .nested-head {
  display: none;
}

.node__tools {
  cursor: pointer;

  display: flex;
  align-items: center;

  padding-right: 15px;
  padding-left: 5px;

  .mat-icon-arrow {
    display: flex;
  }
}

.node__tools__add {
  cursor: pointer;

  position: absolute;
  top: 2px;
  right: 7px;

  display: flex;
  align-items: center;

  width: 60px;
  margin-left: 10px;

  visibility: hidden;

  .doodle-add-icon {
    position: absolute;
    top: -7px;
    left: 0;
  }
}

.mat-tree-node:hover .node__settings {
  visibility: visible;
}

.node__settings {
  margin-bottom: -6px;
  padding-left: 10px;
  visibility: hidden;
}

.context-menu__item {
  display: flex;
  align-items: center;

  &.button-add {
    cursor: pointer;
    width: auto;
    background-color: #c1c1c1;
    border-radius: 15px;

    &:hover {
      background-color: #c1c1c1af;
    }
  }

  .context-menu__item__icon {
    display: flex;
  }
}

.project__name {
  overflow: hidden;

  max-width: 250px;
  padding-top: 9px;
  padding-bottom: 7px;
  padding-left: 11px;

  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select_project__item {
  display: block;
  width: 100%;
  text-align: left;

  &.selected {
    background: var(--user-sidebar-bg-color, var(--tree-selected-color));
  }
}

::ng-deep .projects-menu {
  position: relative;
  display: flex;
  height: 89vh;

  .mat-menu-content {
    width: 310px;
  }

  .search {
    display: flex;

    width: 100%;
    margin-bottom: 10px;
    margin-left: 5px;
    padding: 0 10px;

    input {
      width: calc(100% - 35px);
      margin-bottom: 1px; // хак для выравнивания с иконкой
      margin-left: 5px;

      border: none;
      outline: none;
    }
  }

  .projects__simplebar {
    display: flex;
    flex-direction: column;

    width: 310px;
    min-height: 100px;
    max-height: 85vh;

    .simplebar-content {
      display: flex;
      flex-direction: column;
      padding: 0;

      .project__item {
        overflow: hidden;

        width: 100%;
        max-width: 310px;

        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  .projects-menu__simplebar {
    width: 310px;
    height: 86vh;
  }
}

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

::ng-deep {
  .sg-vertical-sub-menu + * .cdk-overlay-pane {
    top: 115px !important;
    left: 22px !important;
    width: 310px;

    .mat-menu-panel {
      max-width: 310px;
    }
  }
}

::ng-deep .switch-project-menu {
  position: relative;
  width: 310px;
  height: 90vh;
}

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