// 主容器
.databaseTab {
  height: 100%;
  display: flex;
  flex-direction: column;
}

// 搜索区域
.searchArea {
  padding: 16px 0;
}

// 搜索控件
.searchControls {
  display: flex;
  gap: 12px;
}

.searchInput {
  flex: 1;
}

// 列表区域
.listArea {
  flex: 1;
  overflow: auto;
  padding: 0 24px;
}

// 加载状态
.loading {
  text-align: center;
  padding: 16px;
}

.endMessage {
  text-align: center;
  padding: 16px;
  font-size: 12px;
}

// 数据库列表项
.databaseItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 0 -16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;

  &:hover {
    background-color: #f8f9fa;

    :global(.@{antPrefix}-btn) {
      opacity: 1;
    }
  }

  :global(.@{antPrefix}-btn) {
    opacity: 0;
    transition: opacity 0.2s;
  }
}

// 数据库项内容
.databaseItem .itemContent {
  display: flex;
  align-items: center;
  flex: 1;
  cursor: pointer;
}

.databaseItem .itemIcon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 8px;
  margin-right: 12px;
  font-size: 18px;
}

.databaseItem .itemInfo {
  flex: 1;
}

.databaseItem .itemName {
  font-size: 14px;
  font-weight: 500;
  color: #262626;
  margin-bottom: 4px;
  line-height: 1.4;
}

.databaseItem .itemDesc {
  font-size: 12px;
  color: #8c8c8c;
  line-height: 1.4;
}

// 结构列表项
.structureItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: all 0.2s ease;

  &:hover {
    background-color: rgba(24, 144, 255, 0.08) !important;
    transform: translateX(2px);

    :global(.@{antPrefix}-btn) {
      opacity: 1;
    }
  }

  :global(.@{antPrefix}-btn) {
    opacity: 0;
    transition: opacity 0.2s;
  }
}

// 结构项内容
.structureItem .itemContent {
  display: flex;
  align-items: center;
  flex: 1;
}

// 展开按钮
.expandButton {
  width: 20px;
  height: 20px;
  padding: 0;
  margin-right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;

  :global(.anticon) {
    font-size: 12px;
  }
}

.expandPlaceholder {
  width: 24px;
  margin-right: 4px;
}

// 结构项图标和信息
.structureItem .itemIcon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 14px;
}

.structureItem .itemInfo {
  flex: 1;
}

.structureItem .itemName {
  font-size: 13px;
  color: #262626;
  line-height: 1.4;
}
