@use './variables' as tree-variables;

.mdc-tree {
  display: flex;
  flex-direction: column;
  width: 100%;

  ul {
    margin: 0;
    padding: 0;
  }
}

.mdc-tree-node {
  display: flex;
  flex-direction: column;
}

.mdc-tree-node__content {
  display: flex;
  align-items: center;
  margin-bottom: 4px;

  &:not(.mdc-tree-node--selected):hover {
    background: tree-variables.$node-hover-color;
  }

  &.mdc-tree-node--selected {
    background-color: tree-variables.$selected-background-color;
    color: tree-variables.$selected-color;
  }
}

.mdc-tree-node__indent {
  align-self: stretch;
  white-space: nowrap;
  user-select: none;
}

.mdc-tree-node__indent-unit {
  display: inline-block;
  width: tree-variables.$indent-width;
}

.mdc-tree-node__icon {
  width: tree-variables.$icon-width;
  cursor: pointer;
}

.mdc-tree-node__label {
  flex: 1;
  padding: tree-variables.$label-padding;

  &:hover {
    cursor: pointer;
  }

  &--disabled {
    color: tree-variables.$disabled-color;

    &:hover {
      cursor: default;
    }
  }
}
