/* nash-prod-control-polish-2026-08-27-c2 */

/* Preserve the detailed accessible name while keeping visible prompts legible
   inside the compact shared header at every supported width. */
#wrapper #page-header #page-header-menu #page-header-search {
  min-width: 0;
  line-height: 1.35 !important;
  white-space: nowrap;
}

#wrapper #page-header #page-header-menu #page-header-search:not(:focus),
body#search-page #wrapper form[action="/system/filter"] input[name="q"]:not(:focus),
body.category-page #wrapper form[action="/system/filter"] input[name="q"]:not(:focus),
body.system-page[id^="account-portal-"] #wrapper .nomad-search-input:not(:focus),
body.system-page[id^="account-portal-"] #wrapper .portal-header-search input:not(:focus) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#wrapper #page-header #page-header-menu #page-header-search:focus,
body#search-page #wrapper form[action="/system/filter"] input[name="q"]:focus,
body.category-page #wrapper form[action="/system/filter"] input[name="q"]:focus,
body.system-page[id^="account-portal-"] #wrapper .nomad-search-input:focus,
body.system-page[id^="account-portal-"] #wrapper .portal-header-search input:focus {
  text-overflow: clip;
}

/* Suggestion previews grow to fit their labels instead of silently cutting
   useful product, account, or user-identification text. */
#wrapper .typeahead li > a,
#admin-menu .typeahead.dropdown-menu li > a {
  height: auto;
  min-height: 2.75rem;
  max-height: none;
  overflow: visible;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

#wrapper .typeahead li > a > *,
#admin-menu .typeahead.dropdown-menu li > a > * {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Two-up account filters become too narrow for selected values on phones. */
@media (max-width: 30rem) {
  body.system-page[id^="account-portal-"] #wrapper .portal-sub-header {
    grid-template-areas:
      "sort"
      "filter"
      "status"
      "search"
      "dates" !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.system-page[id^="account-portal-"] #wrapper .portal-header-filter {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.system-page[id^="account-portal-"] #wrapper .portal-sub-header,
  body.system-page[id^="account-portal-"] #wrapper .portal-sub-header > div,
  body.system-page[id^="account-portal-"] #wrapper .portal-sub-header input,
  body.system-page[id^="account-portal-"] #wrapper .portal-sub-header select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}
