﻿.selector-control {
    position: relative;
}

.selector-control .value-display {
    width: 100%;
    font-size: 18px;
    font-weight: bold;
    color: var(--font-dark);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    position: absolute;
}

.selector-box {
    /*position: absolute;*/
    display: flex;
    /*left: 0;
    top: calc(100% + 8px);
    border-radius: var(--border-radius);*/
    width: 100%;
    /*height: 10em;*/
    background-color: #ffffff;
    padding: 0 24px;
    /*z-index: 999;
    box-shadow: var(--boxshadow-chained);*/
}

@media (min-width: 1024px) {
    .selector-box {
        padding: 0;
        position: absolute;
        height: 10em;
        left: 0;
        top: calc(100% + 8px);
        border-radius: var(--border-radius);
        z-index: 999;
        box-shadow: var(--boxshadow-chained);
    }
}

.selector-box.searchable {
    display: grid;
    grid-template-rows: 50px 1fr;
}

@media (min-width: 1024px) {
    .selector-box.searchable {
        grid-template-rows: 36px 1fr;
    }
}

.selector-box.closed {
    display: none;
}

.selector-list::-webkit-scrollbar {
    width: 11px;
}

.selector-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
    overflow-x: hidden;
    overflow-y: auto;
    /*scrollbar-width: none;
    -ms-overflow-style: none;*/
    scrollbar-width: thin;
    /*-ms-overflow-style: auto;*/
    scroll-snap-type: y mandatory;
    scrollbar-color: var(--scrollbar-thumb-background) var(--scrollbar-background);
}

@media (min-width: 1024px) {
    .selector-list {
        border-radius: var(--border-radius);
    }

    .selector-box.searchable .selector-list {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}

.selector-list::-webkit-scrollbar-track {
    background: var(--scrollbar-background);
}

.selector-list::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-background);
    border-radius: 6px;
    border: 3px solid var(--scrollbar-background);
}

.selector-list:not(.noflex) {
    flex: 1;
}

.selector-list::-webkit-scrollbar {
    /*width: 0;
    height: 0;*/
}

/*.selector-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;

}*/

.selector-list li {
    height: 30px;
    padding: .4em 10px;
    font-size: 1em;
    color: var(--font-dark);
    scroll-snap-align: center;
    display: flex;
    justify-content: flex-start;
    align-content: center;
    align-items: center;
    width: 100%;
}

.selector-list li.hidden-entry {
    display: none;
}

.selector-list li:not(.selected):hover {
    background-color: #d3d3d3;
}

.selector-list li.selected {
    background-color: var(--button-color);
    color: var(--font-light);
}

.selector-list li.use-nesting:not([data-nestinglevel="0"])::before {
    content: "";
    height: 8px;
    width: calc(var(--nesting-level) * 15px);
    border-left: 1px solid var(--border-color-dark);
    border-bottom: 1px solid var(--border-color-dark);
    margin-left: 5px;
    margin-right: 3px;
}

.selector-list li.selected.use-nesting:not([data-nestinglevel="0"])::before {
    border-color: var(--font-light);
}

.selector-list li > span {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* selector searchbox */
.selector-searchbox {
    width: 100%;
    /*height: 36px;*/
    height: 50px;
    padding: 3px 0;
    display: flex;
    flex-flow: row nowrap;
    align-content: center;
    align-items: center;
}

@media (min-width: 1024px) {
    .selector-searchbox {
        height: 36px;
        padding: 3px var(--border-radius);
    }
}

.selector-searchbox input[type="text"] {
    /*height: 30px;
    width: calc(100% - 30px);*/
    height: 40px;
    width: calc(100% - 40px);
    border: 1px solid var(--border-color-light);
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    padding-left: 10px;
    padding-right: 10px;
}

@media (min-width: 1024px) {
    .selector-searchbox input[type="text"] {
        height: 30px;
        width: calc(100% - 30px);
    }
}

.selector-searchbox button {
    /*width: 30px;
    height: 30px;*/
    width: 40px;
    height: 40px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    background-color: transparent;
    border-width: 1px 1px 1px 0;
    border-style: solid;
    border-color: var(--border-color-light);
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    cursor: pointer;
    padding: 0;
}

@media (min-width: 1024px) {
    .selector-searchbox button {
        width: 30px;
        height: 30px;
    }
}

.selector-searchbox button svg {
    width: 16px;
    height: 16px;
}