/* Trading MMA: voice channel with the stream on the left and the chat on the right (desktop only). */
@media (min-width: 900px) {
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) {
    grid-template-columns: minmax(360px, 1fr) var(--tmma-chat-w, 420px) !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) > [data-flx="channel.channel-view.channel-view-scaffold.div"] {
    grid-column: 1 !important; grid-row: 1 !important;
    height: 100% !important; min-height: 0 !important; min-width: 0 !important;
    display: flex !important; flex-direction: column !important;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) [data-flx="channel.channel-view.guild-channel-view.voice-active-header-wrapper"] {
    flex: 1 1 auto !important; height: 100% !important; min-height: 0 !important;
    display: flex !important; flex-direction: column !important;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) [data-flx="channel.channel-view.channel-compact-call-surface.compact-call-wrapper"] {
    flex: 1 1 auto !important; height: 100% !important; min-height: 0 !important;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) section[data-voice-call-root] {
    flex: 1 1 auto !important; height: 100% !important; max-height: none !important; min-height: 0 !important;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) > [data-flx="channel.channel-view.channel-view-scaffold.content-grid"] {
    grid-column: 2 !important; grid-row: 1 !important;
    height: 100% !important; min-height: 0 !important; min-width: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }
  /* the built-in top/bottom resizer and the "hide chat" pill make no sense side by side */
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) [class*="CompactVoiceCallView.module__resizeHandle"],
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:has(section[data-voice-call-root]) [class*="CompactVoiceCallView.module__heightToggleButtonWrap"] {
    display: none !important;
  }
  body.tmma-vsplit-dragging, body.tmma-vsplit-dragging * { cursor: col-resize !important; user-select: none !important; }
  body.tmma-vsplit-dragging iframe, body.tmma-vsplit-dragging video { pointer-events: none !important; }
}
.tmma-vsplit {
  position: fixed; z-index: 50; width: 12px; margin-left: -6px; cursor: col-resize;
  display: none; touch-action: none;
}
.tmma-vsplit::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 5px; width: 2px;
  background: transparent; transition: background .15s;
}
.tmma-vsplit::after {
  content: ""; position: absolute; top: 50%; left: 3px; width: 6px; height: 44px; margin-top: -22px;
  border-radius: 3px; background: rgba(255, 255, 255, 0.28); transition: background .15s;
}
.tmma-vsplit:hover::before, .tmma-vsplit.active::before { background: #ee3338; }
.tmma-vsplit:hover::after, .tmma-vsplit.active::after { background: #ee3338; }

/* participant count next to the voice channel name */
[data-flx="app.channel-item-content.channel-name"][data-tmma-count]::after {
  content: attr(data-tmma-count);
  display: inline-block; margin-left: 6px; padding: 0 6px; min-width: 18px; box-sizing: border-box;
  height: 16px; line-height: 16px; border-radius: 8px; vertical-align: 1px;
  font-size: 11px; font-weight: 700; text-align: center;
  color: #4ade80; background: rgba(34, 197, 94, 0.14);
}
