/* Africa.Luxury v1.7.309 — Search Results = same centered Home layout tracks.
   Desktop Home CSS v206 is the source for the public 1440/1920 track,
   1180/1360 search width and safe edge-gutter tokens.
   This sheet only adapts Search Results; it never rewrites Home. */

@media(min-width:700px){
  body.sr-body.alx-inner-public-header-v308 .al-main-header{
    width:100%!important;padding-inline:var(--al-public-edge-gutter,24px)!important;
    box-sizing:border-box!important;
  }
  body.sr-body.alx-inner-public-header-v308 .al-main-header .al-main-header-inner{
    width:100%!important;max-width:var(--al-public-layout-track,1440px)!important;
    margin-inline:auto!important;
  }
}

@media(min-width:900px){
  /* The Home responsive track owns all Search Results desktop boundaries.
     The original v198/v200 rules hard-coded 1340px, so these intentionally
     override them *after* those stylesheets, not through JS sizing. */
  body.sr-body:not(.sr-map-open) .sr-main{
    display:block!important;width:100%!important;max-width:none!important;
    margin:0!important;padding:26px 0 80px!important;box-sizing:border-box!important;
  }
  body.sr-stays:not(.sr-map-open) :is(.sr-stay-topbar,.sr-stay-desktop-quickbar,.sr-layout),
  body.sr-body:not(.sr-stays):not(.sr-map-open) :is(.sr-page-heading,.sr-search-wrap,.sr-quickbar,.sr-layout){
    box-sizing:border-box!important;
    width:min(calc(100% - (2 * var(--al-public-edge-gutter,24px))),var(--al-public-layout-track,1440px))!important;
    max-width:var(--al-public-layout-track,1440px)!important;
    margin-left:auto!important;margin-right:auto!important;
  }

  /* Wide centred Home-style search pill: title remains a separate, flexible
     column and the entire row follows Home content edges. */
  body.sr-stays:not(.sr-map-open) .sr-stay-topbar{
    display:grid!important;
    grid-template-columns:clamp(270px,22%,335px) minmax(0,1fr)!important;
    column-gap:clamp(18px,2.1vw,38px)!important;
    justify-content:space-between!important;align-items:center!important;
    margin-top:0!important;margin-bottom:24px!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-page-heading{
    min-width:0!important;display:block!important;
    margin:0!important;padding:0!important;
  }
  body.sr-body.alx-inner-public-header-v308 .sr-page-heading .sr-back{
    display:none!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-page-copy{padding-top:0!important;min-width:0!important;}
  body.sr-stays:not(.sr-map-open) .sr-page-copy h1{
    font-size:clamp(28px,2.35vw,40px)!important;line-height:1.1!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-search-wrap{
    width:100%!important;max-width:var(--al-public-search-track,1180px)!important;
    min-width:0!important;justify-self:end!important;
    margin:0!important;padding:0!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-search{width:100%!important;}
  body.sr-stays:not(.sr-map-open) .sr-stay-desktop-quickbar{
    margin-top:0!important;margin-bottom:26px!important;
    min-width:0!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-stay-desktop-quickbar .sr-chips{min-width:0!important;}

  /* Match Home's card density inside the remaining space after the sidebar.
     At 1900px+ the 5 across the results column have approximately the same
     card width as Home's 6 across the entire discovery track. */
  body.sr-stays:not(.sr-map-open) .sr-layout{
    display:grid!important;
    grid-template-columns:clamp(265px,21%,312px) minmax(0,1fr)!important;
    align-items:start!important;gap:clamp(18px,1.6vw,28px)!important;
    margin-top:0!important;padding:0!important;
  }
  body.sr-body:not(.sr-map-open) .sr-results{min-width:0!important;width:100%!important;}
  body.sr-stays:not(.sr-map-open) .sr-grid:not(.is-list){
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:18px!important;align-items:stretch!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-grid .sr-card{min-width:0!important;}

  /* Cars and Experiences use the same full Home desktop layout track. */
  body.sr-body:not(.sr-stays):not(.sr-map-open) .sr-page-heading{
    margin-top:0!important;margin-bottom:18px!important;
    display:block!important;
  }
  body.sr-body:not(.sr-stays):not(.sr-map-open) .sr-search-wrap{
    max-width:var(--al-public-search-track,1180px)!important;
    margin-bottom:24px!important;
  }
  body.sr-body:not(.sr-stays):not(.sr-map-open) .sr-quickbar{margin-bottom:26px!important;}
  body.sr-body:not(.sr-stays):not(.sr-map-open) .sr-layout{
    display:grid!important;grid-template-columns:clamp(265px,21%,312px) minmax(0,1fr)!important;
    gap:clamp(18px,1.6vw,28px)!important;
  }
}

@media(min-width:1900px){
  body.sr-stays:not(.sr-map-open) .sr-grid:not(.is-list){
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
}
@media(min-width:1080px) and (max-width:1359px){
  body.sr-stays:not(.sr-map-open) .sr-grid:not(.is-list){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media(min-width:900px) and (max-width:1079px){
  body.sr-stays:not(.sr-map-open) .sr-grid:not(.is-list){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-layout,
  body.sr-body:not(.sr-stays):not(.sr-map-open) .sr-layout{
    grid-template-columns:245px minmax(0,1fr)!important;gap:18px!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-stay-topbar{
    grid-template-columns:240px minmax(0,1fr)!important;column-gap:18px!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-search{
    grid-template-columns:1fr 1.1fr .8fr 140px!important;
  }
  body.sr-stays:not(.sr-map-open) .sr-search-field{padding-inline:9px!important;gap:7px!important;}
  body.sr-stays:not(.sr-map-open) .sr-search-submit{padding-inline:12px!important;}
}

/* Full-width map mode remains a deliberate exception to the Home's bounded
   content track. Account for the new global header so the map never sits below
   an extra 100vh scroll panel. The existing list/map interaction is untouched. */
@media(min-width:900px){
  body.sr-stays.sr-map-open .sr-main{
    height:calc(100dvh - 76px)!important;
    min-height:0!important;overflow:hidden!important;
  }
  body.sr-stays.sr-map-open .sr-stay-topbar,
  body.sr-stays.sr-map-open .sr-stay-desktop-quickbar{
    width:min(calc(100% - (2 * var(--al-public-edge-gutter,24px))),var(--al-public-layout-track,1440px))!important;
    max-width:var(--al-public-layout-track,1440px)!important;
    margin-left:auto!important;margin-right:auto!important;
  }
  body.sr-stays.sr-map-open .sr-page-heading .sr-back{display:none!important;}
}
@media(max-width:899px){
  /* Search/mobile filters and cards retain their established behaviour. */
  body.sr-body.alx-inner-public-header-v308 .sr-main{padding-top:16px;}
  body.sr-body.alx-inner-public-header-v308 .sr-page-heading .sr-back{display:none!important;}
}
@media(prefers-reduced-motion:reduce){
  body.sr-body .sr-card{scroll-behavior:auto;}
}
