.root {
  $select-bg-color: var(--tree-drag-select-bg-color);
  $drop-indicator-color: var(--tree-drag-indicator-color);

  .node {
    &.is_dragging {
    }

    &.is_source {
      opacity: 0.5;
    }

    &.selected {
      background: $select-bg-color;
      color: #fff;
    }
  }

  .ln_header {
    display: grid;
    justify-items: center;
    align-items: center;
  }

  .arrow {
    min-width: 20px;
    min-height: 20px;
    overflow: hidden;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    transform: rotate(90deg);

    &.collapsed {
      transform: rotate(0);
    }
  }

  .ln_body {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  @mixin indicator_circle {
    content: "";
    display: block;
    position: absolute;
    border: 2px solid $drop-indicator-color;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    z-index: 1000;
  }

  .indicator_circle {
    @include indicator_circle;
  }

  .drop_before {
    .ln_body {
      box-shadow: 0 -2px 0 0 $drop-indicator-color;

      &:before {
        @include indicator_circle;
        margin: -5px 0 0 -6px;
      }
    }
  }

  .drop_in {
    .ln_body {
      background: $drop-indicator-color;
    }
  }

  .drop_after {
    .ln_body {
      box-shadow: 0 2px 0 0 $drop-indicator-color;

      &:after {
        @include indicator_circle;
        margin: -3px 0 0 -6px;
      }
    }
  }

  .content {
    margin: 2px 0;
    display: grid;
    grid-template-columns: 20px 1fr;

    &.no_children {
      grid-template-columns: 0 1fr;
    }
  }
}

.for_dragging {
  display: none;
  position: absolute;
  z-index: 100000;
  top: -100000px;
  left: -100000px
}
