.baklava-select {
    width: 100%;
    position: relative;
    color: var(--baklava-control-color-foreground);

    &.--open > .__selected {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    &.--open > .__selected > .__icon {
        transform: rotate(180deg);
    }

    & > .__selected {
        background-color: var(--baklava-control-color-background);
        padding: 0.35em 0.75em;
        border-radius: var(--baklava-control-border-radius);
        transition: background var(--baklava-visual-transition);
        min-height: 1.7em;
        display: flex;
        align-items: center;
        cursor: pointer;

        &:hover {
            background: var(--baklava-control-color-hover);
        }
        &:active {
            background: var(--baklava-control-color-active);
        }

        & > .__text {
            flex: 1 0 auto;
            flex-basis: 0;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
        }

        & > .__icon {
            flex: 0 0 auto;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: transform 0.25s ease;
            width: 18px;
            height: 18px;

            & path {
                stroke: var(--baklava-control-color-foreground);
                fill: var(--baklava-control-color-foreground);
            }
        }
    }

    & > .__dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 10;
        background-color: var(--baklava-context-menu-background);
        filter: drop-shadow(0 0 4px black);
        border-radius: 0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);

        max-height: 15em;
        overflow-y: scroll;
        &::-webkit-scrollbar {
            width: 0px;
            background: transparent;
        }

        & > .item {
            padding: 0.35em;
            padding-left: 1em;
            transition: background 0.05s linear;

            &:not(.--header):not(.--active) {
                cursor: pointer;
                &:hover {
                    background: var(--baklava-control-color-hover);
                }
            }

            &.--active {
                background: var(--baklava-control-color-primary);
            }

            &.--header {
                color: var(--baklava-control-color-disabled-foreground);
                border-bottom: 1px solid var(--baklava-control-color-disabled-foreground);
                padding: 0.5em 0.35em;
                padding-left: 1em;
            }
        }
    }
}
