.ztxk-upload {
  .ant-upload.ant-upload-select-picture-card {
    width: auto;
    height: auto;
  }
  .ztxk-upload--picture {
    width: 110px;
    height: 110px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: #fafafa;
    border: 1px dashed #d9d9d9;
    border-radius: 2px;
    cursor: pointer;
  }
  .ant-upload-list-picture-card-container {
    width: 110px;
    height: 110px;
  }
  .ztxk-upload--tips {
    margin-left: 10px;
  }
  .ztxk-table {
    margin-top: 10px;
    // .ant-progress-text {
    //   width: 1em;
    // }
    .ztxk-upload--progress {
      display: flex;
      justify-content: center;
      align-items: center;
      .ant-progress-text {
        width: 30px;
      }
    }
  }
  > button {
    margin-left: 10px;
  }
  > button:first-child {
    margin-left: 0;
  }
  .ztxk-upload--preview-list {
    .ztxk-upload--preview-list__item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-right: 10px;
      .preview-list__item--left {
        > button {
          height: auto;
          display: flex;
          > span:first-child {
            margin-top: 1px;
          }
          > span:last-child {
            /* 1. 必须设置高度限制（或让 line-height * 3 自动撑起高度） */
            display: -webkit-box; /* 弹性盒模型，用于多行文本换行计算 */
            -webkit-line-clamp: 3; /* 限制显示的行数 */
            -webkit-box-orient: vertical; /* 文本排列方向：垂直 */
            overflow: hidden; /* 隐藏超出部分 */
            text-overflow: ellipsis; /* 超出部分显示省略号 */
          }
        }
      }
      .preview-list__item--right {
        flex-shrink: 0;
        display: flex;
        align-items: center;
      }
    }
  }
  // 20260810 列表项自定义渲染样式（text 模式与详情列表模式共用）
  .ztxk-upload--text-item {
    display: flex;
    align-items: center;
    height: 100%;
    &:hover {
      background-color: #f5f5f5;
    }

    &__icon {
      flex-shrink: 0;
      margin-right: 8px;
      color: rgba(0, 0, 0, 0.45);
      font-size: 14px;
    }

    &__name {
      flex: 0 0 40%;
      max-width: 40%;
      min-width: 0;
      display: flex;
      cursor: pointer;
      // 与操作按钮（type="link"）保持同色
      color: @primary-color;

      &:hover {
        color: lighten(@primary-color, 10%);
      }

      &-body {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      &-ext {
        flex-shrink: 0;
        white-space: nowrap;
      }
    }

    &__size {
      flex-shrink: 0;
      margin-left: 10px;
      color: rgba(0, 0, 0, 0.45);
      font-size: 12px;
    }

    &__actions {
      flex-shrink: 0;
      margin-left: 10px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    &__download,
    &__delete {
      padding: 0;
      height: auto;
      line-height: 1.5;
    }

    // 失败状态：文件名标红（与 antd 原生 error 表现一致）
    &.is-error {
      .ztxk-upload--text-item__name {
        color: #ff4d4f;
        &:hover {
          color: #ff7875;
        }
      }
    }
  }

  // 详情列表（常用于表格单元格）覆盖：
  // 保持 name 的固定宽度（与 text 模式一致，保证操作按钮对齐），
  // 仅把内部从 nowrap 单行改为多行换行（nowrap 会撑开 table-cell）
  .ztxk-upload--preview-list {
    .ztxk-upload--text-item__name {
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;

      .ztxk-upload--text-item__name-body {
        white-space: normal;
        word-break: break-all;
        text-overflow: clip;
        overflow: visible;
      }

      .ztxk-upload--text-item__name-ext {
        white-space: normal;
      }
    }
  }
}
.ztxk-table {
  // 表格场景：附件名占满剩余空间，操作按钮靠右对齐
  .ztxk-upload--text-item__name {
    flex: 1;
    max-width: none;
  }
}

.ztxk-upload-imgcrop {
  .ant-modal-body {
    > button {
      bottom: 10px;
    }
  }
}
