// 看板视图样式

.list-wrapper {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  margin-top: 4px;

  > div {
    // min-width: 340px;
    width: 360px;
    flex: 0 0 auto;
  }

  .list-item-scroll {
    height: 800px;
    overflow-y: auto;
  }

  .list-tag {
    display: flex;
    align-items: center;
    padding: 8px;
    &-text {
      color: rgba(23, 26, 29, 0.94);
      font-size: 14px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin: 0;
    }
    &-count {
      color: rgba(23, 26, 29, 0.6);
      margin-left: 12px;
    }
  }

  .list-item {
    padding: 16px !important;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: var(--cnai-radius-lg, 12px);
    box-shadow: var(
      --cnai-shadow-sm,
      0 0 5px 0 rgba(0, 0, 0, 0.05)
    );
    background-color: var(--cnai-color-bg-base, #fff);
    user-select: none;
    position: relative;
    margin: 8px;
  }

  .list-description {
    &-item {
      margin-top: 10px;
      position: relative;
      align-items: center;
      gap: 8px;
      line-height: 20px;
      font-size: 14px;
      color: var(--cnai-color-text-heading, rgba(0, 0, 0, 0.88));
      outline: none;
      display: flex;
      width: 100%;
      box-sizing: border-box;

      // 有标题时：使用 Flex 布局，标题左对齐，内容右对齐，在一行内
      &-with-title {
        justify-content: flex-start;
        white-space: nowrap;
        overflow: hidden;
        min-width: 0;
      }

      // 没有标题时：内容左对齐
      &-no-title {
        // 不需要特殊样式，内容会自然左对齐
      }
    }

    &-label {
      color: var(--cnai-color-text-secondary, #666);
      white-space: nowrap;
      flex-shrink: 0;
      display: block;
      width: 70px;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 20px;
    }

    &-value {
      word-break: break-word;
      display: flex;
      align-items: center;

      // 有标题时：内容右对齐（兼容 ReactNode）
      &-with-title {
        flex: 0 0 auto;
        width: 220px;
        margin-left: 8px;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: right;
        // 如果内容是 ReactNode，确保内部元素也能正确对齐和省略
        > .cn-ui-ellipsis {
          width: 100%;
        }
      }

      // 没有标题时：内容左对齐
      &-no-title {
        flex: 1;
        text-align: left;
        justify-content: flex-start;
      }
    }
  }
}
