.list {
    --TEXT-COLOR: #000;
    --BG-COLOR: #fff;
    --BORDER-COLOR: #b0bec5;
    --GROUP-COLOR: rgb(0 0 0 / 50%);
    --HIGHLIGHT-COLOR: #eec60a;
}

.list-control {
    position: relative;
}

.list {
    display: none;
    flex-direction: column;
    gap: 1px;
    position: absolute;
    padding: 2px;
    top: 100%;
    overflow: auto;
    min-width: 100%;
    max-height: 250px;
    border: solid 1px var(--BORDER-COLOR);
    border-radius: 4px;
    color: var(--TEXT-COLOR);
    background-color: var(--BG-COLOR);
    font-size: .9rem;
    white-space: pre;
    overflow-x: hidden;
    z-index: 2;
}

@media (max-width: 600px) {
    .list {
        max-width: 100%;
    }
}

.list-opener:focus ~ .list:not(.no-items),
.list:active {
    display: flex;
}

.list label {
    display: block;
    margin: 0;
    padding: 4px 4px;
    border-radius: 4px;
    cursor: pointer;
}

.list .list-group ~ label:not(.list-group) {
    padding-left: 10px;
}

.list .list-group {
    font-weight: 500;
    background-color: var(--GROUP-COLOR);
    border-radius: 1px;
    cursor: auto;
}

.list label:not(.list-group).selected,
.list label:not(.list-group):hover {
    color: #212121;
    background-color: var(--HIGHLIGHT-COLOR);
}
