/* Header advanced search — unified category + query bar */

.nasad-header-search {
    position: relative;
    width: 100%;
    z-index: 120;
}

.nasad-header-search__form {
    margin: 0;
    position: relative;
    width: 100%;
}

.nasad-header-search__bar {
    align-items: stretch;
    background: #fff;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    display: flex;
    min-height: 48px;
    overflow: visible;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    z-index: 2;
}

.nasad-header-search__bar:focus-within {
    border-color: #443297;
    box-shadow: 0 0 0 3px rgba(68, 50, 151, 0.1);
}

.nasad-header-search__category {
    flex: 0 0 auto;
    max-width: 220px;
    min-width: 148px;
    padding-left: 0.55rem;
    position: relative;
}

.nasad-header-search__category-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    color: #344054;
    cursor: pointer;
    display: flex;
    font-size: 0.8125rem;
    font-weight: 600;
    gap: 0.4rem;
    height: 46px;
    line-height: 1.2;
    max-width: 100%;
    padding: 0 0.65rem 0 0.2rem;
    width: 100%;
}

.nasad-header-search__category-trigger:hover,
.nasad-header-search__category-trigger:focus-visible {
    color: #101828;
    outline: none;
}

.nasad-header-search__category-icon {
    align-items: center;
    color: #443297;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.82rem;
    justify-content: center;
    width: 1rem;
}

.nasad-header-search__category-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nasad-header-search__category-chevron {
    align-items: center;
    color: #98a2b3;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.68rem;
    transition: transform 0.15s ease;
}

.nasad-header-search__category.is-open .nasad-header-search__category-chevron {
    transform: rotate(180deg);
}

.nasad-header-search__category-menu {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.14);
    left: 0;
    margin-top: 0.45rem;
    min-width: min(280px, 88vw);
    overflow: hidden;
    position: absolute;
    top: calc(100% + 4px);
    width: max(100%, 240px);
    z-index: 130;
}

.nasad-header-search__category-search {
    align-items: center;
    border-bottom: 1px solid #f2f4f7;
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
}

.nasad-header-search__category-search i {
    color: #98a2b3;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.nasad-header-search__category-filter {
    appearance: none;
    background: #f9fafb;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    color: #101828;
    flex: 1;
    font-size: 0.8125rem;
    min-height: 34px;
    outline: none;
    padding: 0.35rem 0.65rem;
}

.nasad-header-search__category-filter:focus {
    background: #fff;
    border-color: #443297;
    box-shadow: 0 0 0 3px rgba(68, 50, 151, 0.1);
}

.nasad-header-search__category-list {
    list-style: none;
    margin: 0;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.35rem;
    scrollbar-width: thin;
}

.nasad-header-search__category-list::-webkit-scrollbar {
    width: 6px;
}

.nasad-header-search__category-list::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 999px;
}

.nasad-header-search__category-option {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #344054;
    cursor: pointer;
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.55rem 0.65rem;
    text-align: left;
    transition: background-color 0.15s ease, color 0.15s ease;
    width: 100%;
}

.nasad-header-search__category-option:hover,
.nasad-header-search__category-option:focus-visible {
    background: rgba(68, 50, 151, 0.06);
    color: #443297;
    outline: none;
}

.nasad-header-search__category-option.is-active {
    background: rgba(68, 50, 151, 0.1);
    color: #443297;
    font-weight: 700;
}

.nasad-header-search__divider {
    align-self: center;
    background: #e4e7ec;
    flex-shrink: 0;
    height: 24px;
    width: 1px;
}

.nasad-header-search__field {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 0.5rem;
    min-width: 0;
    padding: 0 0.75rem;
}

.nasad-header-search__field-icon {
    align-items: center;
    color: #98a2b3;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.875rem;
    justify-content: center;
    width: 1rem;
}

.nasad-header-search__input,
.nasad-header-search input.form_control {
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #101828;
    flex: 1;
    font-size: 0.875rem;
    height: 46px !important;
    line-height: 1.4;
    margin: 0 !important;
    min-height: 46px;
    min-width: 0;
    outline: none !important;
    padding: 0 !important;
    width: 100%;
}

.nasad-header-search__input::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.nasad-header-search__input:focus,
.nasad-header-search__input:focus-visible {
    box-shadow: none !important;
    outline: none !important;
}

.nasad-header-search .header-search-suggestions-wrap {
    left: 0;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 100%;
    z-index: 125;
}

.nasad-header-search__submit {
    align-items: center;
    background: #f5c34b;
    border: 0;
    border-radius: 0 11px 11px 0;
    color: #443297;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.8125rem;
    font-weight: 600;
    gap: 0.45rem;
    justify-content: center;
    min-height: 48px;
    min-width: 48px;
    padding: 0 1rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nasad-header-search__submit:hover,
.nasad-header-search__submit:focus-visible {
    background: #e8b440;
    color: #352678;
    outline: none;
}

.nasad-header-search__submit .flaticon-search {
    font-size: 1rem;
    line-height: 1;
}

.nasad-header-search__submit-label {
    display: inline;
}

@media (max-width: 1199.98px) {
    .nasad-header-search__submit-label {
        display: none;
    }

    .nasad-header-search__submit {
        padding: 0 0.85rem;
    }

    .nasad-header-search__category {
        max-width: 170px;
        min-width: 132px;
    }
}

@media (max-width: 991.98px) {
    .nasad-header-search {
        display: none;
    }
}
