/* Accessibility auto complete */
.autocomplete__wrapper {
    position: relative;
}

.autocomplete__hint,
.autocomplete__input {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    border: 2px solid #4c6272;
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-bottom: 0;
}

.autocomplete__input {
    /* padding: 5px; */
    background-color: #fff;
    position: relative;
}

.autocomplete__hint {
    color: #b1b4b6;
    position: absolute;
}

.autocomplete__input--default {
    padding: 5px;
}

.autocomplete__input--focused,
.autocomplete__input:focus {
    border: 2px solid #212b32;
    box-shadow: inset 0 0 0 2px;
    outline: 4px solid #ffeb3b;
    outline-offset: 0;
}

.nhsuk-form-group--error .autocomplete__hint, .nhsuk-form-group--error .autocomplete__input {
    border: 2px solid #d5281b;
}

.nhsuk-form-group--error .autocomplete__input--focused,
.autocomplete__input:focus {
    border: 2px solid #212b32;
    box-shadow: inset 0 0 0 2px;
    outline-offset: 0;
}

.autocomplete__input--show-all-values {
    padding: 5px 34px 5px 5px;
    cursor: pointer;
}

.autocomplete__dropdown-arrow-down {
    /* z-index: -1; */
    display: inline-block;
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    top: 10px;
    fill: currentColor;
}

.autocomplete__menu {
    background-color: #fff;
    border: 2px solid #0b0c0c;
    border-top: 0;
    color: #0b0c0c;
    margin: 0;
    max-height: 342px;
    overflow-x: hidden;
    padding: 0;
    width: 100%;
    /* width: calc(100% - 4px); */
}

.autocomplete__menu--visible {
    display: block;
}

.autocomplete__menu--hidden {
    display: none;
}

.autocomplete__menu--overlay {
    box-shadow: rgba(0, 0, 0, 0.256863) 0 2px 6px;
    left: 0;
    position: absolute;
    top: 100%;
    z-index: 100;
}

.autocomplete__menu--inline {
    position: relative;
}

.autocomplete__option {
    border-bottom: solid #b1b4b6;
    border-width: 1px 0;
    cursor: pointer;
    display: block;
    position: relative;
    margin-bottom: 0px;
}

.autocomplete__option > * {
    pointer-events: none;
    margin-bottom: 0;
}

.autocomplete__option:first-of-type {
    border-top-width: 0;
    margin-bottom: 0;
}

.autocomplete__option:last-of-type {
    border-bottom-width: 0;
    margin-bottom: 0;
}

.autocomplete__option--odd {
    background-color: #fafafa;
}

.autocomplete__option--focused,
.autocomplete__option:hover {
    background-color: #005eb8;
    border-color: #005eb8;
    color: #fff;
    outline: 0;
}

@media (-ms-high-contrast: active), (forced-colors: active) {
    .autocomplete__menu {
        border-color: FieldText;
    }
    .autocomplete__option {
        background-color: Field;
        color: FieldText;
    }
    .autocomplete__option--focused,
    .autocomplete__option:hover {
        forced-color-adjust: none;
        background-color: SelectedItem;
        border-color: SelectedItem;
        color: SelectedItemText;
        outline-color: SelectedItemText;
    }
}
.autocomplete__option--no-results {
    background-color: #fafafa;
    color: #646b6f;
    cursor: not-allowed;
}

.autocomplete__hint,
.autocomplete__input,
.autocomplete__option {
    font-size: 16px;
    line-height: 1.25;
}

.autocomplete__hint,
.autocomplete__option {
    padding: 5px;
}

@media (min-width: 641px) {
    .autocomplete__hint,
    .autocomplete__input,
    .autocomplete__option {
        font-size: 19px;
        line-height: 1.31579;
    }
}
.autocomplete__list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0 0;
}

.autocomplete__list .autocomplete__selected-option,
.autocomplete__list .autocomplete__selected-option:hover {
    cursor: inherit;
    color: #0b0c0c;
    margin: 5px 0;
}

.autocomplete__list .autocomplete__remove-option {
    cursor: pointer;
    color: #005eb8;
    text-decoration: underline;
    background: 0 0;
    border: 0;
    font-size: inherit;
    /* margin-left: 5px; */
    padding: 0px;
}

.autocomplete__list .autocomplete__remove-option:hover {
    color: #7c2855;
    text-decoration: none;
}

.autocomplete__list .autocomplete__remove-option:focus {
    background-color: #ffeb3b;
    box-shadow: 0 -2px #ffeb3b, 0 4px #212b32;
    color: #212b32;
    outline: 4px solid transparent;
    text-decoration: none;
}

.autocomplete__list .autocomplete__remove-option:active {
    color: #002f5c;
}

.autocomplete__list .autocomplete__remove-option:before {
    /* content: "× "; */
    color: inherit;
}

.autocomplete__list-item-description {
    display: none;
}

/* Multi select - display */
.autocomplete__selected-option {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #d8dde0;
    padding-bottom: 8px;
}

.autocomplete__input--focused ~ svg g polygon {
    fill: #fff;
}

.autocomplete__wrapper {
    background: #fff;
}