/* Shared HongKe header search; intentionally scoped away from page forms. */
html body .site-header.hk-search-enabled .nav { gap: 10px; }
html body .site-header.hk-search-enabled .primary-nav > a,
html body .site-header.hk-search-enabled .menu-group > a { padding-inline: 8px; white-space: nowrap; }
.site-header .hk-header-search { flex: 0 0 44px; width: 44px; margin: 0; }
.site-header .hk-header-search > summary { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 1px solid var(--hk-line); border-radius: 50%; color: var(--hk-navy); background: #fff; cursor: pointer; list-style: none; }
.site-header .hk-header-search > summary::-webkit-details-marker { display: none; }
.site-header .hk-header-search > summary::marker { content: ''; }
.site-header .hk-header-search > summary:hover,
.site-header .hk-header-search[open] > summary { color: #ba4200; border-color: #f6ba97; background: #fff3eb; }
.site-header .hk-header-search svg { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
.site-header .hk-header-search__panel { display: none; position: absolute; z-index: 40; top: 100%; inset-inline: 0; padding: 14px max(20px,calc((100% - var(--hk-container))/2)); background: #eef2f5; border-top: 1px solid var(--hk-line); border-bottom: 2px solid var(--hk-orange); box-shadow: 0 10px 18px rgb(8 25 35 / 8%); }
.site-header .hk-header-search[open] > .hk-header-search__panel { display: block; }
.site-header .hk-header-search__form { display: flex; align-items: center; gap: 8px; width: min(620px,100%); margin: 0; margin-inline-start: auto; padding: 6px; border: 1px solid #dce2e7; border-radius: 6px; background: #fff; }
.site-header .hk-header-search__form:focus-within { border-color: #d95a14; box-shadow: 0 0 0 2px rgb(255 90 0 / 12%); }
.site-header .hk-header-search__form input[type="search"] { flex: 1 1 auto; min-width: 0; width: 100%; height: 48px; padding: 0 12px; border: 0; border-radius: 0; background: #fff; color: var(--hk-navy); font: inherit; font-size: 16px; line-height: 1.5; outline: none; box-shadow: none; }
.site-header .hk-header-search__form input::placeholder { color: #637080; opacity: 1; }
.site-header .hk-header-search__form button { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 4px; background: var(--hk-orange); color: #fff; cursor: pointer; }
.site-header .hk-header-search__form button:hover { background: #c84600; }
.site-header .hk-header-search__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.ar .site-header .hk-header-search__form input { direction: rtl; }
html body .site-header.hk-search-enabled .nav-toggle { order: 4; }
html body .site-header.hk-search-enabled .hk-header-search { order: 3; }

/* Long labels use the same disclosure menu instead of overflowing the header. */
html body .site-header.hk-search-enabled.is-nav-compact .nav { min-height: 72px; }
.site-header.hk-search-enabled.is-nav-compact .nav-toggle { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-content: center; gap: 5px; margin: 0; border: 1px solid var(--hk-line); border-radius: 4px; background: #fff; cursor: pointer; }
.site-header.hk-search-enabled.is-nav-compact .nav-toggle span { width: 21px; height: 2px; background: var(--hk-ink); }
.site-header.hk-search-enabled.is-nav-compact .primary-nav { position: absolute; z-index: 30; inset-inline: 0; top: 100%; display: none; max-height: calc(100dvh - 72px); overflow-y: auto; padding: 12px 20px 24px; border-bottom: 3px solid var(--hk-orange); background: #fff; }
.site-header.hk-search-enabled.is-nav-compact .primary-nav.is-open { display: block; }
html body .site-header.hk-search-enabled.is-nav-compact .primary-nav > a,
html body .site-header.hk-search-enabled.is-nav-compact .menu-group > a { display: flex; width: 100%; min-height: 50px; padding: 10px 0; white-space: normal; border-bottom: 1px solid var(--hk-line); }
.site-header.hk-search-enabled.is-nav-compact .menu-group { display: grid; grid-template-columns: minmax(0,1fr) 44px; }
.site-header.hk-search-enabled.is-nav-compact .menu-group__toggle { width: 44px; margin: 0; }
.site-header.hk-search-enabled.is-nav-compact .mega-menu { position: static; width: auto; grid-column: 1 / -1; grid-template-columns: 1fr; padding: 16px; box-shadow: none; border-radius: 0; }
.site-header.hk-search-enabled.is-nav-compact .language-switcher { margin-inline-start: auto; }
@media (max-width: 1200px) {
  html body .site-header.hk-search-enabled .primary-nav > a,
  html body .site-header.hk-search-enabled .menu-group > a { white-space: normal; }
}
@media (max-width: 1440px) {
  html:is(.ru,.de,.es,.vi,.fr,.pt) body .site-header.hk-search-enabled .primary-nav > a,
  html:is(.ru,.de,.es,.vi,.fr,.pt) body .site-header.hk-search-enabled .menu-group > a { white-space: normal; }
}
@media (max-width: 560px) {
  html:has(.site-header.hk-search-enabled) { --hk-header-offset: 118px; }
  html body .site-header.hk-search-enabled .nav { display: grid; grid-template-columns: minmax(0,1fr) auto 44px; gap: 6px 10px; min-height: 118px; padding-block: 10px; }
  html body .site-header.hk-search-enabled .brand { grid-column: 1; grid-row: 1; width: min(126px,100%); height: 44px; }
  html body .site-header.hk-search-enabled .brand-logo { width: 100%; }
  html body .site-header.hk-search-enabled .language-switcher { grid-column: 2; grid-row: 1; margin: 0; }
  html body .site-header.hk-search-enabled .nav-toggle { grid-column: 3; grid-row: 1; margin: 0; }
  html body .site-header.hk-search-enabled .nav-quote { display: inline-flex; grid-column: 1 / 3; grid-row: 2; justify-self: end; margin: 0; max-width: 100%; min-height: 44px; padding: 10px 14px; white-space: normal; text-align: center; font-size: 13px; }
  html body .site-header.hk-search-enabled .hk-header-search { grid-column: 3; grid-row: 2; margin: 0; }
  .site-header .hk-header-search__panel { padding: 12px 18px; }
  .site-header .hk-header-search__form input[type="search"] { padding-inline: 8px; }
  html body .site-header.hk-search-enabled .primary-nav { max-height: calc(100dvh - 118px); }
}
