/* Desk Live — controles na faixa MESSAGE do Chat (Steel + Mint)
 * Não mexe no visual do chart / OMS mapper. */

#view-chat .ch-feed-cols.ch-feed-live-row {
  align-items: center;
  display: flex !important;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

#view-chat .ch-feed-live-left {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

#view-chat .ch-feed-cols-title {
  flex: 0 0 auto;
}

#view-chat .ch-live-inline {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
  min-width: 0;
}

/* Icon-rail · LIVE / CONFIG / POP */
#view-chat .ch-live-rail-actions {
  align-items: flex-end;
  display: flex;
  flex-shrink: 0;
  gap: 14px;
}

#view-chat .ch-live-rail-status {
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-shrink: 0;
  gap: 10px;
  min-height: 44px;
  padding-left: 16px;
}

#view-chat .ch-live-ico {
  appearance: none;
  background: transparent;
  border: none;
  color: #56c1d6;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-family: var(--ch-mono, var(--cx-mono, "Bloomberg", "IBM Plex Mono", Consolas, monospace));
}

#view-chat .ch-live-ico__box {
  align-items: center;
  border: 1px solid #56c1d6;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

#view-chat .ch-live-ico__box svg {
  display: block;
  fill: currentColor;
  height: 18px;
  width: 18px;
}

#view-chat .ch-live-ico__lbl {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

#view-chat .ch-live-ico:hover .ch-live-ico__box {
  background: rgba(86, 193, 214, 0.1);
  box-shadow: inset 0 0 0 1px rgba(86, 193, 214, 0.35);
}

#view-chat .ch-live-ico:hover {
  color: #7ad4e4;
}

#view-chat .ch-live-ico--go {
  color: #67E6C9;
}

#view-chat .ch-live-ico--go .ch-live-ico__box {
  border-color: #67E6C9;
}

#view-chat .ch-live-ico--stop {
  color: #E77A7A;
}

#view-chat .ch-live-ico--stop .ch-live-ico__box {
  border-color: #E77A7A;
}

#view-chat .ch-live-ico--stop:hover {
  color: #f09595;
}

/* BRIEF — boletim no slot da TV (nome neutro, sem revelar origem) */
#view-chat .ch-live-ico--brief.is-brief-on {
  color: #E8B44A;
}

#view-chat .ch-live-ico--brief.is-brief-on .ch-live-ico__box {
  border-color: #E8B44A;
  background: rgba(232, 180, 74, 0.12);
  box-shadow: inset 0 0 0 1px rgba(232, 180, 74, 0.35);
}

body.ch-brief-on #view-chat .ch-live-player-slot {
  display: flex;
}

body.ch-brief-on #view-chat .ch-live-dot {
  background: #E8B44A;
  box-shadow: 0 0 0 3px rgba(232, 180, 74, 0.18);
}

body.ch-brief-on #view-chat .ch-live-status {
  color: #E8B44A;
}

#view-chat .ch-brief-yt {
  border: 0;
  display: block;
  /* Escala corta logo / título / share nas bordas do embed */
  height: 115%;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.42);
  transform-origin: center center;
  width: 115%;
  z-index: 2;
}

#view-chat .ch-brief-yt[hidden] {
  display: none !important;
}

/* Blindagem: bloqueia clique + mascara chrome residual do YouTube */
#view-chat .ch-brief-shield {
  background: transparent;
  cursor: default;
  inset: 0;
  position: absolute;
  z-index: 3;
}

#view-chat .ch-brief-shield::before,
#view-chat .ch-brief-shield::after {
  content: '';
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 1;
}

/* Faixa superior — título / canal */
#view-chat .ch-brief-shield::before {
  background: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  height: 18%;
  top: 0;
}

/* Faixa inferior — logo YouTube / share */
#view-chat .ch-brief-shield::after {
  background: linear-gradient(0deg, #000 0%, #000 50%, transparent 100%);
  bottom: 0;
  height: 16%;
}

#view-chat .ch-brief-shield[hidden] {
  display: none !important;
}

#view-chat .ch-live-status {
  color: #9aa8b4;
  font-family: var(--ch-mono, var(--cx-mono, "Bloomberg", "IBM Plex Mono", Consolas, monospace));
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

#view-chat.ch-desk.ch-desk--ledger .ch-live-status {
  font-size: 14px !important;
  letter-spacing: 0.1em;
}

#view-chat .ch-live-viewers {
  color: #67E6C9;
  font-family: var(--ch-mono, var(--cx-mono, "Bloomberg", "IBM Plex Mono", Consolas, monospace));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

#view-chat .ch-live-dot {
  background: #6a7884;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  height: 8px;
  width: 8px;
}

body.ch-live-on #view-chat .ch-live-dot {
  background: #67E6C9;
  box-shadow: 0 0 0 3px rgba(116, 222, 198, 0.18);
}

body.ch-live-on #view-chat .ch-live-status {
  color: #67E6C9;
}

/* Legado / modal footer — outline textual */
#view-chat .ch-live-btn,
.ch-live-settings-modal .ch-live-btn {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(86, 193, 214, 0.45);
  border-radius: 0;
  color: #56c1d6;
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--ch-mono, var(--cx-mono, "Bloomberg", "IBM Plex Mono", Consolas, monospace));
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  text-transform: uppercase;
}

.ch-live-settings-modal .ch-live-btn:hover {
  background: rgba(86, 193, 214, 0.1);
  border-color: #56c1d6;
}

.ch-live-settings-modal .ch-live-btn--go {
  border-color: #67E6C9;
  color: #67E6C9;
}

.ch-live-settings-modal .ch-live-btn--danger {
  border-color: #E05555;
  color: #FF8A8A;
}

.ch-live-settings-modal .ch-live-btn--danger:hover {
  background: rgba(224, 85, 85, 0.12);
  border-color: #FF6B6B;
  color: #FFB0B0;
}

.ch-live-settings-modal .ch-live-btn--warn {
  border-color: #E8B44A;
  color: #E8B44A;
}

.ch-live-settings-modal .ch-live-btn--warn:hover {
  background: rgba(232, 180, 74, 0.12);
}

#ch-brief-settings-modal .ch-brief-settings-state {
  color: #9aa8b4;
  font-size: 18px;
  letter-spacing: 0.08em;
  margin: 10px 0 0;
  text-transform: uppercase;
}

#ch-brief-settings-modal .ch-brief-settings-state.is-on-air {
  color: #E8B44A;
}

#ch-brief-settings-modal .ch-brief-settings-state.is-saved {
  color: #67E6C9;
}

#ch-brief-settings-modal .ch-brief-settings-ft {
  flex-wrap: wrap;
}

#view-chat #ch-live-start {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 5;
}

#view-chat #ch-live-start.is-live-hidden {
  display: none !important;
}

#view-chat .ch-live-ico[hidden],
#view-chat .ch-live-viewers[hidden] {
  display: none !important;
}

/* Player — faixa central (~metade do expand antigo) */
#view-chat .ch-live-player-slot {
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
  flex: 0 0 39%;
  flex-direction: column;
  max-height: 44%;
  min-height: 200px;
  overflow: hidden;
  position: relative;
}

body.ch-live-on #view-chat .ch-live-player-slot,
body.ch-live-preview #view-chat .ch-live-player-slot {
  display: flex;
}

#view-chat .ch-live-video {
  background: #000;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  width: 100%;
}

#view-chat .ch-live-empty {
  align-items: center;
  color: #6a7884;
  display: flex;
  flex: 1;
  font-family: var(--ch-mono, var(--cx-mono, "Bloomberg", "IBM Plex Mono", Consolas, monospace));
  font-size: 12px;
  font-weight: 600;
  justify-content: center;
  letter-spacing: 0.12em;
  padding: 16px;
  text-align: center;
  text-transform: uppercase;
}

#view-chat .ch-live-empty[hidden] {
  display: none !important;
}

#view-chat .ch-live-stub-banner {
  background: rgba(111, 178, 192, 0.08);
  border-top: 1px solid rgba(111, 178, 192, 0.2);
  color: #6fb2c0;
  flex-shrink: 0;
  font-family: var(--ch-mono, var(--cx-mono, "Bloomberg", "IBM Plex Mono", Consolas, monospace));
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  text-transform: uppercase;
}

#view-chat .ch-live-stub-banner[hidden] {
  display: none !important;
}

/* Coach fake removido do DOM — nunca exibir se cache antigo ainda injetar */
#ch-live-coach,
.ch-live-coach,
body.ch-live-coach-open .ch-live-coach {
  display: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#view-chat.ch-desk .ch-main {
  position: relative;
}

/* Pop-out Desk Live — player + controles, sem rail/msgs */
html.imperium-popout-desk-desk-live #chat-overlay-host {
  background: #07090c !important;
  display: block !important;
  inset: 0 !important;
  pointer-events: auto !important;
  position: absolute !important;
  z-index: 220 !important;
}

html.imperium-popout-desk-desk-live #imperium-license-plan-badge {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

html.imperium-popout-desk-desk-live #view-chat,
html.imperium-popout-desk-desk-live #chat-overlay-host #view-chat,
html.imperium-popout-desk-desk-live body.chat-full #view-chat,
html.imperium-popout-desk-desk-live body.chat-full #view-chat.active {
  background: #07090c !important;
  bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  left: 0 !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  pointer-events: auto !important;
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  visibility: visible !important;
  width: 100% !important;
  z-index: 1 !important;
}

html.imperium-popout-desk-desk-live #view-chat .ch-sidebar,
html.imperium-popout-desk-desk-live #view-chat .ch-context,
html.imperium-popout-desk-desk-live #view-chat .ch-msgs,
html.imperium-popout-desk-desk-live #view-chat .ch-input-area,
html.imperium-popout-desk-desk-live #view-chat .ch-tv-slot,
html.imperium-popout-desk-desk-live #view-chat .ch-tv-expand-slot,
html.imperium-popout-desk-desk-live #view-chat .ch-room-dialog,
html.imperium-popout-desk-desk-live #view-chat .ch-feed-cols-title,
html.imperium-popout-desk-desk-live #view-chat .ch-go-bar {
  display: none !important;
}

html.imperium-popout-desk-desk-live #view-chat .ch-desk-body {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  height: 100% !important;
  min-height: 0 !important;
  width: 100% !important;
}

html.imperium-popout-desk-desk-live #view-chat .ch-main {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  height: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  width: 100% !important;
}

html.imperium-popout-desk-desk-live #view-chat .ch-feed-live-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex: 0 0 auto !important;
  justify-content: flex-start !important;
  order: -1;
  padding: 10px 14px !important;
}

html.imperium-popout-desk-desk-live #view-chat .ch-live-player-slot,
html.imperium-popout-desk-desk-live body.ch-live-on #view-chat .ch-live-player-slot,
html.imperium-popout-desk-desk-live body.ch-live-preview #view-chat .ch-live-player-slot,
html.imperium-popout-desk-desk-live #view-chat .ch-live-player-slot[aria-hidden="true"] {
  border-bottom: none !important;
  display: flex !important;
  flex: 1 1 auto !important;
  max-height: none !important;
  min-height: 0 !important;
  position: relative !important;
}

html.imperium-popout-desk-desk-live #view-chat .ch-live-video {
  display: block !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: contain !important;
  width: 100% !important;
  background: #000 !important;
}

/* Não cobrir o vídeo — só mostrar empty quando [hidden] estiver ausente */
html.imperium-popout-desk-desk-live #view-chat .ch-live-empty {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1;
}
html.imperium-popout-desk-desk-live #view-chat .ch-live-empty[hidden] {
  display: none !important;
}

html.imperium-popout-desk-desk-live #view-chat #ch-live-popout.active {
  color: #E8B44A;
}
html.imperium-popout-desk-desk-live #view-chat #ch-live-popout.active .ch-live-ico__box {
  border-color: #E8B44A;
  background: rgba(232, 180, 74, 0.1);
}

/* ── Desk Live · Settings modal ── */
.ch-live-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--ch-mono, var(--cx-mono, "Bloomberg", "IBM Plex Mono", Consolas, monospace));
  font-size: 18px;
}

.ch-live-settings-modal[hidden] {
  display: none !important;
}

.ch-live-settings-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 9, 0.72);
}

.ch-live-settings-panel {
  position: relative;
  width: min(860px, 96vw);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  background: #070a0d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.7);
}

.ch-live-settings-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0e12;
  flex-shrink: 0;
}

.ch-live-settings-kicker {
  display: block;
  color: #4a8fa0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.ch-live-settings-hd h2 {
  margin: 8px 0 0;
  color: #ebe5d8;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.ch-live-settings-x {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #7a8794;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  padding: 6px 14px;
}

.ch-live-settings-x:hover {
  border-color: #67E6C9;
  color: #e8eef2;
}

.ch-live-settings-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ch-live-settings-sec {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 18px 20px;
}

.ch-live-settings-sec h3 {
  margin: 0 0 16px;
  color: #4a8fa0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.ch-live-settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  color: #8a97a3;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ch-live-settings-field:last-child {
  margin-bottom: 0;
}

.ch-live-settings-field select,
.ch-live-settings-field input[type="range"] {
  appearance: none;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e8eef2;
  font-family: inherit;
  font-size: 18px;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  text-transform: none;
}

.ch-live-settings-field input[type="range"] {
  padding: 0;
  height: 36px;
  accent-color: #67E6C9;
}

.ch-live-settings-vol {
  color: #67E6C9;
  font-size: 18px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.ch-live-settings-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  color: #d4dce4;
  font-size: 17px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  cursor: pointer;
}

.ch-live-settings-check input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: #67E6C9;
}

.ch-live-settings-note {
  margin: 0;
  color: #8a97a3;
  font-size: 16px;
  line-height: 1.55;
}

.ch-live-settings-ft {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.ch-live-settings-modal .ch-live-btn {
  font-size: 15px !important;
  padding: 12px 20px !important;
}

#view-chat #ch-live-settings {
  display: inline-flex !important;
  flex-direction: column;
}

/* BRIEF modal — +30% tamanho / fontes (só este, não o CONFIG da Desk Live) */
#ch-brief-settings-modal.ch-live-settings-modal {
  font-size: 23px;
  padding: 32px;
}

#ch-brief-settings-modal .ch-live-settings-panel {
  width: min(1118px, 96vw);
  min-height: min(52vh, 520px);
  max-height: min(92vh, 1196px);
}

#ch-brief-settings-modal .ch-live-settings-hd {
  gap: 21px;
  padding: 29px 36px;
}

#ch-brief-settings-modal .ch-live-settings-kicker {
  font-size: 21px;
}

#ch-brief-settings-modal .ch-live-settings-hd h2 {
  margin-top: 10px;
  font-size: 36px;
}

#ch-brief-settings-modal .ch-live-settings-x {
  font-size: 39px;
  padding: 8px 18px;
}

#ch-brief-settings-modal .ch-live-settings-body {
  padding: 29px 36px 18px;
  gap: 26px;
}

#ch-brief-settings-modal .ch-live-settings-sec {
  padding: 24px 26px;
}

#ch-brief-settings-modal .ch-live-settings-sec h3 {
  margin-bottom: 21px;
  font-size: 23px;
}

#ch-brief-settings-modal .ch-live-settings-field {
  gap: 10px;
  margin-bottom: 21px;
  font-size: 20px;
}

#ch-brief-settings-modal .ch-live-settings-field input[type="url"],
#ch-brief-settings-modal .ch-live-settings-field input[type="text"],
#ch-brief-settings-modal .ch-live-settings-field select,
#ch-brief-settings-modal .ch-live-settings-field input[type="range"] {
  appearance: none;
  background: #fff;
  border: 1px solid #111;
  color: #111;
  font-family: inherit;
  font-size: 23px;
  letter-spacing: 0.02em;
  padding: 18px 20px;
  text-transform: none;
}

#ch-brief-settings-modal .ch-live-settings-field input[type="url"]::placeholder,
#ch-brief-settings-modal .ch-live-settings-field input[type="text"]::placeholder {
  color: #6a7884;
}

#ch-brief-settings-modal .ch-live-settings-note {
  font-size: 21px;
  line-height: 1.55;
}

#ch-brief-settings-modal .ch-live-settings-ft {
  gap: 16px;
  padding: 24px 36px 29px;
}

#ch-brief-settings-modal .ch-live-btn {
  font-size: 20px !important;
  padding: 16px 26px !important;
}

#ch-brief-settings-modal .ch-live-btn--danger {
  border-color: #E05555 !important;
  color: #FF8A8A !important;
  letter-spacing: 0.06em;
}
