/**
 * KRA - Version Management Page Styles
 */

.searchCard {
  margin-bottom: 16px;
}

.toolbar {
  margin-bottom: 16px;
}

// Tree container for export drawer
.treeContainer {
  display: flex;
  gap: 12px;
  width: 100%;
}

.treeCard {
  flex: 1;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.treeHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #d9d9d9;
}

.treeTitle {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
}

.treeFilter {
  padding: 12px 16px;
  border-bottom: 1px solid #d9d9d9;
  background: #fafafa;
}

.treeBody {
  flex: 1;
  padding: 8px;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
}

// API tree item
.apiTreeItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-right: 4px;
}

.apiPath {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  margin-left: 8px;
}

// Dictionary tree item
.dictTreeItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-right: 4px;
}

.dictType {
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  margin-left: 8px;
}

.dictValue {
  color: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  margin-left: 8px;
}

// Preview container for import drawer
.previewContainer {
  display: flex;
  gap: 12px;
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 16px;
  background: #fafafa;
}

.previewCard {
  flex: 1;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.previewHeader {
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #d9d9d9;
  font-weight: 500;
}

.previewBody {
  padding: 8px;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
}

// Dark mode support
:global(.ant-layout-content[data-theme='dark']) {
  .treeCard,
  .previewCard {
    background: #1f1f1f;
    border-color: #434343;
  }

  .treeHeader,
  .treeFilter,
  .previewHeader {
    background: #141414;
    border-color: #434343;
  }

  .treeTitle {
    color: rgba(255, 255, 255, 0.85);
  }

  .apiPath,
  .dictType,
  .dictValue {
    color: rgba(255, 255, 255, 0.45);
  }

  .previewContainer {
    background: #141414;
    border-color: #434343;
  }
}
