form[data-nm-search] {
    position: relative;
}

.nm-search-field {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--bs-dark);
    border-radius: 999px;
}

.nm-search-field:hover,
.nm-search-field:focus-within {
    border-color: var(--bs-black);
}

.nm-search-icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background: url("../images/icons/mobile-menu/search.svg") center / contain no-repeat;
}

.nm-mobile-menu-search:hover .nm-search-icon {
    background-image: url("../images/icons/search-bar/search-hover-mobile.svg");
}

.nm-search-field.is-filled .nm-search-icon {
    background-image: url("../images/icons/search-bar/search-value.svg");
}

.nm-search-field:focus-within .nm-search-icon {
    background-image: url("../images/icons/search-bar/search-focus.svg");
}

.nm-search-field input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bs-black);
    caret-color: var(--bs-main-500);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.nm-search-field input:focus {
    color: var(--bs-black);
}

.nm-search-field input::placeholder {
    color: var(--bs-darkness);
    opacity: 1;
}

.nm-search-field input::-webkit-search-cancel-button,
.nm-search-field input::-webkit-search-decoration {
    display: none;
    -webkit-appearance: none;
}

.nm-search-clear {
    display: none;
    flex: 0 0 auto;
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
    cursor: pointer;
}

.nm-search-field.is-filled .nm-search-clear {
    display: inline-flex;
}

.nm-search-panel {
    position: absolute;
    top: 100%;
    z-index: 20;
    text-align: left;
}

.nm-search-panel-dropdown {
    right: 0;
    left: 0;
    margin-top: 8px;
    padding: 16px;
    border: 1px solid var(--bs-neutral);
    border-radius: 16px;
    background-color: var(--bs-white);
    box-shadow: 0 8px 24px rgba(7, 8, 13, 0.12);
}

.nm-search-panel-default .nm-search-section + .nm-search-section {
    margin-top: 24px;
}

.nm-search-title {
    margin: 0 0 12px;
    color: var(--bs-darkness);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
}

.nm-search-suggest {
    margin: 0;
    padding: 0;
}

.nm-search-suggest-count {
    padding: 0 0 4px;
    color: var(--bs-black);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.nm-search-suggest-group {
    padding: 16px 0 4px;
    color: var(--bs-darkness);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
}

.nm-search-suggest [role="option"] {
    border-bottom: 1px solid var(--bs-neutral);
}

.nm-search-suggest a {
    display: block;
    padding: 10px 0;
    color: var(--bs-black);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
}

.nm-search-suggest a strong {
    font-weight: 700;
}

.nm-search-suggest [aria-selected="true"] a,
.nm-search-suggest a:hover,
.nm-search-suggest a:focus-visible {
    color: var(--bs-secondary-500);
}

.nm-search-suggest-empty {
    padding: 0 0 4px;
    color: var(--bs-black);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.nm-search-suggest-hint {
    padding: 0 0 12px;
    color: var(--bs-darkness);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.nm-search-suggest .nm-search-suggest-all {
    padding: 16px 0 0;
}

.nm-search-suggest .nm-search-suggest-all a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: var(--bs-secondary-500);
    font-weight: 600;
}

.nm-search-suggest-arrow,
.nm-search-topic-arrow {
    flex: 0 0 auto;
    background-color: currentColor;
    -webkit-mask: url("../images/icons/desktop-menu/arrow-up-right.svg") center / contain no-repeat;
    mask: url("../images/icons/desktop-menu/arrow-up-right.svg") center / contain no-repeat;
}

.nm-search-suggest-arrow {
    width: 16px;
    height: 16px;
}

.nm-search-topic-arrow {
    width: 20px;
    height: 20px;
}

.nm-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nm-search-chips a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--bs-dark);
    border-radius: 999px;
    color: var(--bs-black);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    text-decoration: none;
}

.nm-search-chips a:hover,
.nm-search-chips a:focus-visible {
    border-color: var(--bs-secondary-500);
    color: var(--bs-secondary-500);
}

.nm-search-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 40px;
    margin: 0;
    padding: 0;
}

.nm-search-topics a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: var(--bs-black);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
}

.nm-search-topics a:hover,
.nm-search-topics a:focus-visible {
    color: var(--bs-secondary-500);
}
