/* Mobile: opening search must not break the header icon row.
   The field is a full-width bar under the logo and icons. */

@media only screen and (max-width: 770px) {
  html:root body #header .page-header-container,
  html:root body #header.lux-header.lux-sticky .page-header-container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    overflow: visible !important;
  }

  html:root body #header .skip-links,
  html:root body .skip-links {
    flex: 0 0 100% !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    flex-shrink: 0 !important;
  }

  /* Logo stays pinned to the 56px icon row when the search panel opens */
  html:root body #header a.logo,
  html:root body #header a.logo.lux-logo,
  html:root body #header .lux-logo {
    top: 28px !important;
    transform: translate(-50%, -50%) !important;
  }

  html:root body #header #header-search,
  html:root body #header #header-search.skip-content,
  html:root body #header #header-search:not(.skip-active) {
    display: none !important;
  }

  html:root body #header #header-search.skip-active,
  html:root body #header #header-search.skip-content.skip-active,
  html:root body #header #header-search.skip-content.lux-header-search.skip-active {
    display: block !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    float: none !important;
    clear: both !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    order: 20 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    background: #fff !important;
    border: 0 !important;
    border-top: 1px solid #eee !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
  }

  html:root body #header #header-search.skip-active form,
  html:root body #header #header-search.skip-active .input-box {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid #e5e5e5 !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  html:root body #header #header-search.skip-active input#search,
  html:root body #header #header-search.skip-active input[type="search"],
  html:root body #header #header-search.skip-active input[name="q"] {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
    font-size: 16px !important;
    line-height: 44px !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }

  html:root body #header #header-search.skip-active button.search-button {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 1px solid #e5e5e5 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  html:root body #header #header-search.skip-active #search_autocomplete,
  html:root body #header-search.skip-active #search_autocomplete {
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    top: 100% !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
    z-index: 20 !important;
  }
}
