﻿.custom-select {
    position: relative;
    min-width: 200px;
    font-family: Arial, sans-serif;
    display: inline-block;
    vertical-align: middle;
}

.select-button-wrapper {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
}

.select-button {
    flex-grow: 1;
    padding: 10px;
    background-color: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    position: relative;
    padding-right: 30px;
    box-sizing: border-box;
    height: 40px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .select-button span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .select-button::after {
        content: '\25BC';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }

.custom-select.active .select-button::after {
    content: '\25B2';
}

.clear-button {
    width: 30px;
    height: 40px;
    background-color: transparent;
    border: none;
    /* border-left: 1px solid #ccc; */
    cursor: pointer;
    font-size: 28px;
    line-height: 38px;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
    border: 1px dotted #ccc;
}

    .clear-button:hover {
        background-color: #f0f0f0;
    }

.options-list {
    display: none;
    position: absolute;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 3px 3px;
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    left: 0;
    box-sizing: border-box;
}

    .options-list li {
        padding: 0;
    }

        .options-list li button {
            width: 98%;
            padding: 10px;
            border: none;
            background-color: transparent;
            text-align: left;
            cursor: pointer;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            margin: 0px !important;
        }

            .options-list li button:hover {
                background-color: #f1da3638;
            }

.options-list-divider {
    background-color: rgba(121, 183, 231, 1);
    font-weight: bold;
    padding: 10px;
    cursor: default;
    user-select: none;
    pointer-events: none;
}

.custom-select.active .options-list {
    display: block;
}

.custom-select.active .select-button-wrapper {
    border-radius: 3px 3px 0 0;
}
