/** 组件样式 */
//@input-item: 300px;

/* ele-pro-table 全局美化样式 */
.ele-pro-table {
  // 表头样式 - 更现代的渐变效果
  .ant-table-thead > tr > th {
    border-bottom: 2px solid #e8e8e8;
    background: linear-gradient(180deg, #fafbfc 0%, #f5f7fa 100%);
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    letter-spacing: 0.02em;

    &::before {
      display: none;
    }
  }

  // 表格行样式 - 添加斑马纹
  .ant-table-tbody > tr {
    transition: all 0.2s ease;

    &:nth-child(even) {
      background-color: #fafbfc;
    }

    > td {
      border-bottom: 1px solid #f0f0f0;
      padding: 14px 16px;
    }

    // 悬停效果
    &:hover {
      background-color: #f0f7ff !important;

      > td {
        background-color: transparent;
      }
    }

    // 选中效果
    &.ant-table-row-selected {
      background-color: #e6f4ff;

      &:hover {
        background-color: #bae0ff !important;
      }
    }
  }

  // 圆角卡片效果
  .ant-table {
    border-radius: 12px;
    overflow: hidden;
  }

  // 滚动条美化
  .ant-table-body {
    &::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    &::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      border-radius: 4px;

      &:hover {
        background: #a8a8a8;
      }
    }
  }

  // 分页器样式
  .ant-pagination {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fafbfc;
    border-radius: 0 0 12px 12px;
  }
}

/* ele-modal 最大化按钮与关闭按钮位置修复 */
.ele-modal .ant-modal-header {
  .ant-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
  }

  /* 当存在最大化按钮时，关闭按钮左移 */
  .ele-modal-maximize-btn + .ant-modal-close,
  .ele-modal-maximize-btn ~ .ant-modal-close {
    right: 40px;
  }
}

/* 针对 ant-modal 关闭按钮的兜底修复 */
.ant-modal .ant-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 修复关闭按钮内部 span 尺寸与按钮不一致导致的图标错位 */
.ant-modal-close-x {
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
}
