.form-select__dropdown-wrapper {
    position: relative;
    width: 100%;
}

.form-select__dropdown-wrapper .ui-menu__list {
    max-height: calc(100vh - var(--menu-top, 0px) - var(--space-x4));
}

.form-select__dropdown-wrapper--error .ui-button:not(:hover, :focus) {
    border-color: var(--theme-critical-fill);
}

.form-select--hint-visible {
    --ui-button-sublabel-color-override: var(--theme-text-30);
}

.form-select__dropdown {
    position: relative;
    width: 100%;
    height: var(--theme-form-large-height);
    padding: 0 var(--space-x4) 0 var(--space-x2);
    font: var(--theme-paragraph-30-medium);
    color: inherit;
    letter-spacing: var(--theme-paragraph-30-letter-spacing);
    background: transparent;
    border: 1px solid var(--theme-fill-20);
    border-radius: var(--theme-border-radius-input-large);
}

.form-select__dropdown:hover {
    border-color: var(--theme-emphasis-fill);
}

.form-select__dropdown[disabled] {
    color: var(--theme-text-30);
    cursor: not-allowed;
}

.form-select--invalid .form-select__dropdown {
    border-color: var(--theme-critical-fill);
}

.form-select[t-size="small"] .form-select__dropdown {
    height: var(--theme-form-small-height);
    border-radius: var(--theme-border-radius-input-small);
}

.form-select[t-size="medium"] .form-select__dropdown {
    height: var(--theme-form-medium-height);
    border-radius: var(--theme-border-radius-input-medium);
}

.form-select__icon {
    position: absolute;
    top: 0;
    right: var(--space-x1_5);
    display: flex;
    align-items: center;
    height: 100%;
    color: var(--theme-body-text-color);
    cursor: pointer;
}

.form-select .form-element__error--visible {
    margin-top: var(--space-half);
}
