@indentWidth: 24px;
@treeNodeHeight: 28px;

.@{prefixCls}-tree {
  &-wrapper {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100%;
  }

  &-menu-popover {
    .@{ant-prefix}-popover-arrow {
      display: none;
    }

    .@{ant-prefix}-popover-inner {
      border-radius: 10px;
    }

    .@{ant-prefix}-popover-inner-content {
      min-width: 140px;
      padding: 8px 0;

      & > div > ul {
        margin: 0;
        padding: 0;

        & > li {
          padding: 0 16px;
          color: #333;
          line-height: 36px;
          list-style: none;
          cursor: pointer;
          transition: background-color 0.2s;

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

  &-tabs {
    .fullTabs();
  }

  &-tabbar {
    width: 100%;
    margin-bottom: @padding-md;

    .@{ant-prefix}-select {
      width: 100%;
    }
  }

  &-body {
    min-height: 0;
    overflow: auto;
    .scrollBar();

    .@{ant-prefix}-tree {
      &-node-content-wrapper {
        min-width: 0;
      }

      &-title {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: space-between;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.2s;
      }
    }
  }

  &-title-content {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  &-title-operators {
    &-item {
      width: 20px;
      height: 20px;
      margin-left: 4px;
      line-height: 1;
      text-align: center;
      border-radius: 4px;

      & svg {
        vertical-align: middle;
      }

      &-active,
      &:hover {
        background: #d7d7d7;
      }
    }
  }

  &-header + &-body {
    margin-top: 12px;
  }

  &-header + .@{ant-prefix}-tabs {
    margin-top: 8px;
  }

  &-footer {
    margin-top: @padding-md;
  }

  &-empty {
    width: 72px;
    margin: 0 auto;
    padding-top: 60px;
    text-align: center;

    img {
      display: block;
      width: 72px;
      height: 72px;
    }

    div {
      color: rgba(51, 51, 51, 0.5);
      font-size: 14px;
      line-height: 22px;
    }
  }
}

.@{prefixCls}-layout-left {
  .@{prefixCls}-tree-wrapper {
    padding: @padding-md;

    .@{prefixCls}-tree-header {
      margin-right: @padding-md;
    }
  }

  .@{prefixCls}-tree-tabs {
    padding: @padding-md;

    .@{prefixCls}-tree-wrapper .@{prefixCls}-tree-header {
      margin-right: 0;
    }
  }

  .@{prefixCls}-tree-tabbar {
    padding-right: @padding-sm;
  }

  .@{ant-prefix}-tabs-tabpane > .@{prefixCls}-tree-wrapper {
    padding: 0;
  }
}
