/* IA Sem Código: 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);
  }
  /* coluna da chamada: cabeçalho do canal + chamada dividem a altura da tela.
     (antes a chamada tinha 100% da altura MAIS o cabeçalho e os botões de baixo saíam da tela) */
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="ChannelIndexPage.module__voiceActiveHeaderWrapper"] {
    height: 100% !important; display: flex !important; flex-direction: column !important; min-height: 0 !important; overflow: hidden;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="ChannelIndexPage.module__compactCallWrapper"] {
    flex: 1 1 auto !important; height: auto !important; min-height: 0 !important;
  }
  [class*="ChannelIndexPage.module__channelGridVoiceCallActive"]:not([class*="channelGridVoiceCallExpanded"]) [class*="CompactVoiceCallView.module__container"] {
    flex: 1 1 auto !important; 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: #00FF6A; }
  .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(0, 255, 106, .16); color: #00FF6A;
  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;
}

/* IA Sem Código: cor da marca em destaques do Fluxer (verde, tema principal). */
:root { --brand-primary: #00FF6A; --brand-primary-light: #00FF6A; --brand-secondary: #00C853; }

/* IA Sem Código: aviso e player da aula ao vivo dentro da comunidade */
.bl-live-pill { position: fixed; right: 18px; bottom: 84px; z-index: 9000; display: inline-flex; align-items: center; gap: 10px; max-width: min(460px, calc(100vw - 36px));
  padding: 10px 12px 10px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: #07130B; color: #E3F5E9; font: 600 13px/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif;
  cursor: pointer; box-shadow: 0 14px 40px rgba(0,0,0,.55); transition: transform .2s; }
.bl-live-pill:hover { transform: translateY(-2px); }
.bl-live-pill:focus-visible { outline: 2px solid #00FF6A; outline-offset: 2px; }
.bl-live-pill b { letter-spacing: .06em; white-space: nowrap; }
.bl-live-pill.on-air b { color: #FF6B6F; }
.bl-live-pill .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: #B9D6C3; }
.bl-live-pill .go { margin-left: 4px; padding: 7px 12px; border-radius: 9px; background: #00FF6A; color: #021A0B; white-space: nowrap; }
.bl-live-pill .dot, .bl-live-panel .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #E5484D; animation: bl-live-blink 1.4s infinite; }
.bl-live-pill .dot.wait { background: #00FF6A; animation: none; }
@keyframes bl-live-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .bl-live-pill .dot, .bl-live-panel .dot { animation: none; } }

.bl-live-panel { position: fixed; z-index: 9001; inset: 4vh 4vw; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #020604;
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 90px rgba(0,0,0,.75); transition: inset .25s ease, width .25s ease, height .25s ease; }
.bl-live-panel.mini { inset: auto 18px 84px auto; width: min(420px, calc(100vw - 36px)); height: 300px; }
.bl-live-head { flex: none; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 14px; background: #0A1A10; border-bottom: 1px solid rgba(255,255,255,.08); color: #E3F5E9; font: 600 14px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; cursor: default; user-select: none; }
.bl-live-head .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-live-head button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #8FB39C; font-size: 20px; line-height: 1; cursor: pointer; }
.bl-live-head button:hover { background: rgba(255,255,255,.08); color: #fff; }
.bl-live-head button:focus-visible { outline: 2px solid #00FF6A; }
.bl-live-panel iframe { flex: 1; width: 100%; border: 0; background: #000; }
