/** Define color variables, copy the colors defined in dotAtlas distribution package. */
.dotatlas-legend {
  --dotatlas-legend-background-color: var(--map-overlay-background-color, rgba(255, 255, 255, 0.7));
  --dotatlas-legend-background-color-hover: var(--map-overlay-background-color-hover, rgba(255, 255, 255, 0.9));
  --dotatlas-legend-border-color: var(--map-overlay-border-color, rgba(255, 255, 255, 0.2));
}
.dark .dotatlas-legend {
  --dotatlas-legend-background-color: var(--map-overlay-background-color, rgba(0, 0, 0, 0.5));
  --dotatlas-legend-background-color-hover: var(--map-overlay-background-color-hover, rgba(0, 0, 0, 0.7));
  --dotatlas-legend-border-color: var(--map-overlay-border-color, rgba(255, 255, 255, 0.2));
}

.dotatlas-legend {
  z-index: 1;
  font-size: 65%;
  background-color: var(--dotatlas-legend-background-color);
  border: 1px solid var(--dotatlas-legend-border-color);
  border-radius: 0.125rem;
  padding: 0.75rem 0.25rem 0;

  position: absolute;
  bottom: 1rem;
  left: 1rem;
}

.dotatlas-legend:hover {
  background-color: var(--dotatlas-legend-background-color-hover);
}
.dotatlas-legend table {
  border-collapse: collapse;
  margin-top: 0;
}
.dotatlas-legend table td:first-child {
  padding: 0 0.25rem 0 0.25rem;
  text-align: right;
}
.dotatlas-legend table td:first-child span {
  position: relative;
  top: -0.65em;
  line-height: 1.0;
}
.dotatlas-legend table td + td {
  width: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.dark .dotatlas-legend table td + td {
  width: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
