.edpack-smart-search,.edpack-smart-search *{box-sizing:border-box}
.edpack-smart-search__dock{position:relative;z-index:110;display:flex;align-items:center;flex:0 1 320px;min-width:220px;max-width:340px;margin-left:auto;margin-right:12px;order:80}
.edpack-smart-search__desktop{width:100%;height:44px;display:flex;align-items:center;gap:8px;padding:0 12px;background:#fff;border:1px solid #d0d5dd;border-radius:10px;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .15s ease,box-shadow .15s ease}
.edpack-smart-search__desktop:focus-within{border-color:#98a2b3;box-shadow:0 0 0 3px rgba(17,24,39,.08)}
.edpack-smart-search__icon{display:inline-block;flex:0 0 18px;width:18px;height:18px;border:2px solid currentColor;border-radius:50%;position:relative;color:#344054}
.edpack-smart-search__icon:after{content:"";position:absolute;width:7px;height:2px;background:currentColor;right:-5px;bottom:-2px;transform:rotate(45deg);border-radius:2px}
.edpack-smart-search__desktop input,.edpack-smart-search__mobile-field input{appearance:none;-webkit-appearance:none;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:#101828;font:inherit;font-size:14px;line-height:1.3;width:100%;min-width:0;margin:0;padding:0}
.edpack-smart-search__desktop input::placeholder,.edpack-smart-search__mobile-field input::placeholder{color:#667085;opacity:1}
.edpack-smart-search__clear{border:0;background:transparent;color:#667085;font-size:22px;line-height:1;padding:3px;cursor:pointer}
.edpack-smart-search__mobile-trigger{display:none;width:44px;height:44px;min-width:44px;align-items:center;justify-content:center;border:1px solid #d0d5dd;border-radius:10px;background:#fff;color:#101828;cursor:pointer}
.edpack-smart-search__mobile-trigger:hover,.edpack-smart-search__mobile-trigger:focus-visible{border-color:#98a2b3;background:#f8fafc}
.edpack-smart-search__mobile-trigger:focus-visible,.edpack-smart-search__mobile-close:focus-visible,.edpack-smart-search__ai button:focus-visible{outline:3px solid rgba(214,0,23,.24);outline-offset:2px}
.edpack-smart-search__panel{position:fixed;z-index:100020;width:min(620px,calc(100vw - 28px));max-height:min(70vh,620px);overflow:auto;background:#fff;border:1px solid #e4e7ec;border-radius:14px;box-shadow:0 22px 60px rgba(16,24,40,.18);overscroll-behavior:contain}
.edpack-smart-search__panel-inner{padding:10px}
.edpack-smart-search__group+.edpack-smart-search__group{border-top:1px solid #f0f1f3;margin-top:8px;padding-top:8px}
.edpack-smart-search__group-title{padding:6px 8px 4px;color:#b42318;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.edpack-smart-search__item{display:grid;grid-template-columns:54px minmax(0,1fr);gap:11px;align-items:center;padding:9px 8px;border-radius:10px;text-decoration:none!important;color:#101828!important}
.edpack-smart-search__item:hover,.edpack-smart-search__item:focus-visible,.edpack-smart-search__item.is-active{background:#f8fafc;outline:0}
.edpack-smart-search__thumb{width:54px;height:54px;border-radius:8px;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center}
.edpack-smart-search__thumb img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;padding:3px}
.edpack-smart-search__thumb--empty:before{content:"";width:18px;height:18px;border:2px solid #98a2b3;border-radius:50%}
.edpack-smart-search__copy{min-width:0}
.edpack-smart-search__meta{display:block;color:#667085;font-size:11px;margin-bottom:2px}
.edpack-smart-search__title{display:block;color:#101828;font-size:14px;font-weight:700;line-height:1.3}
.edpack-smart-search__excerpt{display:block;color:#667085;font-size:12px;line-height:1.4;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.edpack-smart-search__state{padding:22px 14px;text-align:center;color:#667085;font-size:13px}
.edpack-smart-search__ai{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;padding:12px;border-top:1px solid #eaecf0;background:#fbfcfd;border-radius:0 0 10px 10px}
.edpack-smart-search__ai span{font-size:12px;color:#475467}
.edpack-smart-search__ai button{border:0;background:#101828;color:#fff;border-radius:8px;min-height:36px;padding:7px 11px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}
.edpack-smart-search__mobile{position:fixed;inset:0;z-index:100030;background:#fff;overflow:hidden}
.edpack-smart-search__mobile-head{display:flex;align-items:center;gap:10px;padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));margin:0;border:0;border-bottom:1px solid #eaecf0;background:#fff;position:sticky;top:0;z-index:2}
.edpack-smart-search__mobile-field{height:48px;flex:1;display:flex;align-items:center;gap:10px;padding:0 13px;border:1px solid #d0d5dd;border-radius:11px;background:#fff}
.edpack-smart-search__mobile-field:focus-within{border-color:#98a2b3;box-shadow:0 0 0 3px rgba(17,24,39,.08)}
.edpack-smart-search__mobile-field input{font-size:16px}
.edpack-smart-search__mobile-close{width:44px;height:44px;min-width:44px;border:0;background:#f2f4f7;border-radius:10px;color:#101828;font-size:26px;line-height:1;cursor:pointer}
.edpack-smart-search__mobile-results{height:calc(100dvh - 73px);overflow:auto;padding:8px max(10px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));overscroll-behavior:contain;background:#fff}
.edpack-smart-search__mobile-results .edpack-smart-search__item{grid-template-columns:58px minmax(0,1fr);padding:10px 6px}
.edpack-smart-search__mobile-results .edpack-smart-search__thumb{width:58px;height:58px}
.edpack-smart-search-open{overflow:hidden!important}
.edpack-smart-search-host{min-width:0}

/* Compact mode is the collision-safe fallback for all unknown header layouts. */
.edpack-smart-search--compact .edpack-smart-search__dock,.edpack-smart-search-host--compact .edpack-smart-search__dock{flex:0 0 44px;min-width:44px;max-width:44px;width:44px;margin-left:auto;margin-right:0}
.edpack-smart-search--compact .edpack-smart-search__desktop,.edpack-smart-search-host--compact .edpack-smart-search__desktop{display:none}
.edpack-smart-search--compact .edpack-smart-search__mobile-trigger,.edpack-smart-search-host--compact .edpack-smart-search__mobile-trigger{display:inline-flex}
.edpack-smart-search--compact .edpack-smart-search__panel{display:none!important}

/*
 * Header, Footer & CTA EdPack integration.
 * The safe 44px slot is the CSS-first default, so navigation stays usable even
 * before Smart Search JS runs. JS expands to an inline field only after it has
 * measured enough real space for brand + menu + search.
 */
.ephf-search-slot.edpack-smart-search-host{display:flex;align-items:center;justify-content:flex-end;min-width:0;max-width:100%}
.ephf-search-slot .edpack-smart-search__dock{margin:0;order:0;width:100%;max-width:100%;min-width:0;flex-basis:auto}
.ephf-search-slot .edpack-smart-search__desktop{max-width:100%}

@media(min-width:1321px){
  /* Header/Footer/CTA owns the parent grid and hit targets. Recommendation only
     sizes its own child control so it cannot cover visible CTA/menu links. */
  body.ephf-active #ephf-site-header .ephf-search-slot{width:auto;min-width:0;max-width:320px;overflow:visible}
  body.ephf-active #ephf-site-header.edpack-smart-search-inline .ephf-search-slot{width:auto;min-width:0;max-width:280px}
  body.ephf-active #ephf-site-header.edpack-smart-search-inline .edpack-smart-search__dock{width:min(280px,100%);min-width:0;max-width:280px;flex:1 1 280px}
}

@media(max-width:1320px){
  .ephf-search-slot .edpack-smart-search__dock{flex:0 0 44px;min-width:44px;max-width:44px;width:44px;margin:0}
  .ephf-search-slot .edpack-smart-search__desktop{display:none}
  .ephf-search-slot .edpack-smart-search__mobile-trigger{display:inline-flex}
}

@media(max-width:782px){
  .edpack-smart-search__dock{flex:0 0 44px;min-width:44px;max-width:44px;margin-left:auto;margin-right:0}
  .edpack-smart-search__desktop{display:none}
  .edpack-smart-search__mobile-trigger{display:inline-flex}
  .edpack-smart-search__panel{display:none!important}
  .ephf-search-slot{flex:0 0 44px;width:44px}
  .ephf-search-slot .edpack-smart-search__dock{margin:0!important}
}

/* On desktop, a compact-search click opens a centered dialog instead of a full white takeover. */
@media(min-width:783px){
  .edpack-smart-search--compact .edpack-smart-search__mobile{padding:clamp(74px,10vh,120px) 18px 24px;background:rgba(15,23,42,.58);overflow:auto}
  .edpack-smart-search--compact .edpack-smart-search__mobile-head{position:relative;top:auto;max-width:720px;margin:0 auto;border:1px solid #e4e7ec;border-bottom:0;border-radius:16px 16px 0 0;box-shadow:0 24px 70px rgba(15,23,42,.22)}
  .edpack-smart-search--compact .edpack-smart-search__mobile-results{max-width:720px;height:min(68vh,640px);margin:0 auto;border:1px solid #e4e7ec;border-top:0;border-radius:0 0 16px 16px;box-shadow:0 24px 70px rgba(15,23,42,.22)}
}

@media(prefers-reduced-motion:reduce){
  .edpack-smart-search__desktop{transition:none}
}

/* v1.1.11 coordinated layers + keyboard focus. Header: 100000/100001; privacy UI stays above search. */
.edpack-smart-search__trigger:focus-visible,.edpack-smart-search__close:focus-visible,.edpack-smart-search a:focus-visible,.edpack-smart-search button:focus-visible,.edpack-smart-search input:focus-visible{outline:3px solid currentColor;outline-offset:2px}
