/* Shared customer search dialog. IDs deliberately override legacy page search rules. */
body.oje-search-modal-ready .site-header .top-header {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  align-content: center !important;
  gap: 14px !important;
  height: 64px !important;
  min-height: 64px !important;
  padding: 10px 16px !important;
  box-sizing: border-box !important;
}
body.oje-search-modal-ready .site-header { height: auto !important; min-height: 0 !important; }
body.oje-search-modal-ready .top-header > .brand { flex: 0 1 auto !important; min-width: 0 !important; }
#ojeSearchToggle {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 44px; width: 44px; height: 44px; margin: 0 0 0 auto;
  padding: 0; border: 1px solid #e4e7ec; border-radius: 50%;
  background: #fff; color: #101828; cursor: pointer;
}
#ojeSearchToggle:hover { background: #f2f7ff; color: #2189ff; }
#ojeSearchToggle:focus-visible, #ojeSearchModal button:focus-visible { outline: 2px solid #2189ff; outline-offset: 3px; }
html.oje-search-modal-open, html.oje-search-modal-open body { overflow: hidden !important; }
#ojeSearchModal {
  position: fixed; inset: 5vh 0 auto; margin: 0 auto;
  width: min(520px, calc(100% - 32px)); max-width: none;
  max-height: 85vh; max-height: 85dvh; overflow: auto;
  padding: 24px 20px 28px; box-sizing: border-box;
  border: 0; border-radius: 20px; background: #fff; color: #101828;
  box-shadow: 0 24px 70px rgba(15,23,42,.28); font-family: inherit;
}
#ojeSearchModal::backdrop { background: rgba(15,23,42,.42); }
#ojeSearchModal .oje-search-handle { width: 44px; height: 5px; margin: -12px auto 20px; border-radius: 99px; background: #e2e8f0; }
#ojeSearchModal .oje-search-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#ojeSearchModal h2 { margin: 0; font-size: 24px; line-height: 1.4; font-weight: 700; }
#ojeSearchModal .oje-search-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #cbd5e1; border-radius: 50%; background: #fff; color: #101828; font-size: 24px; cursor: pointer; }
#ojeSearchModal .oje-search-description { margin: 8px 0 20px; font-size: 13px; color: #667085; }
#ojeSearchModal .header-search {
  position: relative !important; display: flex !important; flex-wrap: wrap !important;
  align-items: center !important; gap: 0 !important; flex: none !important;
  width: 100% !important; min-width: 0 !important; max-width: none !important;
  height: auto !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important;
  box-shadow: none !important; transform: none !important;
}
#ojeSearchModal .header-search::before, #ojeSearchModal .header-search::after,
#ojeSearchModal #clearSearch::before, #ojeSearchModal #clearSearch::after { display: none !important; }
#ojeSearchModal #productSearch {
  display: block !important; flex: 1 1 0 !important; width: 0 !important; min-width: 0 !important;
  height: 46px !important; padding: 0 14px !important; margin: 0 !important;
  border: 1px solid #cbd5e1 !important; border-radius: 12px !important;
  background: #fff !important; color: #101828 !important; font: inherit !important; font-size: 16px !important;
}
#ojeSearchModal #productSearch:focus { outline: 2px solid #2189ff !important; outline-offset: 1px; }
#ojeSearchModal #clearSearch {
  position: static !important; transform: none !important; display: flex !important;
  align-items: center !important; justify-content: center !important;
  flex: 0 0 60px !important; width: 60px !important; min-width: 60px !important; max-width: 60px !important;
  height: 46px !important; margin: 0 0 0 8px !important; padding: 0 !important;
  border: 0 !important; border-radius: 12px !important; background: #2189ff !important;
  color: #fff !important; font: inherit !important; font-size: 14px !important; font-weight: 700 !important; cursor: pointer;
}
#ojeSearchModal #searchSuggestions {
  position: static !important; flex: 0 0 100% !important; width: 100% !important;
  min-width: 0 !important; max-height: none !important; margin: 12px 0 0 !important;
  padding: 6px 0 !important; box-sizing: border-box !important; overflow: hidden !important;
  border: 1px solid #e4e7ec !important; border-radius: 14px !important;
  background: #fff !important; box-shadow: none !important;
}
#ojeSearchModal #searchSuggestions[hidden] { display: none !important; }
#ojeSearchModal .search-suggestion-item { display: flex !important; align-items: center !important; gap: 10px !important; width: 100% !important; height: auto !important; min-height: 53px !important; max-height: none !important; padding: 8px 14px !important; border: 0 !important; background: #fff !important; text-align: left !important; cursor: pointer; }
#ojeSearchModal .search-suggestion-item:hover, #ojeSearchModal .search-suggestion-item:focus { background: #f8fafc !important; }
#ojeSearchModal .search-suggestion-text { flex: 1; min-width: 0; }
#ojeSearchModal .search-suggestion-item strong { display: block !important; color: #101828 !important; font-size: 14px !important; font-weight: 500 !important; white-space: normal !important; line-height: 1.4 !important; }
#ojeSearchModal .search-suggestion-item small { display: block !important; margin-top: 3px !important; color: #98a2b3 !important; font-size: 11px !important; line-height: 1.35 !important; }
@media (max-width: 600px) {
  /* Outrank the legacy three-body-class search-row rules on mobile only. */
  body.oje-search-modal-ready.oje-search-modal-ready.oje-search-modal-ready .site-header .top-header {
    height: 64px !important;
    min-height: 64px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    align-content: center !important;
    gap: 14px !important;
    padding: 10px 16px !important;
  }
  #ojeSearchModal { padding: 24px 18px; }
  #ojeSearchModal h2 { font-size: 22px; }
}

