.container-xxl:has(> .knowledge-map-fill),
.container-fluid:has(> .knowledge-map-fill) {
  display: flex;
  flex-direction: column;
}
.container-xxl:has(> .knowledge-map-fill) > *:not(.knowledge-map-fill),
.container-fluid:has(> .knowledge-map-fill) > *:not(.knowledge-map-fill) {
  flex-shrink: 0;
}
.container-xxl:has(> .knowledge-map-fill) .knowledge-map-graph,
.container-fluid:has(> .knowledge-map-fill) .knowledge-map-graph {
  height: auto;
  flex: 1 1 auto;
  min-height: 31.25rem;
}

.knowledge-map-fill {
  flex: 1 1 auto;
  min-height: 0;
}

.knowledge-map-fill .card-body {
  display: flex;
  flex-direction: column;
}
.knowledge-map-fill .card-body > *:not(.knowledge-map-graph) {
  flex-shrink: 0;
}

.knowledge-map-graph {
  height: 31.25rem;
}

.knowledge-map-canvas {
  position: absolute;
  inset: 0;
}

.knowledge-map-legend {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  font-size: 0.75rem;
}

.knowledge-map-legend-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 0.875rem;
}

.knowledge-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}

.knowledge-map-legend-shape {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  background-color: var(--bs-body-color);
}
.knowledge-map-legend-shape.is-holder {
  border-radius: 50%;
}
.knowledge-map-legend-shape.is-asset {
  border-radius: 0.25rem;
}
.knowledge-map-legend-shape.is-facet {
  width: 0.5625rem;
  height: 0.5625rem;
  margin: 0 0.125rem;
  opacity: 0.6;
  transform: rotate(45deg);
}

.knowledge-map-legend-link {
  display: inline-block;
  width: 1.5rem;
  border-top: 0.25rem solid var(--bs-body-color);
  border-radius: 0.125rem;
  opacity: 0.6;
}

.knowledge-map-legend-swatch {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 0.1875rem;
}
