:root {
    --close-button: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.984 6.422 13.406 12l5.578 5.578-1.406 1.406L12 13.406l-5.578 5.578-1.406-1.406L10.594 12 5.016 6.422l1.406-1.406L12 10.594l5.578-5.578z'/%3E%3C/svg%3E");
    --loupe-icon: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23929292' d='M16.041 15.856a.995.995 0 0 0-.186.186A6.97 6.97 0 0 1 11 18c-1.933 0-3.682-.782-4.95-2.05S4 12.933 4 11s.782-3.682 2.05-4.95S9.067 4 11 4s3.682.782 4.95 2.05S18 9.067 18 11a6.971 6.971 0 0 1-1.959 4.856zm5.666 4.437-3.675-3.675A8.967 8.967 0 0 0 20 11c0-2.485-1.008-4.736-2.636-6.364S13.485 2 11 2 6.264 3.008 4.636 4.636 2 8.515 2 11s1.008 4.736 2.636 6.364S8.515 20 11 20a8.967 8.967 0 0 0 5.618-1.968l3.675 3.675a.999.999 0 1 0 1.414-1.414z'/%3E%3C/svg%3E");
}

.auto-search-wrapper {
    display: block;
    position: relative;
    border: none;
}

    .auto-search-wrapper input {
        /*border: 1px solid #d7d7d7;*/
        box-shadow: none;
        box-sizing: border-box;
        font-size: 16px;
        padding: 12px 62px 12px 10px;
        width: 100%;
    }

        .auto-search-wrapper input:focus {
            border: 1px solid #858585;
            outline: none;
        }

        .auto-search-wrapper input::-ms-clear {
            display: none;
        }

    .auto-search-wrapper ul {
        list-style: none;
        margin: 0;
        overflow: auto;
        padding: 0;
        background-color: white;
        text-align: left;
    }

        .auto-search-wrapper ul li {
            cursor: pointer;
            margin: 0;
            overflow: hidden;
            padding: 14px 26px;
            position: relative;
        }

            .auto-search-wrapper ul li:first-child {
                padding-top: 30px;
            }

            .auto-search-wrapper ul li:not(:last-child) {
                border-top: none;
            }

            .auto-search-wrapper ul li[disabled] {
                background: #ececec;
                opacity: 0.5;
                pointer-events: none;
            }

    .auto-search-wrapper .auto-expanded {
        border: 1px solid #858585;
        outline: none;
    }

    .auto-search-wrapper.loupe:before {
        filter: invert(60%);
    }

nav .auto-search-wrapper ul li:last-child {
    color: #51ADA8;
    background-color: inherit;
}

    nav .auto-search-wrapper ul li:last-child:hover,
    nav .auto-search-wrapper ul li:last-child:active {
        background-color: #51ADA8;
        color: #fff;
    }

nav .auto-search-wrapper ul li:first-child {
    padding-top: 14px;
}

.auto-is-loading:after {
    animation: auto-spinner 0.6s linear infinite;
    border-color: #d9d9d9 grey grey #d9d9d9;
    border-radius: 50%;
    border-style: solid;
    border-width: 2px;
    bottom: 0;
    box-sizing: border-box;
    content: "";
    height: 20px;
    margin: auto;
    position: absolute;
    right: 10px;
    top: 0;
    width: 20px;
}

.auto-is-loading .auto-clear {
    display: none;
}

@keyframes auto-spinner {
    to {
        transform: rotate(1turn);
    }
}

li.loupe:before {
    bottom: auto;
    top: 15px;
}

.loupe input {
    padding: 12px 45px 12px 35px;
}

.loupe:before {
    background-image: var(--loupe-icon);
    bottom: 0;
    content: "";
    height: 17px;
    left: 10px;
    margin: auto;
    position: absolute;
    top: 0;
    width: 17px;
}

.auto-selected:before {
    opacity: 1;
}

.auto-clear {
    align-items: center;
    background-color: transparent;
    border: none;
    bottom: 0;
    cursor: pointer;
    display: flex;
    height: auto;
    justify-content: center;
    margin: auto;
    position: absolute;
    right: 27px;
    top: -2px;
    width: 40px;
    z-index: 99998;
}

    .auto-clear:before {
        content: var(--close-button);
        height: 24px;
        line-height: 100%;
        width: 24px;
    }

    .auto-clear span {
        display: none;
    }

.auto-results-wrapper {
    background-color: inherit;
    /*border: 1px solid #858585;*/
    /*border-top: none;*/
    box-sizing: border-box;
    display: none;
    overflow: hidden;
    border-radius: 12px;
}

    .auto-results-wrapper ul > .loupe {
        padding-left: 40px;
    }

    .auto-results-wrapper.auto-is-active {
        display: block;
        margin-top: 0;
        position: absolute;
        width: 100%;
        z-index: 99997;
        top: 15px;
    }

nav .auto-results-wrapper {
    border-radius: 0;
}

    nav .auto-results-wrapper.auto-is-active {
        margin-top: 15px;
        top: inherit;
    }

@media only screen and (min-width: 769px) {
    nav .auto-results-wrapper.auto-is-active {
        margin-top: 25px;
    }
}

@media only screen and (min-width: 1024px) {
    nav .auto-results-wrapper.auto-is-active {
        width: 300px;
        right: 0;
    }
}

/*@media only screen and (min-width: 1400px) {
    nav .auto-results-wrapper.auto-is-active {
        left: 0;
    }
}*/


.auto-selected {
    background-color: #51ADA8;
    color: #fff;
}

    .auto-selected + li:before {
        border-top: none;
    }

.auto-error {
    border: 1px solid #ff3838;
}

    .auto-error::placeholder {
        color: #f66;
        opacity: 1;
    }

.auto-search-wrapper .hidden {
    display: none;
}
