.udSelect {
    width: 100%;
    height: fit-content;
}

.dropdownContainer {
    max-height: 400px;
    overflow: auto;
}

.rendererValueContainer {
    overflow: hidden;
    text-overflow: ellipsis;
}

.selectContainer {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;

    &.isReadOnly .content input,
    &.isReadOnly .content {
        cursor: default;
    }

    &.isDisabled .content input,
    &.isDisabled .content {
        cursor: not-allowed;
    }

    .content {
        min-width: 0;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        flex-grow: 1;

        .inputValue {
            min-width: 0;
            flex-grow: 1;

            input {
                position: relative;

                width: 100%;
                height: 100%;

                box-sizing: border-box;
                border:none;
                outline:none;
                background:none;
            }

            .displayValue {
                width: 100%;
                height: 100%;

                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;

                &.placeholder {
                    color: #ccc;
                    font-style: italic;
                }
            }

            .displayValue ~ input {
                position: absolute;
                top: 0;
            }
        }
    };
}

.option {
    display: inline-flex;
    align-items: center;

    box-sizing: border-box;

    min-width: 0;

    border-radius: 3px;
    background-color: #f1f1f1;

    span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }

    svg {
        margin-left: 2px;

        line-height: 0;
        border-radius: 5px;

        fill: #7e7e7e;

        &:hover {
            fill: black;
        }
    }
}

.isReadOnly .option svg:hover,
.isDisabled .option svg:hover {
    fill: #7e7e7e;
}

.noContent {
    height: 26px;
    padding: 4px;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* * *
 * SIZE-EXTRA-SMALL
 * * *
 */
.selectContainer.sizeXs {
    .content {
        font-size: 9px;

        .inputValue {
            height: 9px;

            .displayValue {
                line-height: 9px;
            }
        }
    }

    input,
    .displayValue {
        padding: 0 2px;
    }

    .option {
        height: 7px;
        margin: 1px 1px;
        padding: 0 2px;
    }
}

/* * *
 * SIZE-SMALL
 * * *
 */

.selectContainer.sizeS {
    .content {
        font-size: 12px;

        .inputValue {
            height: 18px;

            .displayValue {
                line-height: 18px;
            }
        }
    }

    input,
    .displayValue  {
        padding: 0 2px;
    }

    .option {
        height: 16px;
        margin: 1px 1px;
        padding: 0 3px 0 4px;
    }
}

/* * *
 * SIZE-MIDDLE
 * * *
 */

.selectContainer.sizeM {
    .content {
        font-size: 13px;

        .inputValue {
            height: 26px;

            .displayValue {
                line-height: 26px;
            }
        }
    }

    input,
    .displayValue  {
        padding: 0;
    }

    .option {
        height: 22px;
        margin: 2px 1px;
        padding: 0 3px 0 6px;
    }
}


/* * *
 * SIZE-LARGE
 * * *
 */

.selectContainer.sizeL {
    .content {
        font-size: 15px;

        .inputValue {
            height: 38px;

            .displayValue {
                line-height: 38px;
            }
        }
    }

    input,
    .displayValue {
        padding: 0 2px;
    }

    .option {
        height: 32px;
        margin: 3px 2px;
        padding: 0 4px 0 7px;
    }
}

/* * *
 * SIZE-EXTRA-LARGE
 * * *
 */

.selectContainer.sizeXl {
    .content {
        font-size: 18px;

        .inputValue {
            height: 46px;

            .displayValue {
                line-height: 46px;
            }
        }
    }

    input,
    .displayValue  {
        padding: 0 2px;
    }

    .option {
        height: 38px;
        margin: 4px 3px;
        padding: 0 4px 0 8px;
    }
}

.selectContainer.inputRowsModeScroll {
    max-height: 80px;
    align-items: flex-start;
}
