.autocomplete-wrapper {
    position: relative;
    display: inline-block;
}

.autocomplete-caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0;
}

.autocomplete-caret:before {
    content: '\276F';
    font-size: 13px;
    transform: rotate(90deg);
    display: block;
}

.autocomplete-input {
    width: 100%;
    box-sizing: border-box;
    /* extra right padding leaves room for the caret so wrapped text doesn't run under it */
    padding: 0.4em 1.6em 0.4em 0.6em;
    /* textarea behaving like an auto-growing single field: wrap, no manual resize,
       no scrollbar (JS sets the height to fit) */
    resize: none;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    font: inherit;
    line-height: 1.3;
    vertical-align: middle;
    /* One-line floor so a not-yet-grown field (e.g. built while hidden) still
       looks like a normal control instead of collapsing. */
    min-height: 2.4em;
}

.ui-autocomplete {
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.ui-menu-item .ui-menu-item-wrapper {
    padding-left: 1.5em;
}

.ui-autocomplete-optgroup {
    font-weight: bold;
    margin: .5em 0;
    padding-left: .5em;
}
/* Highlight the option that is currently selected in the underlying <select>.
   Excludes the hover/active state so the selected row still shows the normal
   hover styling (it can be re-selected). */
.ui-autocomplete .autocomplete-selected .ui-menu-item-wrapper:not(.ui-state-active):not(.ui-state-focus) {
    background-color: #f5f5f5;
}
/* "Show all" entry that appears above the scoped class group */
.ui-autocomplete .ui-autocomplete-showall .ui-menu-item-wrapper {
    font-style: italic;
}
.ui-front {
    z-index: 5000 !important;
}
@media (max-width: 767px) {
    .ui-autocomplete.ui-menu {
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        overflow-y: auto !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .ui-autocomplete.ui-menu li {
        font-size: 1.5em;
        border-bottom: 1px solid #EEE;
        margin: 0;
    }
    .ui-autocomplete.ui-menu .ui-autocomplete-optgroup {
        padding: 0.5em;
    }
    .ui-autocomplete.ui-menu .ui-menu-item div {
        padding: 0.25em 1em;
    }
}