/* Shared By Night header: one line per information face. */
html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions-face[data-header-face="weather"],
html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions .header-sun-times {
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  grid-template:none!important;
  padding:0!important;
}
html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions .header-sun-times > span {
  display:inline-flex!important;
  flex:0 0 auto!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  align-items:center!important;
  flex-direction:row!important;
  white-space:nowrap!important;
}
html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-date-label {
  flex:0 0 auto!important;
  width:auto!important;
  max-width:100%!important;
  white-space:nowrap!important;
  text-wrap:nowrap!important;
  letter-spacing:-.025em!important;
}
html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .language-select-current {display:inline!important}
html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .language-select-short {display:none!important}

@media(max-width:760px) {
  :root:has(>body.marrakech-phase1[data-city-theme][data-home-architecture]) {--fixed-header-height:50px!important}
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-bar {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) var(--fixed-logo-size) minmax(0,1fr)!important;
    grid-template-rows:28px 22px!important;
    height:50px!important;
    min-height:50px!important;
    padding-inline:4px!important;
    gap:0!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions {
    grid-column:1!important;grid-row:1!important;
    width:100%!important;min-width:0!important;
    justify-self:stretch!important;justify-content:center!important;
    translate:none!important;margin:0!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .site-language-switch {
    grid-column:1!important;grid-row:2!important;
    justify-self:center!important;align-self:center!important;
    translate:none!important;margin:0!important;
    height:22px!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .site-language-switch .language-select-button {
    height:22px!important;min-height:22px!important;
    padding:0 6px!important;gap:4px!important;
    font-size:11px!important;white-space:nowrap!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-member-login {
    grid-column:3!important;grid-row:1!important;
    justify-self:center!important;align-self:center!important;
    translate:none!important;margin:0!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .social-links.bn-social-rotate-v1 {
    grid-column:3!important;grid-row:2!important;
    justify-self:center!important;align-self:center!important;
    width:100%!important;max-width:130px!important;
    translate:none!important;margin:0!important;height:22px!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .bn-social-icons-face > a.social {
    height:22px!important;translate:none!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions-rotator {
    width:100%!important;max-width:100%!important;
    height:28px!important;--cube-half:14px!important;
    scale:1!important;translate:none!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions-cube,
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions-face {
    width:100%!important;min-width:0!important;
    height:28px!important;min-height:28px!important;max-height:28px!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions-face[data-header-face="weather"] {gap:3px!important}
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-metric {gap:2px!important;flex:0 0 auto!important}
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header :is(.header-time,.header-temperature) {
    font-size:clamp(11px,3.2vw,14px)!important;line-height:1.1!important;
    min-width:0!important;letter-spacing:-.025em!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-live-dot {
    width:4px!important;height:4px!important;flex:0 0 4px!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions .header-sun-times {
    --solar-icon-size:clamp(11px,3.2vw,15px)!important;gap:4px!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions .header-sun-times > span {gap:2px!important}
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-conditions .header-sun-times b {
    font-size:clamp(10px,2.9vw,13px)!important;line-height:1.1!important;
    letter-spacing:-.035em!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-date-label {
    font-size:clamp(10px,2.95vw,12px)!important;line-height:1.1!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] .marrakech-primary-nav {
    top:50px!important;
    height:calc(var(--fixed-logo-size) - 50px)!important;
    min-height:calc(var(--fixed-logo-size) - 50px)!important;
  }
}
@media(min-width:761px) {
  html body.marrakech-phase1[data-city-theme][data-home-architecture] #siteHeader.site-header .header-date-label {font-size:15.2px!important}
}
@media(min-width:1024px) {
  html body.marrakech-phase1[data-city-theme][data-home-architecture] .marrakech-primary-nav [data-primary-actions] .button:nth-child(-n+2) {
    translate:calc(var(--bynight-second-nav-shift,0px) + 9px) 0!important;
  }
  html body.marrakech-phase1[data-city-theme][data-home-architecture] .marrakech-primary-nav [data-primary-actions] .button:nth-child(n+3) {
    translate:calc(var(--bynight-second-nav-shift,0px) - 9px) 0!important;
  }
}

/* Shared Guide and Agenda: slightly larger filter buttons. */
html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
:is([data-home-section="guide"] .home-guide-filter-types [data-guide-type-filter],
    [data-home-section="events"] .home-events-filter-group--venue [data-event-type-filter]) {
  height:calc(var(--home-filter-button-height) * .954)!important;
  min-height:calc(var(--home-filter-button-height) * .954)!important;
  font-size:calc(var(--home-filter-font-size) * 1.166)!important;
  padding-inline:calc(var(--home-filter-padding-inline) * .954)!important;
}

@media (max-width:760px) {
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing) {
    --bn-utility-side-width:calc((100vw - var(--fixed-logo-size)) / 2 - 8px);
    --bn-utility-alcohol-width:clamp(43px,13.6vw,54px);
    --bn-utility-top:calc(var(--fixed-logo-size) + 2px);
  }

  /* Both pairs use the full side bands, with equal 4px edge/logo clearances. */
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-name-search,
      [data-home-section="events"] .bn-event-name-search) {
    position:fixed!important;
    top:var(--bn-utility-top)!important;
    left:4px!important;
    right:auto!important;
    translate:none!important;
    transform:none!important;
    width:calc(var(--bn-utility-side-width) - var(--bn-utility-alcohol-width) - 4px)!important;
    max-width:calc(var(--bn-utility-side-width) - var(--bn-utility-alcohol-width) - 4px)!important;
    min-width:0!important;
    height:23px!important;
    min-height:23px!important;
    padding:0 4px!important;
    gap:3px!important;
    box-sizing:border-box!important;
    margin:0!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-name-search,
      [data-home-section="events"] .bn-event-name-search) input {
    font-size:clamp(9px,2.5vw,10px)!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .home-guide-option-switch:has([data-guide-alcohol]),
      [data-home-section="events"] .bn-event-alcohol) {
    position:fixed!important;
    top:var(--bn-utility-top)!important;
    left:calc((100vw - var(--fixed-logo-size)) / 2 - 4px - var(--bn-utility-alcohol-width))!important;
    right:auto!important;
    translate:none!important;
    transform:none!important;
    width:var(--bn-utility-alcohol-width)!important;
    max-width:var(--bn-utility-alcohol-width)!important;
    min-width:0!important;
    height:23px!important;
    min-height:23px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    padding:0!important;
    margin:0!important;
    gap:3px!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-right-switches,
      [data-home-section="events"] .bn-event-right-switches) {
    position:fixed!important;
    top:var(--bn-utility-top)!important;
    left:calc((100vw + var(--fixed-logo-size)) / 2 + 4px)!important;
    right:auto!important;
    translate:none!important;
    transform:none!important;
    width:var(--bn-utility-side-width)!important;
    max-width:var(--bn-utility-side-width)!important;
    min-width:0!important;
    height:23px!important;
    min-height:23px!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    padding:0!important;
    margin:0!important;
    gap:3px!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-right-switches,
      [data-home-section="events"] .bn-event-right-switches) > label,
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-right-switches,
      [data-home-section="events"] .bn-event-right-switches) .bn-nearby > label {
    position:static!important;
    inset:auto!important;
    translate:none!important;
    transform:none!important;
    display:inline-flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:23px!important;
    min-height:23px!important;
    padding:0!important;
    margin:0!important;
    gap:3px!important;
    white-space:nowrap!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-right-switches,
      [data-home-section="events"] .bn-event-right-switches) .bn-nearby {
    position:relative!important;
    display:flex!important;
    flex:0 0 auto!important;
    align-items:center!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    padding:0!important;
    margin:0!important;
    gap:2px!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is(.bn-guide-right-switches,.bn-event-right-switches) .bn-nearby-settings {
    position:absolute!important;right:0!important;top:calc(100% + 3px)!important;
    width:23px!important;height:23px!important;min-height:23px!important;padding:0!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is(.bn-guide-right-switches,.bn-event-right-switches) .bn-nearby-panel {top:calc(100% + 30px)!important}
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"], [data-home-section="events"]) .home-guide-option-switch {
    box-sizing:border-box!important;
    font-size:clamp(8px,2.4vw,10px)!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"], [data-home-section="events"]) .home-guide-option-switch span {
    font-size:inherit!important;
    line-height:1.05!important;
    white-space:nowrap!important;
    letter-spacing:0!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"], [data-home-section="events"]) .home-guide-option-switch i {
    width:16px!important;
    min-width:16px!important;
    height:12px!important;
    flex:0 0 16px!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"], [data-home-section="events"]) .home-guide-option-switch i::after {
    width:8px!important;
    height:8px!important;
    top:2px!important;
    left:2px!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"], [data-home-section="events"]) .home-guide-option-switch input:checked + i::after {
    left:6px!important;
  }

  /* Reserve the utility line below navigation, above the first filter row. */
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  [data-home-section="guide"].home-screen-guide {
    --guide-filter-h:calc(54.2px + var(--home-guide-sector-row-height) + 38px)!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-filter-shell {
    padding-top:31px!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  [data-home-section="events"].home-screen-events {
    --events-filter-h:103px!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  [data-home-section="events"] .home-events-filter-row {
    padding-top:40px!important;
  }

  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .home-guide-filter-areas [data-guide-area-filter],
      [data-home-section="events"] .home-events-filter-group--date [data-event-date-filter]) {
    height:calc(var(--home-filter-button-height) * 1.2243)!important;
    min-height:calc(var(--home-filter-button-height) * 1.2243)!important;
    font-size:calc(var(--home-filter-font-size) * 1.2243)!important;
    padding-inline:calc(var(--home-filter-padding-inline) * 1.166 + 1.378px)!important;
  }
}

@media(max-width:359px) {
  html body.marrakech-phase1[data-city-theme][data-home-architecture="v1"]:has(.bynight-home-landing)
  :is(.bn-guide-right-switches,.bn-event-right-switches) {gap:1px!important}
  html body.marrakech-phase1[data-city-theme][data-home-architecture="v1"]:has(.bynight-home-landing)
  :is(.bn-guide-right-switches,.bn-event-right-switches) .home-guide-option-switch {gap:1px!important}
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is(.bn-guide-right-switches,.bn-event-right-switches) .home-guide-option-switch i {
    width:12px!important;min-width:12px!important;flex-basis:12px!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is(.bn-guide-right-switches,.bn-event-right-switches) .home-guide-option-switch i::after {width:7px!important;height:7px!important;left:1px!important}
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is(.bn-guide-right-switches,.bn-event-right-switches) .home-guide-option-switch input:checked + i::after {left:4px!important}
}

@media (max-width:479px) {
  /* The full accessible nearby label stays on the control; its short visible
     distance leaves room for both switches on narrow phones. */
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-right-switches,
      [data-home-section="events"] .bn-event-right-switches) .bn-nearby > label span {
    font-size:0!important;
  }
  html body.marrakech-phase1[data-home-architecture="v1"]:has(.bynight-home-landing)
  :is([data-home-section="guide"] .bn-guide-right-switches,
      [data-home-section="events"] .bn-event-right-switches) .bn-nearby > label span::after {
    content:"≤ " attr(data-short-label);
    font-size:clamp(8px,2.4vw,10px)!important;
    font-weight:600!important;
    white-space:nowrap!important;
  }
}
