/* HOOKAGIG compact country search / original V9G visual geometry / 2026-10-21
   Contains only new country selector styling. Does not restyle existing Home form. */
#home > .home-search-card{position:relative!important;overflow:visible!important}
#home .hg-country-filter{position:absolute;z-index:30;top:15px;right:20px;width:auto;max-width:calc(100% - 310px);min-height:36px;display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:10px;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
#home .hg-country-filter>label{flex:0 0 auto;display:inline-block!important;max-width:150px;margin:0!important;font-size:10px;line-height:1.2;letter-spacing:.045em;text-transform:uppercase;color:#a9bdc8;font-weight:800;white-space:nowrap}
#home .hg-country-selection-row{display:flex;align-items:center;gap:7px;min-height:34px;min-width:0;max-width:340px;padding:0;border:0;background:none;box-shadow:none}
#home .hg-country-selected{display:inline-flex;align-items:center;justify-content:center;max-width:160px;min-height:34px;min-width:0;padding:6px 11px;box-sizing:border-box;border:1px solid rgba(105,151,180,.42);border-radius:999px;background:#112536;color:#dfedf3;font-size:11px;font-weight:750;line-height:1.1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#home #hgCountryDetails{position:relative;flex:0 0 auto;min-width:0;margin:0;z-index:50}
#home #hgCountrySummary{display:flex;align-items:center;gap:5px;min-height:34px;min-width:0;box-sizing:border-box;list-style:none;padding:7px 12px!important;border:1px solid rgba(100,148,174,.48)!important;border-radius:999px!important;background:rgba(12,25,36,.85)!important;color:#b5d2e4!important;font-size:11px!important;font-weight:750!important;white-space:nowrap;cursor:pointer}
#home #hgCountrySummary::-webkit-details-marker{display:none}
#home #hgCountrySummary::after{content:'⌄';margin-left:2px;opacity:.85;font-size:13px}
#home .hg-country-menu{position:absolute;z-index:1000;top:calc(100% + 8px);right:0;left:auto;width:290px;max-width:calc(100vw - 34px);box-sizing:border-box;max-height:320px;margin:0!important;padding:10px!important;border-radius:13px!important;border:1px solid rgba(85,123,149,.65)!important;background:#102231!important;box-shadow:0 18px 45px rgba(0,0,0,.68)!important;color:#e5f0f6!important}
#home #hgCountryFind{height:35px;min-height:35px;width:100%;box-sizing:border-box;margin:0 0 7px!important;padding:6px 10px!important;background:#182d3e!important;border:1px solid #42617b!important;border-radius:9px!important;color:#f3f8fc!important;font-size:12px}
#home .hg-country-actions{display:flex;gap:5px;flex-wrap:nowrap;margin:0 0 7px!important}
#home .hg-country-actions button{flex:1 1 0;border:1px solid rgba(99,148,178,.45);border-radius:8px;padding:6px 6px;background:rgba(32,62,82,.7);color:#d9edf8;font-size:11px;line-height:1.25;white-space:nowrap;cursor:pointer}
#home .hg-country-actions button:hover,#home .hg-country-options label:hover{background:rgba(74,128,160,.24)}
#home .hg-country-options{display:block;max-height:160px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#526f84 #142738}
#home .hg-country-options label{display:flex!important;align-items:center;gap:10px;width:100%;box-sizing:border-box;margin:0!important;padding:7px 8px!important;border-radius:8px;color:#dfedf6;font-size:12px;font-weight:550;letter-spacing:0;text-transform:none;cursor:pointer}
#home .hg-country-options input[type=checkbox]{width:15px;height:15px;min-height:15px;margin:0;padding:0;flex:0 0 auto;accent-color:#94e521}
#home #hgCountryInfo{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;margin:-1px!important;padding:0!important;border:0!important}
#home #hgCountryFilter:focus-within{z-index:80}
@media(max-width:860px){
  #home .hg-country-filter{position:relative;top:auto;right:auto;width:100%;max-width:100%;box-sizing:border-box;min-height:34px;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:7px 10px;margin:0 0 10px!important;padding:0!important}
  #home .hg-country-filter>label{max-width:none;flex:0 0 auto;font-size:10px}
  #home .hg-country-selection-row{max-width:100%;flex-wrap:wrap;min-height:32px}
  #home .hg-country-selected{max-width:140px;min-height:33px;padding:6px 9px}
  #home #hgCountrySummary{min-height:33px;padding:6px 9px!important}
  #home .hg-country-menu{right:0;max-height:300px;width:285px}
}
@media(max-width:520px){
  #home .hg-country-filter{gap:6px 8px;margin-bottom:10px!important}
  #home .hg-country-filter>label{width:100%;font-size:10px}
  #home .hg-country-menu{right:auto!important;left:-85px!important}
}
/* 2026-10-21: constrain the dropdown's internal list to the visible popup.
   The older #hgCountryFilter rules at the end of index.html would otherwise
   force a 230px grid after the compact CSS's 160px list and cause the entries
   to spill past the popup boundary on desktop and mobile. */
#home #hgCountryFilter .hg-country-menu{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
  max-height:min(320px, calc(100dvh - 28px))!important;
}
#home #hgCountryFilter .hg-country-options{
  display:block!important;
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:160px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
@media(max-width:860px){
  #home #hgCountryFilter .hg-country-menu{max-height:min(300px, calc(100dvh - 28px))!important}
}

/* MOBILE SCROLL LAYER FIX: sticky header masks scrolling country filter.
   No geometry, search, or dropdown behavior changes. */
@media (max-width:700px){
  body .topbar{z-index:200!important;background:#090d10!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
}
