/* Bora Lucrar: ajustes visuais da Comunidade (Fluxer), injetados pelo Nginx em todas as páginas. */

/* Canal de voz com transmissão: vídeo à esquerda e chat à direita (só em telas largas). */
@media (min-width: 1000px) {
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) {
    grid-template-rows: minmax(0, 1fr) !important;
    grid-template-columns: minmax(0, 1fr) var(--bl-chat-w, clamp(320px, 28vw, 460px)) !important;
    position: relative;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) > :first-child {
    grid-row: 1; grid-column: 1; min-height: 0; min-width: 0; height: 100%;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) > [class*="ChannelIndexPage.module__contentGrid"] {
    grid-row: 1; grid-column: 2; min-width: 0; min-height: 0; border-left: 1px solid rgba(255, 255, 255, .08);
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="ChannelIndexPage.module__voiceActiveHeaderWrapper"],
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="ChannelIndexPage.module__compactCallWrapper"] {
    height: 100% !important;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="CompactVoiceCallView.module__container"] {
    height: 100% !important; min-height: 0 !important; max-height: none !important;
  }
  /* a alça de altura (arrastar para cima/baixo) não faz sentido lado a lado */
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="CompactVoiceCallView.module__resizeHandle"],
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="CompactVoiceCallView.module__heightToggle"] {
    display: none !important;
  }

  /* alça de arrastar (criada pelo bl-custom.js) */
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) > .bl-chat-resizer {
    display: block; position: absolute; top: 0; bottom: 0; z-index: 60; width: 10px;
    right: calc(var(--bl-chat-w, clamp(320px, 28vw, 460px)) - 5px); cursor: col-resize; touch-action: none;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"] > .bl-chat-resizer::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: transparent; transition: background .15s;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"] > .bl-chat-resizer:hover::after,
  .bl-resizing [class*="ChannelIndexPage.module__channelGridVoiceCallActive"] > .bl-chat-resizer::after { background: #2FA866; }
  .bl-resizing, .bl-resizing * { cursor: col-resize !important; user-select: none !important; }
  .bl-resizing video, .bl-resizing iframe { pointer-events: none; }
}
.bl-chat-resizer { display: none; }

/* contador de pessoas no canal de voz (criado pelo bl-custom.js) */
.bl-voice-count {
  flex: none; margin-left: 6px; padding: 0 7px; min-width: 22px; height: 18px; line-height: 18px;
  border-radius: 9px; background: rgba(255, 182, 0, .16); color: #2FA866;
  font-size: 11px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
}

/* reacoes-sem-desfoque: o aviso +18 do canal faz o Fluxer borrar os emojis das reações.
   Emojis padrão não são conteúdo sensível, então as reações aparecem normalmente. */
[class*="MessageReactions.module__emoji"][class*="MatureBlur.module__matureBlurred"],
[class*="MessageReactions.module__"] [class*="MatureBlur.module__matureBlurred"] {
  filter: none !important;
}

/* Bora Lucrar: cor da marca em destaques do Fluxer (verde, tema principal). */
:root { --brand-primary: #2FA866; --brand-primary-light: #4FC487; --brand-secondary: #1F8A55; }
