/* Omni Beta 0.2.45 - Open Design floating controls, not a full-width bottom strip.
 * Media, messages, controls, overlays and application handlers are unchanged.
 * The scene extends to the bottom behind a separate liquid-glass island. */
#appShell .chat-column {
  position:relative;
}

/* The message history fills the column; leave safe scrolling space for the
   last message rather than cutting the conversation at the old footer. */
#appShell .chat-column > #conversation:not([hidden]) {
  flex:1 1 0% !important;
  padding-bottom:110px !important;
  scroll-padding-bottom:110px;
}

/* The old composer wrapper must not make a full-width 88px strip or a
   dividing line. Only the smaller inner card owns the glass surface. */
#appShell .chat-column > .composer-wrap:not([hidden]) {
  box-sizing:border-box !important;
  position:absolute !important;
  inset:auto clamp(12px,2vw,24px) 15px !important;
  display:flex;
  flex:0 0 auto !important;
  width:auto !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  z-index:18;
  pointer-events:none;
}
#appShell .chat-column > .composer-wrap:not([hidden]) > * {
  pointer-events:auto;
}
#appShell .chat-column > .composer-wrap:not([hidden]) .composer {
  box-sizing:border-box;
  width:100%;
  min-height:59px;
  padding:8px 10px;
  border:1px solid rgba(229,246,242,.32) !important;
  border-radius:17px !important;
  background:
    radial-gradient(ellipse 55% 180% at 8% -100%,rgba(250,255,252,.14),transparent 78%),
    linear-gradient(110deg,rgba(151,177,171,.19),rgba(48,61,66,.18)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.19),0 16px 38px rgba(0,0,0,.19) !important;
  backdrop-filter:blur(26px) saturate(126%);
  -webkit-backdrop-filter:blur(26px) saturate(126%);
}
#appShell .chat-column > .composer-wrap:not([hidden]) .composer:focus-within {
  border-color:rgba(228,255,244,.62) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.24),0 14px 38px rgba(0,0,0,.20),0 0 0 1px rgba(223,255,240,.15) !important;
}
/* Respect the user's chosen panel opacity, not their Mini Central image. */
html[data-nexo-personalized="1"] #appShell .chat-column > .composer-wrap:not([hidden]) .composer {
  background:var(--nexo-surface-bg,rgba(69,93,91,.15)) !important;
}
#appShell .chat-column > .composer-wrap:not([hidden]) .reply-banner:not([hidden]) {
  border:1px solid rgba(222,249,238,.28);
  background:rgba(43,60,62,.55);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-radius:12px 12px 0 0;
  box-shadow:0 5px 22px rgba(0,0,0,.18);
}
#appShell .chat-column > .screen-preview:not([hidden]) {
  bottom:96px;
}

/* Voice calls have the SAME free-floating treatment as the chat composer.
   This toolbar is overlaid on the room, not laid out as a final flex row. */
#appShell .chat-column > #voiceStage:not([hidden]) {
  position:relative;
  flex:1 1 0%;
  padding-bottom:0 !important;
  min-height:0;
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  box-sizing:border-box !important;
  position:absolute !important;
  inset:auto clamp(12px,2vw,24px) 16px !important;
  display:flex;
  flex:0 0 auto !important;
  flex-wrap:nowrap !important;
  justify-content:flex-start;
  align-items:center;
  gap:9px !important;
  height:auto !important;
  min-height:63px !important;
  max-height:none !important;
  width:auto !important;
  padding:10px 13px !important;
  margin:0 !important;
  border:1px solid rgba(235,250,243,.32) !important;
  border-radius:17px !important;
  background:
    radial-gradient(ellipse 58% 160% at 7% -90%,rgba(252,255,253,.17),transparent 81%),
    linear-gradient(120deg,rgba(164,187,180,.17),rgba(52,69,70,.18)) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.19),0 14px 40px rgba(0,0,0,.20) !important;
  backdrop-filter:blur(27px) saturate(129%) !important;
  -webkit-backdrop-filter:blur(27px) saturate(129%) !important;
  z-index:20;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls::-webkit-scrollbar{display:none}
html[data-nexo-personalized="1"] #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  background:var(--nexo-surface-bg,rgba(62,86,84,.17)) !important;
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control,
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control-group {
  flex:0 0 auto;
  border:1px solid rgba(235,248,245,.24);
  border-radius:12px;
  color:#ecf5f2;
  background:linear-gradient(143deg,rgba(242,255,249,.115),rgba(109,130,122,.10));
  box-shadow:inset 0 1px rgba(255,255,255,.10);
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control:hover {
  background:rgba(220,241,231,.20);
  border-color:rgba(234,255,247,.45);
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control.is-active {
  color:#b9f4d3;
  border-color:rgba(128,233,173,.45);
  background:rgba(98,172,130,.17);
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control.is-muted {
  color:#ffd1da;
  border-color:rgba(247,125,150,.38);
  background:rgba(169,71,89,.15);
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control-spacer {
  min-width:0;
  flex:1 1 auto;
}
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls #stageLeaveButton {
  flex-shrink:0;
  margin-left:auto;
}
/* Do not interfere with the no-toolbar fullscreen stream mode. */
#appShell.nexo-video-fullscreen #voiceStage .voice-stage-controls {
  display:none !important;
}

/* PRE-WATCH STREAMS: a small broadcast appears IN THE MIDDLE of the room.
   This is not a fullscreen/watched player and must not be placed below a
   giant unused black video frame. The actual stream element is not recreated. */
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"] {
  position:relative !important;
  display:flex !important;
  flex-wrap:wrap !important;
  align-content:center !important;
  justify-content:center !important;
  align-items:center !important;
  gap:14px !important;
  height:100% !important;
  min-height:0;
  padding:16px 14px 18px !important;
  box-sizing:border-box;
}
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"]::before {
  display:none !important;
  content:none !important;
}
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"] > .remote-tile.is-stream-preview {
  box-sizing:border-box;
  order:-4 !important;
  flex:0 0 clamp(190px,22vw,250px) !important;
  width:clamp(190px,22vw,250px) !important;
  height:clamp(126px,16vh,163px) !important;
  min-height:126px !important;
  max-height:163px !important;
  border:1px solid rgba(163,224,231,.53);
  border-radius:16px;
  box-shadow:inset 0 1px rgba(255,255,255,.12),0 12px 38px rgba(0,0,0,.22);
}
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"] > .remote-tile.is-stream-preview .stream-preview-watch {
  visibility:visible;
  pointer-events:auto;
}
/* One preview, regardless of how many other voice members exist, has its
   actual midpoint at the midpoint of the available stage. */
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"][data-preview-count="1"] {
  align-content:flex-end !important;
  justify-content:center !important;
  padding-bottom:108px !important;
}
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"][data-preview-count="1"] > .remote-tile.is-stream-preview {
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  transform:translate(-50%,-50%) !important;
  margin:0 !important;
  z-index:3;
}
/* Multiple unwatched streams remain separate and centered as a group. */
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"]:not([data-preview-count="1"])
 > .remote-tile.is-stream-preview {position:relative}
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"]:not([data-preview-count="1"]):not([data-preview-count="0"])::before {
  display:block !important;
  content:"" !important;
  flex:0 0 100%;
  order:10;
  height:0;
  padding:0;
  margin:-14px 0 0;
}
/* The voice photo cards stay compact and avoid covering the centered stream. */
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"] > .remote-tile.is-voice-participant:not(.has-video) {
  position:relative;
  order:20;
}
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"][data-preview-count="1"] > .remote-tile.is-voice-participant:not(.has-video) {
  flex:0 0 min(112px,23%);
}
/* Floating tools in narrow windows must keep every button accessible. */
@media(max-width:760px){
  #appShell .chat-column > .composer-wrap:not([hidden]) {
    left:10px !important;
    right:10px !important;
    bottom:11px !important;
  }
  #appShell .chat-column > .composer-wrap:not([hidden]) .composer {min-height:52px}
  #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
    left:9px !important;
    right:9px !important;
    bottom:11px !important;
    min-height:54px !important;
    padding:7px 9px !important;
    gap:5px !important;
  }
  #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control {
    padding-inline:7px;
  }
  #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls .stage-control-spacer {
    flex:0 0 1px;
  }
  #appShell #voiceStage .remote-media.has-video[data-watched-count="0"][data-preview-count="1"]{
    padding-bottom:85px !important;
  }
}
html[data-nexo-theme="light"] #appShell .chat-column > .composer-wrap:not([hidden]) .composer,
html[data-nexo-theme="light"] #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  color:#284648;
  background:rgba(246,253,249,.18) !important;
  border-color:rgba(81,133,124,.42) !important;
}
html[data-nexo-theme="light"][data-nexo-personalized="1"] #appShell .chat-column > .composer-wrap:not([hidden]) .composer,
html[data-nexo-theme="light"][data-nexo-personalized="1"] #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  background:var(--nexo-surface-bg,rgba(246,253,249,.18)) !important;
}


/* WATCHED STREAM: fit to the actual video aspect ratio and center equally
   between the top and bottom of its available room. The previous player
   height:100% override created a large black band under shorter screens. */
#appShell:not(.nexo-video-fullscreen) #voiceStage
 .remote-media.has-video[data-watched-count="1"] {
  align-content:center !important;
  align-items:center !important;
  justify-content:center !important;
  padding:12px 14px !important;
  gap:12px !important;
  overflow-y:auto;
}
#appShell:not(.nexo-video-fullscreen) #voiceStage
 .remote-media.has-video[data-watched-count="1"]
 > .remote-tile:is(.is-stream-primary,.is-stream-equal) {
  box-sizing:border-box !important;
  flex:0 0 var(--nexo-fit-width, 100%) !important;
  width:var(--nexo-fit-width, 100%) !important;
  height:var(--nexo-fit-height, auto) !important;
  min-height:0 !important;
  max-height:calc(100% - 16px) !important;
  margin:0 !important;
  align-self:center;
  justify-self:center;
  border-radius:14px;
  overflow:hidden;
}
#appShell:not(.nexo-video-fullscreen) #voiceStage
 .remote-media.has-video[data-watched-count="1"]
 > .remote-tile:is(.is-stream-primary,.is-stream-equal) video {
  display:block !important;
  box-sizing:border-box;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  max-height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
}
#appShell:not(.nexo-video-fullscreen) #voiceStage
 .remote-media.has-video[data-watched-count="1"]:not(:has(> .remote-tile.is-voice-participant:not(.has-video)))::before {
  display:none !important;
  content:none !important;
}
/* If people are talking beside a stream, keep their compact tiles separate
   below the fitted video, without stretching it down into a black band. */
#appShell:not(.nexo-video-fullscreen) #voiceStage
 .remote-media.has-video[data-watched-count="1"]
 > .remote-tile.is-voice-participant:not(.has-video) {
  align-self:center;
}

/* High-specificity override for personalized backgrounds: outer controls are
   ALWAYS transparent. The frosted surfaces belong to the inner card only. */
html[data-nexo-personalized="1"] #appShell .chat-column > .composer-wrap:not([hidden]),
html[data-nexo-theme="light"][data-nexo-personalized="1"] #appShell .chat-column > .composer-wrap:not([hidden]) {
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* Do not reserve a phantom 15px scrollbar gutter on a centered video. */
#appShell #voiceStage .remote-media.has-video[data-watched-count="0"],
#appShell #voiceStage .remote-media.has-video[data-watched-count="1"] {
  scrollbar-gutter:auto !important;
}
