.nvs-autocomplete-host {
    position: relative;
    min-width: 0;
}

.nvs-autocomplete-host > input[type="search"] {
    width: 100%;
}

.nvs-autocomplete {
    position: absolute;
    z-index: 100;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: min(420px, 52vh);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #d9e0ec;
    border-top: 3px solid #024dfc;
    background: #fff;
    box-shadow: 0 24px 55px rgba(7, 17, 37, .18);
    overscroll-behavior: contain;
}

.nvs-autocomplete[hidden] {
    display: none !important;
}

.nvs-autocomplete__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-height: 66px;
    padding: 12px 18px;
    border: 0;
    border-bottom: 1px solid #e4e9f1;
    border-radius: 0;
    background: #fff;
    color: #071125;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.nvs-autocomplete__option:last-child {
    border-bottom: 0;
}

.nvs-autocomplete__option:hover,
.nvs-autocomplete__option.is-active {
    background: #f0f4fc;
    color: #024dfc;
}

.nvs-autocomplete__text {
    display: block;
    min-width: 0;
}

.nvs-autocomplete__text strong,
.nvs-autocomplete__text small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nvs-autocomplete__text strong {
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.nvs-autocomplete__text small {
    margin-top: 4px;
    color: #748096;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.nvs-autocomplete__arrow {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    background: #024dfc;
    color: #fff;
    font-size: 17px;
}

.nvs-autocomplete__message {
    margin: 0;
    padding: 17px 18px;
    color: #748096;
    font-size: 13px;
    line-height: 1.5;
}

.search-popup .nvs-autocomplete {
    position: absolute;
    z-index: 20;
    top: 100%;
    max-height: clamp(160px, calc(100dvh - 430px), 320px);
    border-right-color: #d9e0ec;
    border-bottom-color: #d9e0ec;
    border-left-color: #d9e0ec;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .42);
}

.search-popup {
    overflow: visible;
}

.search-popup .search-popup__panel {
    height: min(500px, calc(100dvh - 80px));
    margin: 0;
    overflow: visible;
}

.search-popup .nvs-autocomplete-host {
    position: relative;
    align-self: start;
}

.search-popup .search-popup__form > button[type="submit"] {
    align-self: start;
    height: 68px;
}

.search-popup .nvs-autocomplete__option {
    border-bottom-color: #e4e9f1;
    background: #fff;
    color: #071125;
}

.search-popup .search-popup__form .nvs-autocomplete__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    min-width: 0;
    min-height: 66px;
    padding: 12px 18px;
    text-align: left;
    text-transform: none;
}

.search-popup .search-popup__form .nvs-autocomplete__text {
    flex: 1 1 auto;
    text-align: left;
}

.search-popup .search-popup__form .nvs-autocomplete__arrow {
    display: grid;
    flex: 0 0 34px;
    min-width: 34px;
    padding: 0;
    place-items: center;
    text-align: center;
}

.search-popup .nvs-autocomplete__option:hover,
.search-popup .nvs-autocomplete__option.is-active {
    background: #f0f4fc;
    color: #024dfc;
}

.search-popup .nvs-autocomplete__text small,
.search-popup .nvs-autocomplete__message {
    color: #748096;
}

@media (max-width: 767px) {
    .nvs-autocomplete {
        max-height: min(330px, 42vh);
    }

    .nvs-autocomplete__option {
        min-height: 60px;
        padding: 10px 13px;
    }

    .search-popup .search-popup__form .nvs-autocomplete__option {
        min-height: 60px;
        padding: 10px 13px;
    }

    .search-popup {
        align-items: flex-start;
        padding: 12px;
        overflow: visible;
    }

    .search-popup .search-popup__panel {
        height: min(440px, calc(100dvh - 24px));
        margin: 0;
    }

    .search-popup .nvs-autocomplete {
        top: calc(100% + 52px);
        max-height: clamp(140px, calc(100dvh - 390px), 280px);
    }

    .search-popup .search-popup__form > button[type="submit"] {
        width: 100%;
        height: 52px;
    }

    .nvs-autocomplete__text strong {
        font-size: 13px;
    }
}

@media (min-width: 768px) and (max-width: 1100px) {
    .search-popup .search-popup__panel {
        height: min(470px, calc(100dvh - 56px));
    }

    .search-popup .nvs-autocomplete {
        max-height: clamp(160px, calc(100dvh - 400px), 320px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .nvs-autocomplete__option {
        transition: none;
    }
}
