// 查核项管理页面样式（参考checkGroupMana）

.CheckItemMana {
  .check-item-container {
    display: flex;
    height: 100%;
    padding: 16px;
  }

  // 左侧查核项树样式
  .item-tree {
    display: flex;
    flex-direction: column;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    background: #fff;
    border-radius: 4px;
    height: calc(100vh - 80px);
    overflow: hidden;

    .search-wrapper {
      display: flex;
      align-items: center;
      padding: 12px;
      padding-bottom: 8px;
      flex-shrink: 0;

      .search-input {
        flex: 1;
        border-radius: 4px;
        border: 1px solid #d9d9d9;

        .ant-input {
          border: none;
          box-shadow: none;
        }

        &:hover,
        &:focus-within {
          border-color: #3377ff;
        }
      }

      .add-button {
        margin-left: 8px;
        width: 24px;
        height: 24px;
        background: #fafcff;
        border-radius: 4px;
        border: 1px solid #dae2f2;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }

    .item-list {
      flex: 1;
      overflow-y: auto;
      max-height: calc(100vh - 140px);

      .item-group {
        margin-bottom: 0;

        .item-leaf {
          display: flex;
          align-items: center;
          padding: 10px 8px;
          margin: 0 8px;
          cursor: pointer;
          height: auto;
          box-sizing: border-box;
          border-radius: 4px;
          position: relative;

          .item-icon {
            margin-right: 4px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;

            & > img {
              width: 25px;
              height: 25px;
            }
          }

          .item-content {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;

            .item-title {
              font-size: 14px;
              height: 14px;
              line-height: 14px;
              color: #17181a;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              margin-bottom: 4px;
              font-weight: 500;
            }

            .item-score {
              font-size: 12px;
              height: 12px;
              line-height: 12px;
              color: #7a8599;
            }
          }

          .more-button {
            position: absolute;
            top: 50%;
            right: 8px;
            transform: translateY(-50%);
            padding: 0;
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
            border-radius: 4px;
            background: #fff;
            opacity: 0;
            transition: opacity 0.2s;

            .anticon {
              transform: rotate(90deg);
            }

            &:hover {
              background: #fff;
            }
          }

          &:hover {
            background-color: #f0f2f5;

            .more-button {
              opacity: 1;
            }
          }

          &.selected {
            background: #f0f2f5;
            border: none;

            .item-title {
              color: #17181a;
              font-weight: 500;
            }

            .more-button {
              opacity: 1;
            }
          }
        }
      }
    }
  }

  

  // 右侧内容区样式
  .main-content {
    flex: 1;
    margin-left: 16px;
    height: 100%;
    overflow: auto;
    background: #fff;
    border-radius: 4px;

    // 顶部标题和信息区域
    .content-header {
      padding: 16px;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;

      .header-left {
        flex: 1;

        .title {
          font-size: 20px;
          height: auto;
          max-height: 40px;
          line-height: 20px;
          font-weight: 600;
          color: #111827;
          margin-bottom: 8px;
          overflow: hidden;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          word-wrap: break-word;
        }

        .description {
          font-size: 12px;
          color: #7a8599;
          line-height: 16px;
          margin-bottom: 12px;
          padding-right: 32px;
        }

        .info-tags {
          display: flex;
          flex-wrap: wrap;
          gap: 12px;

          .info-tag {
            display: flex;
            align-items: center;
            padding: 8px;
            padding-right: 12px;
            background: #f5f7fa;
            border-radius: 4px;
            white-space: nowrap;

            .tag-icon {
              display: flex;
              align-items: center;
              justify-content: center;
              width: 16px;
              height: 16px;
              margin-right: 8px;

              img {
                width: 100%;
                height: 100%;
                object-fit: contain;
              }
            }

            .tag-content {
              display: flex;
              flex-direction: column;
              gap: 2px;

              .tag-label {
                font-size: 12px;
                color: #7a8599;
                line-height: 1;
                margin-bottom: 4px;
              }

              .tag-value {
                font-size: 16px;
                color: #17181a;
                font-weight: 500;
                line-height: 1;
              }
            }
          }
        }
      }

      .header-right {
        .image-gallery {
          display: flex;
          gap: 12px;

          .image-item {
            width: 140px;
            height: 100px;
            border-radius: 8px;
            overflow: hidden;

            img {
              width: 100%;
              height: 100%;
              object-fit: cover;
            }
          }
        }
      }
    }

    // 内容主体
    .content-body {
      .pfm-ant-card {
        box-shadow: none;
        border-radius: 4px;

        .pfm-ant-card-body {
          padding: 16px;
          padding-top: 0;
        }
      }

      .pfm-ant-tabs-nav {
        margin-bottom: 16px;
      }

      .tab-content {
        .toolbar {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 16px;
        }

        .add-btn {
          background-color: #3377ff;
          border-color: #3377ff;
          border-radius: 4px;
          height: 24px;
          box-shadow: none;
          font-weight: 400;
          font-size: 14px;
          color: #ffffff;
          width: 56px;
          padding: 0;
          line-height: 22px;

          &:hover {
            background-color: #5591ff;
            border-color: #5591ff;
          }

          &:active {
            background-color: #1b5ee6;
            border-color: #1b5ee6;
          }
        }
      }
    }
  }

  // 新增查核项弹窗样式
  .add-check-item-modal {
    .ant-modal-body {
      max-height: 60vh;
      overflow-y: auto;
    }
  }
}

// 全局弹窗滚动样式
.add-check-item-modal {
  .ant-modal-body {
    max-height: 60vh !important;
    overflow-y: auto !important;
  }
}

// 查核项管理更多操作下拉菜单样式
.check-item-dropdown {
  .pfm-ant-dropdown-menu,
  .ant-dropdown-menu {
    border-radius: 4px;
    overflow: hidden;
    padding: 4px;
  }

  .pfm-ant-dropdown-menu-item,
  .ant-dropdown-menu-item {
    &:hover,
    &.pfm-ant-dropdown-menu-item-selected,
    &.ant-dropdown-menu-item-selected {
      background: rgba(51, 119, 255, 0.08);
      color: #17181a;
      border-radius: 4px;
    }
  }
}

// 复制设置弹窗样式
.copy-setting-modal {
  .pfm-ant-modal-header,
  .ant-modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 16px;

    .pfm-ant-modal-title,
    .ant-modal-title {
      font-size: 14px;
      font-weight: 500;
      color: #333;
    }
  }

  .pfm-ant-modal-close,
  .ant-modal-close {
    top: 12px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    width: 22px;
  }

  .pfm-ant-modal-body,
  .ant-modal-body {
    padding: 16px;
    padding-bottom: 8px;
  }

  .pfm-ant-modal-footer,
  .ant-modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 16px;
  }

  // 单选框样式调整
  .pfm-ant-radio-checked .pfm-ant-radio-inner,
  .ant-radio-checked .ant-radio-inner {
    background-color: #3377ff;
    border-color: #3377ff;
  }

  .pfm-ant-radio-wrapper:hover .pfm-ant-radio-inner,
  .pfm-ant-radio:hover .pfm-ant-radio-inner,
  .pfm-ant-radio-input:focus + .pfm-ant-radio-inner,
  .ant-radio-wrapper:hover .ant-radio-inner,
  .ant-radio:hover .ant-radio-inner,
  .ant-radio-input:focus + .ant-radio-inner {
    border-color: #3377ff;
  }

  // 按钮样式调整
  .pfm-ant-btn-primary,
  .ant-btn-primary {
    border-radius: 2px;

    &:hover,
    &:focus {
      background-color: #5591ff;
      border-color: #5591ff;
    }

    &:active {
      background-color: #1b5ee6;
      border-color: #1b5ee6;
    }
  }
}
