445 lines
8.4 KiB
SCSS
445 lines
8.4 KiB
SCSS
.topic-hierarchy-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
max-height: 480px;
|
|
background: var(--sg-surface);
|
|
border: 1px solid var(--sg-border);
|
|
border-radius: var(--sg-radius-md, 8px);
|
|
padding: 8px;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Toolbar */
|
|
.hierarchy-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 4px 6px 8px 6px;
|
|
border-bottom: 1px solid var(--sg-border-soft);
|
|
margin-bottom: 6px;
|
|
flex-shrink: 0;
|
|
flex-wrap: wrap;
|
|
|
|
.search-mode-selector {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
|
|
.mode-label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--sg-text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.mode-radio-group {
|
|
display: flex;
|
|
gap: 8px;
|
|
|
|
.radio-text {
|
|
font-size: 12px;
|
|
color: var(--sg-text);
|
|
}
|
|
}
|
|
}
|
|
|
|
.tree-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
|
|
.tree-control-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 3px 8px;
|
|
background: var(--sg-surface-soft);
|
|
border: 1px solid var(--sg-border-soft);
|
|
border-radius: var(--sg-radius-sm, 4px);
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
color: var(--sg-text-muted);
|
|
cursor: pointer;
|
|
transition: all 0.15s ease;
|
|
|
|
mat-icon {
|
|
font-size: 14px;
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
&:hover {
|
|
background: var(--sg-surface-hover, var(--sg-border-soft));
|
|
color: var(--sg-text);
|
|
}
|
|
}
|
|
}
|
|
|
|
.selected-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 2px 8px;
|
|
background: color-mix(in srgb, var(--sg-primary) 14%, transparent);
|
|
color: var(--sg-primary);
|
|
border: 1px solid color-mix(in srgb, var(--sg-primary) 30%, transparent);
|
|
border-radius: 12px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
|
|
.clear-selection-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: transparent;
|
|
border: none;
|
|
color: inherit;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
width: 14px;
|
|
height: 14px;
|
|
|
|
mat-icon {
|
|
font-size: 12px;
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
|
|
&:hover {
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Loading & Empty States */
|
|
.hierarchy-loading-state,
|
|
.search-loading-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
padding: 32px 16px;
|
|
font-size: 12px;
|
|
color: var(--sg-text-muted);
|
|
}
|
|
|
|
.empty-search-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 32px 16px;
|
|
color: var(--sg-text-muted);
|
|
text-align: center;
|
|
|
|
mat-icon {
|
|
font-size: 28px;
|
|
width: 28px;
|
|
height: 28px;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
p {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
/* Scrollable Tree & Search Containers */
|
|
.hierarchy-tree,
|
|
.search-results-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding-right: 2px;
|
|
flex: 1;
|
|
|
|
&::-webkit-scrollbar {
|
|
width: 5px;
|
|
}
|
|
&::-webkit-scrollbar-thumb {
|
|
background: var(--sg-border-soft);
|
|
border-radius: 4px;
|
|
}
|
|
&::-webkit-scrollbar-thumb:hover {
|
|
background: var(--sg-border-strong, var(--sg-text-muted));
|
|
}
|
|
}
|
|
|
|
/* Node Headers Shared Styles */
|
|
.node-header {
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
padding: 5px 8px;
|
|
border: none;
|
|
background: transparent;
|
|
border-radius: var(--sg-radius-sm, 4px);
|
|
cursor: pointer;
|
|
text-align: left;
|
|
transition: background 0.15s ease;
|
|
user-select: none;
|
|
box-sizing: border-box;
|
|
|
|
&:hover {
|
|
background: var(--sg-surface-soft);
|
|
}
|
|
|
|
.node-title {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.node-count-badge {
|
|
font-size: 10.5px;
|
|
font-weight: 500;
|
|
color: var(--sg-text-muted);
|
|
background: var(--sg-surface-soft);
|
|
padding: 1px 6px;
|
|
border-radius: 10px;
|
|
margin-right: 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chevron-icon {
|
|
font-size: 16px;
|
|
width: 16px;
|
|
height: 16px;
|
|
color: var(--sg-text-muted);
|
|
flex-shrink: 0;
|
|
transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
&[aria-expanded='true'] .chevron-icon {
|
|
transform: rotate(90deg);
|
|
}
|
|
}
|
|
|
|
/* Level 1: Domain */
|
|
.domain-node {
|
|
margin-bottom: 2px;
|
|
|
|
.domain-header {
|
|
background: var(--sg-surface-soft);
|
|
font-weight: 600;
|
|
color: var(--sg-text);
|
|
padding: 6px 8px;
|
|
|
|
.domain-title {
|
|
font-size: 12.5px;
|
|
}
|
|
|
|
&:hover {
|
|
background: var(
|
|
--sg-surface-hover,
|
|
color-mix(in srgb, var(--sg-surface-soft) 80%, var(--sg-border))
|
|
);
|
|
}
|
|
}
|
|
|
|
.domain-children {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
padding-left: 10px;
|
|
margin-left: 8px;
|
|
border-left: 1.5px solid var(--sg-border-soft);
|
|
margin-top: 3px;
|
|
margin-bottom: 4px;
|
|
}
|
|
}
|
|
|
|
/* Level 2: Field */
|
|
.field-node {
|
|
.field-header {
|
|
padding: 4px 6px;
|
|
|
|
.field-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
margin-right: 8px;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 0 0 1px var(--sg-border-strong);
|
|
}
|
|
|
|
.field-title {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--sg-text);
|
|
}
|
|
}
|
|
|
|
.field-children {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
padding-left: 10px;
|
|
margin-left: 6px;
|
|
border-left: 1.5px solid var(--sg-border-soft);
|
|
margin-top: 2px;
|
|
margin-bottom: 2px;
|
|
}
|
|
}
|
|
|
|
/* Level 3: Subfield */
|
|
.subfield-node {
|
|
.subfield-header {
|
|
padding: 3px 6px;
|
|
|
|
.subfield-title {
|
|
font-size: 11.5px;
|
|
font-weight: 500;
|
|
color: var(--sg-text);
|
|
}
|
|
}
|
|
|
|
.subfield-children {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1px;
|
|
padding-left: 8px;
|
|
margin-left: 6px;
|
|
border-left: 1.5px solid var(--sg-border-soft);
|
|
margin-top: 2px;
|
|
margin-bottom: 2px;
|
|
}
|
|
}
|
|
|
|
/* Level 4: Topic Leaf Row */
|
|
.topic-leaf-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 3px 6px;
|
|
border-radius: var(--sg-radius-sm, 4px);
|
|
cursor: pointer;
|
|
transition: background 0.12s ease;
|
|
|
|
&:hover {
|
|
background: var(--sg-surface-soft);
|
|
}
|
|
|
|
&.is-selected {
|
|
background: color-mix(in srgb, var(--sg-primary) 10%, transparent);
|
|
|
|
.topic-leaf-name {
|
|
color: var(--sg-primary);
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
|
|
::ng-deep .mat-mdc-checkbox {
|
|
margin: 0;
|
|
padding: 0;
|
|
--mdc-checkbox-state-layer-size: 24px;
|
|
}
|
|
|
|
.topic-leaf-name {
|
|
flex: 1;
|
|
font-size: 11.5px;
|
|
color: var(--sg-text);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.works-badge {
|
|
font-size: 10px;
|
|
color: var(--sg-text-muted);
|
|
background: var(--sg-surface-soft);
|
|
padding: 1px 5px;
|
|
border-radius: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
}
|
|
|
|
/* Search Results Row */
|
|
.search-topic-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 8px;
|
|
border-radius: var(--sg-radius-sm, 4px);
|
|
border-bottom: 1px solid var(--sg-border-soft);
|
|
cursor: pointer;
|
|
transition: background 0.15s ease;
|
|
|
|
&:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
&:hover {
|
|
background: var(--sg-surface-soft);
|
|
}
|
|
|
|
&.is-selected {
|
|
background: color-mix(in srgb, var(--sg-primary) 10%, transparent);
|
|
|
|
.topic-info .topic-name {
|
|
color: var(--sg-primary);
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
::ng-deep .mat-mdc-checkbox {
|
|
margin: 0;
|
|
padding: 0;
|
|
--mdc-checkbox-state-layer-size: 24px;
|
|
}
|
|
|
|
.field-color-indicator {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
box-shadow: 0 0 0 1px var(--sg-border-strong);
|
|
}
|
|
|
|
.topic-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-width: 0;
|
|
|
|
.topic-name {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--sg-text);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.topic-breadcrumb {
|
|
font-size: 10px;
|
|
color: var(--sg-text-muted);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
margin-top: 1px;
|
|
}
|
|
}
|
|
|
|
.works-badge {
|
|
font-size: 10.5px;
|
|
color: var(--sg-text-muted);
|
|
background: var(--sg-surface-soft);
|
|
padding: 2px 6px;
|
|
border-radius: 10px;
|
|
flex-shrink: 0;
|
|
}
|
|
}
|