@use "../../../variables/index" as *;

@use "../../mixins/icon-base";

.cdk-tree > .cdk-nested-tree-node {
  padding-left: 0;
  &:before,
  &:after {
    display: none;
  }
}

.cdk-tree-node {
  position: relative;
  display: flex;
  flex-direction: column;
}

.cdk-nested-tree-node {
  position: relative;
  padding-left: 16px;
  &:before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 7px;
    border-left: 1px solid var(
        --c8y-component-icon-dark-color-light,
        var(--c8y-root-component-icon-dark-color-light, var(--brand-light, var(--c8y-brand-light)))
);;
    content: '';
  }
  &:last-child:before {
    bottom: 9px
  }
  &:after {
    position: absolute;
    top: 10px;
    left: 7px;
    width: 8px;
    border-top: 1px solid var(
        --c8y-component-icon-dark-color-light,
        var(--c8y-root-component-icon-dark-color-light, var(--brand-light, var(--c8y-brand-light)))
);
    content: '';
  }
  > span {
    &:before {
      content: '';

      @include icon-base.dlt-c8y-icon;
    }
  }
  > button + span:before {
    display: none;
  }
}

.cdk-tree-node-toggle {
  cursor: pointer;
  > [class^='dlt-c8y-icon-'],
  > [class*=' dlt-c8y-icon-'] {
    margin-right: $size-4;
    color: var(--brand-primary, var(--c8y-brand-primary));
  }
}
