.header-search-wrapper { overflow: visible; min-height: 44px; box-sizing: border-box; }
#header-search-box { min-height: 44px; min-width: 0; }
.search-mode-picker { position: relative; display: flex; flex-shrink: 0; align-self: stretch; }
.header-search-wrapper .search-mode-button {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    min-width: 44px; min-height: 44px; padding: 0 11px; border: 0;
    border-left: 1px solid #e4e7ec; border-radius: 0; background: #f7f8fa;
    color: #465263; font: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
.search-mode-button svg { width: 18px; height: 18px; flex-shrink: 0; }
.search-mode-button .search-mode-chevron { width: 10px; height: 10px; }
.search-mode-button:hover, .search-mode-button[aria-expanded="true"] { background: #eef1f5; }
.search-mode-picker[data-current-mode="1"] .search-mode-button { color: #164c7c; background: #edf4fb; }
.search-mode-picker[data-current-mode="2"] .search-mode-button { color: #6f32b5; background: #f3ecfb; }
.search-mode-button:focus-visible, .search-mode-option:focus-visible {
    outline: 2px solid #6f32b5; outline-offset: -3px;
}
.search-mode-button:disabled { opacity: .6; cursor: progress; }
.search-mode-menu {
    position: fixed; inset: auto; margin: 0; z-index: 10000; overflow-y: auto;
    width: 310px; max-width: calc(100vw - 24px); padding: 8px;
    background: #fff; border: 1px solid #e4e7ec; border-radius: 14px;
    box-shadow: 0 12px 36px rgba(24, 34, 50, .16); text-align: left;
    white-space: normal; color: #263343;
}
.search-mode-menu[hidden], .search-mode-notice[hidden] { display: none; }
.search-mode-menu-heading { padding: 8px 10px 12px; border-bottom: 1px solid #edf0f4; margin-bottom: 5px; }
.search-mode-menu-heading strong { display: block; font-size: 14px; font-weight: 600; }
.search-mode-menu-heading span { display: block; font-size: 12px; color: #667587; margin-top: 3px; line-height: 1.4; }
.search-mode-menu .search-mode-option {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px;
    padding: 12px 10px; margin: 0; border: 0; border-radius: 9px;
    text-align: left; text-transform: none; letter-spacing: normal; font: inherit;
    color: #263343; background: transparent; cursor: pointer; white-space: normal;
}
.search-mode-option:hover, .search-mode-option:focus-visible { background: #f5f6f9; }
.search-mode-option[aria-checked="true"] { background: #f3ecfb; color: #57228f; }
.search-mode-option-copy { flex: 1; min-width: 0; }
.search-mode-option strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.search-mode-option small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: #667587; }
.search-mode-check { width: 18px; height: 18px; flex-shrink: 0; visibility: hidden; }
.search-mode-option[aria-checked="true"] .search-mode-check { visibility: visible; }
.search-mode-option:disabled { opacity: .5; cursor: not-allowed; }
.search-mode-notice { padding: 8px 10px; margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: #667587; }
@media (max-width: 991px) {
    /* The legacy theme hides inline search on small screens. Keep one shared
       search control below the logo/actions instead of duplicating its state. */
    .header .header-middle > .container { position: relative; padding-bottom: 70px; }
    .header .header-middle .header-right { position: static; }
    .header .header-middle .header-search-inline {
        display: block; position: absolute; left: 12px; right: 12px; bottom: 0;
        top: auto; width: auto; max-width: none; margin: 0;
    }
    .header .header-search-inline .header-search-wrapper {
        display: flex; position: static; width: 100%; min-height: 54px;
        max-width: none; margin: 0; padding: 0;
    }
}
@media (max-width: 767px) {
    .search-mode-button [data-search-mode-label], .search-mode-button .search-mode-chevron { display: none; }
    .header-search-wrapper .search-mode-button { padding: 0 10px; }
    .header-search-wrapper .form-control { min-width: 0; }
    .search-mode-menu { max-width: calc(100vw - 40px); }
}
