/* Marrakech By Night — Guide filter arrangement V2 (desktop and phone).
   Left of fixed logo: name search above Alcohol.
   Right of fixed logo: Open followed by Near me.
   All other Guides and filter rows remain unchanged. */
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-right-switches{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) - 27px)!important;
  left:calc(100vw - (100vw - var(--fixed-logo-size)) / 4)!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  margin:0!important;
  z-index:90!important;
  width:max-content;
  max-width:calc((100vw - var(--fixed-logo-size)) / 2 - 12px);
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:clamp(4px,.65vw,10px)!important;
  overflow:visible!important;
  box-sizing:border-box;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-right-switches > .home-guide-option-switch:has([data-guide-open-now]){
  position:static!important;
  left:auto!important;
  top:auto!important;
  right:auto!important;
  transform:none!important;
  grid-column:auto!important;
  justify-self:auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  flex:0 0 auto!important;
  margin:0!important;
  white-space:nowrap;
  z-index:auto!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-right-switches .bn-nearby{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  flex-flow:row nowrap!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  gap:3px!important;
  z-index:90!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-right-switches .bn-nearby .home-guide-option-switch{
  position:static!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  transform:none!important;
  grid-column:auto!important;
  justify-self:auto!important;
  justify-content:center!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  flex:0 0 auto!important;
  white-space:nowrap;
  margin:0!important;
  padding:0!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-right-switches .bn-nearby-panel{
  position:absolute!important;
  top:calc(100% + 9px)!important;
  right:0!important;
  left:auto!important;
  transform:none!important;
  width:min(345px,calc(100vw - 20px))!important;
  z-index:150!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-name-search{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) - 64px)!important;
  left:calc((100vw - var(--fixed-logo-size)) / 4)!important;
  right:auto!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  align-items:center!important;
  gap:6px;
  height:29px;
  width:min(232px,calc((100vw - var(--fixed-logo-size)) / 2 - 22px));
  min-width:0;
  max-width:calc((100vw - var(--fixed-logo-size)) / 2 - 12px);
  box-sizing:border-box;
  padding:0 6px 0 10px;
  margin:0!important;
  border:1px solid rgba(230,226,220,.29);
  border-radius:9px;
  background:rgba(17,18,22,.82);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.06);
  color:#f9f9f9;
  z-index:89!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-name-search:focus-within{
  border-color:rgba(239,204,116,.76);
  box-shadow:0 0 0 2px rgba(239,204,116,.15);
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-name-search input{
  flex:1 1 auto;
  min-width:0;
  width:100%;
  height:100%;
  outline:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  appearance:none;
  -webkit-appearance:none;
  color:#f7f7f7;
  font:500 11px/1.1 "DM Sans",system-ui,sans-serif;
  letter-spacing:0;
  text-overflow:ellipsis;
  padding:0;
  margin:0;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-name-search input::placeholder{
  color:rgba(242,243,245,.66);
  opacity:1;
}
.bn-guide-search-icon{
  display:block;
  flex:0 0 11px;
  width:11px;
  height:11px;
  border:1.5px solid rgba(245,245,246,.77);
  border-radius:50%;
  position:relative;
}
.bn-guide-search-icon::after{
  content:"";
  position:absolute;
  width:5px;
  height:1.5px;
  right:-3px;
  bottom:-2px;
  border-radius:1px;
  background:rgba(245,245,246,.77);
  transform:rotate(45deg);
  transform-origin:center;
}
.bn-guide-search-visually-hidden{
  position:absolute!important;
  width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;border:0!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-name-search [data-guide-name-clear]{
  min-height:20px!important;
  height:20px!important;
  padding:0 5px!important;
  margin:0!important;
  border:0!important;
  border-radius:5px!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  font:500 16px/1 system-ui,sans-serif!important;
  flex:0 0 auto!important;
  cursor:pointer;
}
.bn-guide-name-search [hidden]{display:none!important}
@media(max-width:760px){
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-name-search{
    top:calc(var(--fixed-logo-size) - 62px)!important;
    height:27px!important;
    width:calc((100vw - var(--fixed-logo-size)) / 2 - 12px)!important;
    padding:0 5px 0 7px!important;
    gap:5px!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-name-search input{
    font-size:clamp(9px,2.5vw,10px)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches{
    width:calc((100vw - var(--fixed-logo-size)) / 2 - 8px)!important;
    max-width:calc((100vw - var(--fixed-logo-size)) / 2 - 8px)!important;
    gap:3px!important;
    justify-content:flex-end!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches > .home-guide-option-switch:has([data-guide-open-now]){
    flex:0 0 auto!important;
    width:auto!important;
    max-width:47%!important;
    font-size:clamp(8px,2.3vw,10px)!important;
    letter-spacing:0!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches .bn-nearby{
    flex:1 1 auto!important;
    max-width:100%!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches .bn-nearby .home-guide-option-switch{
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    justify-content:flex-start!important;
    font-size:clamp(8px,2.15vw,9.5px)!important;
    letter-spacing:-.015em!important;
    gap:2px!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches .bn-nearby .home-guide-option-switch span{
    min-width:0!important;
    white-space:normal!important;
    line-height:1.06!important;
    text-align:left!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches .bn-nearby .home-guide-option-switch i{
    flex:0 0 auto!important;
  }
}
@media(max-width:365px){
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches{
    gap:2px!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches > .home-guide-option-switch{
    font-size:8px!important;
  }
}


/* V2b: reserve actual non-overlapping vertical space for the logo-side controls.
   No section other than Guide is resized. Its type and sector rows keep their order. */
@media(min-width:1024px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"].home-screen-guide{
   --guide-filter-h:calc(var(--marrakech-filter-height) + 60px)!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-filter-shell{
   height:var(--guide-filter-h)!important;
   min-height:var(--guide-filter-h)!important;
   padding-top:60px!important;
   padding-bottom:0!important;
   grid-template-rows:var(--marrakech-filter-height)!important;
   align-items:center!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-name-search{
   top:calc(var(--fixed-logo-size) - 55px)!important;
   height:26px!important;
   left:auto!important;
   right:calc(50vw + var(--fixed-logo-size) / 2 + 10px)!important;
   transform:none!important;
   width:min(155px,calc((100vw - var(--fixed-logo-size)) / 2 - 18px))!important;
 }
}
@media(max-width:1023px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"].home-screen-guide{
   --guide-filter-h:calc(54.2px + var(--home-guide-sector-row-height) + 46px)!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-filter-shell{
   height:var(--guide-filter-h)!important;
   min-height:var(--guide-filter-h)!important;
   padding-top:39px!important;
   padding-bottom:0!important;
   grid-template-rows:var(--home-guide-sector-row-height) 54.2px!important;
   row-gap:0!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-name-search{
   top:calc(var(--fixed-logo-size) + 5px)!important;
 }
}
@media(max-width:365px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches .bn-nearby .home-guide-option-switch span{
   font-size:0!important;
   line-height:1!important;
   white-space:nowrap!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches .bn-nearby .home-guide-option-switch span::after{
   content:"≤ " attr(data-short-label);
   font-size:8.5px!important;
   font-weight:600;
   white-space:nowrap;
   letter-spacing:-.025em;
 }
}

/* Desktop: Alcohol stays in the left logo band, directly beneath name search,
   even though the actual type filter rows now start beneath the logo. */
@media(min-width:1024px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-option-switch:has([data-guide-alcohol]){
   position:fixed!important;
   top:calc(var(--fixed-logo-size) - 27px)!important;
   left:calc(50vw - var(--fixed-logo-size) / 2 - 87px)!important;
   right:auto!important;
   transform:translateX(-50%)!important;
   margin:0!important;
   z-index:91!important;
 }
}


/* Tablet and small laptop: logo/icon bar is taller than the side-band.
   Place the two side controls immediately underneath it, then the original
   categories and sectors. The phone (<761px) and full desktop remain unchanged. */
@media(min-width:761px) and (max-width:1023px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"].home-screen-guide{
   --guide-filter-h:calc(54.2px + var(--home-guide-sector-row-height) + 96px)!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-filter-shell{
   height:var(--guide-filter-h)!important;
   min-height:var(--guide-filter-h)!important;
   padding-top:89px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-option-switch:has([data-guide-alcohol]){
   position:fixed!important;
   top:calc(var(--fixed-logo-size) + 38px)!important;
   left:calc((100vw - var(--fixed-logo-size)) / 4)!important;
   right:auto!important;
   transform:translateX(-50%)!important;
   margin:0!important;
   z-index:91!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches{
   top:calc(var(--fixed-logo-size) + 38px)!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-name-search{
   top:calc(var(--fixed-logo-size) + 5px)!important;
 }
}
