@root-entry-name: 'default';
@import (reference) '~antd/es/style/themes/index.less';

.pro-tree-modal-container .@{ant-prefix}-modal-content .@{ant-prefix}-modal-body {
  max-height: 498px;
}

.pro-tree-modal {
  &-placeholder {
    color: #939499;
  }

  &-content {
    display: flex;
    flex-direction: row;
    height: 482px;
    margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));

    .@{ant-prefix}-tree-checkbox {
      margin-top: 2px;
    }

    .@{ant-prefix}-tree-switcher {
      width: 20px;
      line-height: 20px;
    }

    .@{ant-prefix}-tree-treenode {
      width: 100%;
      padding: 0;
      padding-bottom: var(--zaui-font-size-sm, 12px);
      color: var(--zaui-text);
      font-size: var(--zaui-font-size, 14px);
      line-height: 20px;
    }

    .@{ant-prefix}-tree-node-content-wrapper {
      min-height: 20px;
      line-height: 20px;
    }

    .@{ant-prefix}-tree-node-content-wrapper {
      width: 100%;
    }
  }

  &-box {
    display: flex;
    flex-direction: column;
    width: 456px;
    height: 100%;
    color: var(--zaui-text);
    font-size: var(--zaui-font-size, 14px);
    line-height: 20px;
    border: 1px solid #e6e6e6;
    border-radius: var(--zaui-border-radius, 4px);

    &:first-child {
      margin-right: var(--zaui-space-size-md, 16px);
    }

    .viewSvg > div {
      display: flex;
    }

    /* 修改滚动条样式 */
    ::-webkit-scrollbar {
      width: 0;
      height: 0;
    }
  }

  &-cascader-box {
    width: 592px;
  }

  &-cascader-box-view {
    width: 320px;
  }

  &-search {
    width: auto;
    margin: var(--zaui-space-size-sm, 8px) var(--zaui-space-size-md, 16px) 0;
  }

  &-cascader-flex {
    display: flex;
    flex-direction: row;
    height: 100%;
    overflow: hidden;
  }

  &-cascader-warp {
    display: flex;
    flex-direction: column;
    width: 350px;
    margin-left: var(--zaui-space-size-md, 16px);
    overflow: auto;

    &:first-child {
      width: 192px;
      margin-left: 0;
      border-right: 1px solid #e6e6e6;
    }
  }

  &-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    padding: 0 var(--zaui-space-size-md, 16px);
    background: #fafafa;

    &:first-child {
      color: #616161;
    }

    .@{ant-prefix}-btn-link {
      padding: 0;
    }
  }

  &-tree-warp {
    flex: 1;
    margin: 0 var(--zaui-space-size-md, 16px);
    padding-top: var(--zaui-space-size-sm, 8px);
    overflow-y: auto;
  }

  &-checkbox-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
    line-height: 20px;
    cursor: pointer;

    &-look {
      color: #333;
    }

    &-drag {
      display: flex;
    }
  }

  &-cascader-content {
    margin-bottom: 0;
    padding: 6px;
  }

  &-check-cascader-content {
    color: var(--zaui-brand);
    background: rgba(0, 106, 255, 0.1);
  }

  &-isView {
    display: flex;
    align-items: center;

    .viewSvg {
      margin-left: var(--zaui-space-size-sm, 8px);
    }
  }

  &-tree-content {
    margin-bottom: 0;
  }

  &-search-value {
    color: var(--zaui-brand);
  }

  &-checkbox-close {
    padding-left: var(--zaui-space-size-sm, 8px);
    color: #c5c7cd;
    font-size: var(--zaui-font-size-sm, 12px);
  }

  &-tree-node {
    display: flex;
    flex-direction: row;

    &:last-child {
      flex: 1;
    }
  }

  &-tree-node-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    margin-right: var(--zaui-space-size-sm, 8px);
    padding: 0 var(--zaui-space-size-xs);
    font-weight: 400;
    line-height: 24px;
    white-space: nowrap;
    border-radius: var(--zaui-border-radius-card);

    span {
      font-size: var(--zaui-font-size-sm, 12px);
      line-height: 20px;
      text-align: center;
      transform: scale(0.83, 0.83);
    }
  }
}

.pro-tree-modal-no-checks {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #939599;
  font-weight: 400;
  font-size: var(--zaui-font-size, 14px);
}

.pro-transfer-right {
  .checked-item {
    margin: var(--zaui-space-size-sm, 8px) 0;

    &:first-child {
      margin-top: 0;
    }

    .@{ant-prefix}-tag {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      height: 32px;
      padding: 2px var(--zaui-space-size-sm, 8px);
      color: var(--zaui-text, #343434);
      font-size: var(--zaui-font-size, 14px);
      background: #f2f2f2;
      border: none;
      border-radius: var(--zaui-border-radius, 4px);

      .drag-icon {
        height: 20px;
        margin-right: var(--zaui-space-size-xs, 4px);
        cursor: move;
      }

      .pro-tooltip {
        flex: 1;
        max-width: calc(100% - 42px);
      }

      .disabled-icon {
        height: 20px;
        margin-right: var(--zaui-space-size-xs, 4px);
      }

      .anticon-close {
        margin: 0;
        color: #999;
        font-size: var(--zaui-font-size-sm, 12px);
      }
    }

    &.dragable {
      .anticon-close {
        position: relative;
        left: -4px;
      }
    }

    &.disabled {
      cursor: not-allowed;

      .pro-tooltip,
      .anticon {
        cursor: not-allowed;
      }

      .anticon {
        pointer-events: none;
      }
    }
  }
}
