html {
  filter: invert();
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
}

.container {
  display: grid;
  grid-template-columns: 1fr 3fr;
  grid-template-rows: 1fr;
  height: 100vh;
}

.control-panel {
  background-color: white;
  padding: 20px;
  border-right: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1em;
  background: #eef;
}

.scatterplot-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#visualization {
  border: 1px solid #ccc;
  cursor: crosshair;
}
.tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px;
  font-size: 12px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 100;
}
.legend-container {
  background-color: white;
  padding: 20px;
  border-left: 1px solid #ccc;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-height: 80dvh;
  max-height: 80vh;
  overflow: scroll;
}

.dot {
  stroke: none;
  /* stroke-width: 1; */
  fill-opacity: 0.5;
  /* stroke-opacity: 0.5; */
  filter: grayscale(40%);
}

.dot.highlighted {
  fill-opacity: 1;
  stroke-opacity: 1;
  filter: none;
  /* stroke-width: 3; */
  /* filter: drop-shadow( 0px 0px 2px rgba(0, 0, 0, 1)); */
}
.image-border {
  fill-opacity: 0;
  stroke-opacity: .3;
  filter: none;
}
.image.highlighted .image-border {
  fill-opacity: 1;
  stroke-opacity: 1;
  filter: none;
  /* filter: drop-shadow( 0px 0px 2px rgba(0, 0, 0, 1)); */
}
.image.highlighted {
  fill-opacity: 1;
  stroke-opacity: 1;
  stroke: 2;
  filter: none;
}

.legend-item {
  display: flex;
  gap: .5em;
  border: 1px sold white;
  border-bottom: 1px solid #ccc;
  padding: .1em 0;
  min-height: 1.5em;
  align-items: center;
  width: 47%;
}

.legend-item.selected {
  background: #f0f0f0;
}

.legend-item.selected .legend-label{
  font-weight: bold;
}
.legend-item.selected .color-swatch{
  box-shadow: 0 0 3px 2px black;
}

.legend-item:hover {
  background: #eee;
  cursor: default;
}
.legend-label {
  max-width: calc(100% - 1.5em);
}
.dot, .image {
  transition: opacity 0.3s ease;
}

.dot.highlighted, .image.highlighted {
  opacity: 1 !important;
}
.color-swatch {
  height: 1em;
  width: 1em;
}
