/* Omni 0.2.58: One uninterrupted panorama across the entire top edge.
   It is painted once on #appShell, not separately on its grid columns,
   so a right-panel resize cannot change the crop or create a seam. */
#appShell:is(.nexo-custom-banner,.nexo-community-header){
  position:relative;
  --nexo-unified-top-height:68px;
}
#appShell:is(.nexo-custom-banner,.nexo-community-header):not(.nexo-video-fullscreen):not(.voice-fullscreen)::before{
  content:"";
  position:absolute;
  z-index:19;
  left:0;
  right:0;
  top:0;
  width:100%;
  height:var(--nexo-unified-top-height);
  box-sizing:border-box;
  border:0;
  background-color:var(--nexo-banner-color,#172534);
  background-image:
    linear-gradient(90deg,rgba(11,15,21,.34),rgba(11,15,21,.38)),
    var(--nexo-banner-image,none);
  background-position:center center,center center;
  background-size:100% 100%,cover;
  background-repeat:no-repeat;
  box-shadow:inset 0 -1px rgba(255,255,255,.10);
  pointer-events:none;
}
#appShell.nexo-community-header:not(.nexo-custom-banner):not(.nexo-video-fullscreen):not(.voice-fullscreen)::before{
  background-color:#263955;
  background-image:
    linear-gradient(90deg,rgba(8,13,25,.47),rgba(8,13,25,.47)),
    var(--nexo-community-header-photo,none);
}
/* Old duplicated image layers in nav and floating channel header caused the
   diagonal image to restart at the 1st and 2nd column boundaries. */
#appShell:is(.nexo-custom-banner,.nexo-community-header) > .global-navigation,
#appShell:is(.nexo-custom-banner,.nexo-community-header) > .chat-column > .chat-topbar{
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  border:0 !important;
  border-right:0 !important;
  border-bottom:0 !important;
  box-shadow:none !important;
}
#appShell:is(.nexo-custom-banner,.nexo-community-header) > .global-navigation{
  position:relative;
  z-index:22;
}
#appShell:is(.nexo-custom-banner,.nexo-community-header)
 > .chat-column > .chat-topbar{
  z-index:24;
}
/* Let the same full-width header image show under the right panel title.
   The lower portion keeps the user's configured translucent sidebar. */
#appShell#appShell:is(.nexo-custom-banner,.nexo-community-header)
 > .member-sidebar.nexo-right-design:not([hidden]){
  z-index:21;
  position:relative;
  isolation:auto;
  border-left:0 !important;
  box-shadow:none !important;
  background-color:transparent !important;
  background-image:linear-gradient(to bottom,
    transparent 68px,
    rgba(23,23,26,.60) 68px) !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
#appShell:is(.nexo-custom-banner,.nexo-community-header)
 > .member-sidebar.nexo-right-design .nexo-right-heading{
  background:transparent !important;
  background-image:none !important;
}
#appShell:is(.nexo-custom-banner,.nexo-community-header)
 > .member-sidebar.nexo-right-design .nexo-right-scroll{
  position:relative;
  z-index:1;
  backdrop-filter:blur(24px) saturate(115%);
  -webkit-backdrop-filter:blur(24px) saturate(115%);
}
/* When a hidden sidebar is pulled out in a compact window, the resulting
   drawer covers the shared panorama rather than opening underneath it. */
@media(max-width:1150px){
  #appShell#appShell:is(.nexo-custom-banner,.nexo-community-header).mobile-members-open
    > .member-sidebar.nexo-right-design{
    position:absolute !important;
    z-index:85 !important;
    top:0 !important;
    bottom:0 !important;
    right:0 !important;
    height:100% !important;
    max-height:100% !important;
    box-sizing:border-box;
    border-radius:14px 0 0 14px !important;
    background:var(--nexo-sidebar-right-bg,rgba(23,25,29,.92)) !important;
    background-image:none !important;
    backdrop-filter:blur(28px) saturate(122%) !important;
    -webkit-backdrop-filter:blur(28px) saturate(122%) !important;
  }
  #appShell:is(.nexo-custom-banner,.nexo-community-header).mobile-members-open
    > .member-sidebar.nexo-right-design .nexo-right-heading{
    background:linear-gradient(140deg,rgba(255,255,255,.08),transparent) !important;
  }
}
@media(max-width:760px){
  #appShell:is(.nexo-custom-banner,.nexo-community-header){
    --nexo-unified-top-height:60px;
  }
}
/* Fullscreen streaming is free of decorative header artwork. */
#appShell.nexo-video-fullscreen::before,
#appShell.voice-fullscreen::before {
  content:none !important;
  display:none !important;
}

/* Watched streams must keep the sidebar toggle. Override legacy CSS that
   hid the entire topbar (including the only toggle) on video playback. */
#appShell#appShell:not(.nexo-video-fullscreen)
 .chat-column:not(:has(> #homePanel:not([hidden]))):not(:has(> #nexoSocialCenter:not([hidden]))):has(> #voiceStage:not([hidden]) #remoteMedia.has-video)
 > .chat-topbar{
  display:flex !important;
  visibility:visible !important;
  left:auto !important;
  right:clamp(10px,1.5vw,20px) !important;
  top:clamp(112px,12.5vh,129px) !important;
  min-width:0 !important;
  width:max-content !important;
  z-index:42 !important;
  pointer-events:none;
}
#appShell#appShell:not(.nexo-video-fullscreen)
 .chat-column:not(:has(> #homePanel:not([hidden]))):not(:has(> #nexoSocialCenter:not([hidden]))):has(> #voiceStage:not([hidden]) #remoteMedia.has-video)
 > .chat-topbar #membersButton:not([hidden]){
  display:inline-flex !important;
  visibility:visible !important;
  pointer-events:auto !important;
  opacity:1 !important;
}
@media(max-height:660px){
 #appShell#appShell:not(.nexo-video-fullscreen)
 .chat-column:not(:has(> #homePanel:not([hidden]))):not(:has(> #nexoSocialCenter:not([hidden]))):has(> #voiceStage:not([hidden]) #remoteMedia.has-video)
 > .chat-topbar{
   top:clamp(80px,13vh,108px) !important;
 }
}

/* Preserve a customized right sidebar color beneath the full-width header. */
#appShell#appShell.nexo-custom-right:is(.nexo-custom-banner,.nexo-community-header)
 > .member-sidebar.nexo-right-design:not([hidden]):not(:where(.nexo-ignored)){
 background-image:linear-gradient(to bottom,
   transparent 68px,
   var(--nexo-sidebar-right-bg,rgba(23,23,26,.60)) 68px) !important;
}
@media(max-width:760px){
 #appShell#appShell:is(.nexo-custom-banner,.nexo-community-header)
 > .member-sidebar.nexo-right-design:not([hidden]){
  background-image:linear-gradient(to bottom,
    transparent 60px,rgba(23,23,26,.60) 60px) !important;
 }
}

@media(max-width:1150px){
 #appShell#appShell.mobile-members-open:is(.nexo-custom-banner,.nexo-community-header)
 > .member-sidebar.nexo-right-design:not([hidden]){
  top:0 !important;
  background:var(--nexo-sidebar-right-bg,rgba(23,25,29,.94)) !important;
  background-image:none !important;
  backdrop-filter:blur(28px) saturate(120%) !important;
  -webkit-backdrop-filter:blur(28px) saturate(120%) !important;
 }
}

/* A shared video player must follow the source's own aspect ratio.
   Previous 160-670px fixed heights left large empty black rectangles. */
#appShell:not(.nexo-video-fullscreen) #voiceStage:not([hidden])
 .remote-media.has-video:not([data-watched-count="0"]):not([data-watched-count="1"])
 > .remote-tile:is(.is-stream-primary,.is-stream-secondary,.is-stream-equal).is-stream-watching {
  height:var(--nexo-tile-fit-height,auto) !important;
  min-height:0 !important;
  max-height:100% !important;
  overflow:hidden;
}
#appShell:not(.nexo-video-fullscreen) #voiceStage:not([hidden])
 .remote-media.has-video:not([data-watched-count="0"]):not([data-watched-count="1"])
 > .remote-tile:is(.is-stream-primary,.is-stream-secondary,.is-stream-equal).is-stream-watching video{
  display:block !important;
  flex:1 1 100% !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center !important;
}
