/* MEAI listing header alignment v3
   Search + Category desktop alignment.
   IMPORTANT: do not touch Journal/Typeahead dropdown internals. */

@media (min-width: 1025px) {
  /* Keep the whole main header row vertically aligned. */
  .meai-header-2026 .meai-main-row-inner {
    height: 82px !important;
    align-items: center !important;
  }

  /* Only position the OUTER search slot.
     The actual Journal search / Typeahead internals remain untouched. */
  .meai-header-2026 .meai-main-row-inner > .meai-search-wrap {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 680px !important;
    height: 82px !important;
    min-height: 82px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }

  /* Center only #search itself. Do not impose height/position on its
     dropdown-menu, .header-search, twitter-typeahead or .tt-menu. */
  .meai-header-2026 .meai-main-row-inner > .meai-search-wrap > #search {
    width: 100% !important;
    margin: 0 !important;
    align-self: center !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }

  /* Re-assert the normal visual height of the input/button only. */
  .meai-header-2026 .meai-search-wrap .search-input {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
  }

  .meai-header-2026 .meai-search-wrap .search-button {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    top: 0 !important;
    bottom: auto !important;
    margin: 0 !important;
  }

  /* Explicitly undo the two v2 rules that broke Journal Typeahead.
     These match Journal's normal expectations for autocomplete. */
  .meai-header-2026 .meai-search-wrap .twitter-typeahead {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: block !important;
    position: relative !important;
  }

  .meai-header-2026 .meai-search-wrap .tt-menu {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 100% !important;
    bottom: auto !important;
    margin-top: 2px !important;
    transform: none !important;
    z-index: 10050 !important;
  }

  /* The Journal dropdown that contains .header-search must keep its
     original dropdown positioning; only ensure it fills #search width. */
  .meai-header-2026 .meai-search-wrap > #search > .dropdown-menu {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .meai-header-2026 .meai-search-wrap .header-search {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    display: block !important;
  }

  /* Never turn Typeahead's span wrapper into flex. */
  .meai-header-2026 .meai-search-wrap .header-search > span.twitter-typeahead {
    display: block !important;
  }
}

/* Mobile stays under the single responsive header rules. */
@media (max-width: 1024px) {
  .meai-header-2026 .meai-search-wrap,
  .meai-header-2026 .meai-search-wrap > #search {
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }
}

/* MEAI category info module: hide Journal Blocks module 48 completely */
.module.module-blocks.module-blocks-48 {
    display: none !important;
}
