#colortable_legend .adam-colorlegend_container {
  position: absolute;
  bottom: 17rem;
  right: .5vw;
  z-index: 12;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#colortable_legend:not(.adam-colorlegend-steps) {
    cursor: pointer;
}

#colortable_legend:not(.adam-colorlegend-steps) .adam-colorlegend {
    width: 2rem;
    height: 2rem;
}

#colortable_legend.adam-colorlegend-steps .adam-colorlegend.classified {
    width: 15rem;
    height: 8rem;
}

#colortable_legend.adam-colorlegend-steps .adam-colorlegend.bar {
    width: 7rem;
    height: 10rem;
}

#colortable_legend.adam-colorlegend-steps .adam-colorlegend::after {
    content: '×';
    position: absolute;
    top: -0.3rem;
    left: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary);
    cursor: pointer;
}

.adam-colorlegend {
    position: relative;
    color: var(--main-text-color);
    background-color: var(--main-bg-color);
    padding: .45rem .5rem;
    border-radius: 7px;
    box-shadow: -4px 2px 1px -2px rgba(0, 0, 0, .2), 0 4px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
    transition: var(--adam-transition);
}

.adam-colorlegend .colortable-container {
    transform: rotate(-90deg);
    position: absolute;
    top: 4.4rem;
    right: -3.35rem;
}

.adam-colorlegend.bar .colortable {
    width: 8.8rem;
    height: 1rem;
    /* cursor: pointer; */
}

.adam-colorlegend.bar .range-container {
    position: relative;
}

.adam-colorlegend .range-container .range-min {
    position: absolute;
    bottom: -9.3rem;
    right: 1.3rem;
}

.adam-colorlegend .range-container .range-max {
    position: absolute;
    top: -0.2rem;
    right: 1.3rem;
}

.adam-colorlegend.classified>.unit-container {
    font-size: 1rem;
}

.adam-colorlegend .unit-container span {
    position: absolute;
    right: 1.8rem;
    top: 50%;
    margin-top: -.65rem;
}

.adam-colorlegend.classified .steps-container {
    position: absolute;
    top: .5rem;
    right: .6rem;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

#colortable_legend.adam-colorlegend-steps .steps-container {
    width: 13.8rem;
    height: 7rem;
    padding-top: .3rem;
}

#colortable_legend.adam-colorlegend-steps .unit-container,
#colortable_legend.adam-colorlegend-steps .steps-container,
#colortable_legend.adam-colorlegend-steps .colortable-container,
#colortable_legend.adam-colorlegend-steps .range-container {
    display: block;
}

#colortable_legend:not(.adam-colorlegend-steps) .unit-container,
#colortable_legend:not(.adam-colorlegend-steps) .steps-container,
#colortable_legend:not(.adam-colorlegend-steps) .colortable-container,
#colortable_legend:not(.adam-colorlegend-steps) .range-container {
    display: none;
}

.adam-colorlegend.classified .steps-container .legend-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adam-colorlegend.classified .steps-container .step {
    display: inline-block;
    font-size: .7rem;
    width: 50%;
}

.adam-colorlegend.classified .steps-container .step>.step-color {
    width: .9rem;
    height: .9rem;
    border: #212529 1px solid;
    border-radius: 5px;
    box-shadow: inset 0 0 6px 0 rgba(0, 0, 0, .3);
    margin: .17rem 0;
    cursor: pointer;
}

.adam-colorlegend.classified .steps-container .step>.step-label {
    padding: 0 .1rem 0 0;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 5rem;
}

.adam-colorlegend-steps {
    width: 7rem !important;
}

.adam-colorlegend-minmax {
    width: 4.8rem !important;
}

#colortable_legend.adam-colorlegend-steps .colortable_legend_opener {
    display: none;
}
#colortable_legend:not(.adam-colorlegend-steps) .colortable_legend_opener {
    display: block;
}