/* CORTEX PHASE MATRIX [CPM] — Reuters flat · fases 1/2/3 */
.mrr-cpm {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  pointer-events: none;
  user-select: none;
}

.mrr-cpm-label {
  font-family: var(--font-bloomberg);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}

.mrr-cpm-dot {
  width: 5px;
  height: 5px;
  border-radius: 0;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.6);
}

/* Fase 1 — IMPULSÃO */
.mrr-cpm.mrr-cpm--impulse .mrr-cpm-label {
  color: #4A8FA0;
}

.mrr-card.mrr-cpm-impulse .mrr-leg--9 {
  animation: mrr-cpm-ma9-pulse 2.4s ease-in-out infinite;
}

@keyframes mrr-cpm-ma9-pulse {
  0%, 100% { opacity: 0.85; color: #4A8FA0; }
  50% { opacity: 1; color: #6ba8b6; text-shadow: none; }
}

/* Fase 2 — CORREÇÃO */
.mrr-cpm.mrr-cpm--correction .mrr-cpm-label {
  color: rgba(235, 229, 216, 0.45);
}

/* Fase 3 — SATURAÇÃO */
.mrr-cpm.mrr-cpm--saturation .mrr-cpm-label {
  color: #b07d3a;
  text-shadow: none;
}

.mrr-cpm.mrr-cpm--saturation .mrr-cpm-dot {
  opacity: 1;
  transform: scale(1);
  background: #b07d3a;
  box-shadow: none;
}

body.view-geral-active .mrr-cpm-label {
  font-family: var(--inst-mono, var(--font-bloomberg));
  font-size: 13.2px;
  font-weight: var(--inst-fw-data, 500);
}

body.view-geral-active .mrr-cpm.mrr-cpm--impulse .mrr-cpm-label {
  color: #4A8FA0;
}

body.view-geral-active .mrr-cpm.mrr-cpm--saturation .mrr-cpm-label {
  color: #b07d3a;
}

/* Toggle CPM — barra abaixo dos timeframes do MRR */
.mrr-cpm-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 6px;
  border-top: 1px solid #1a2430;
  background: #0a0e12;
  pointer-events: auto;
}

.mrr-cpm-bar-label {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-bloomberg);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: #6a7884;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.mrr-cpm-signal-stat {
  flex: 0 0 auto;
  font-family: var(--font-bloomberg);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: #4A8FA0;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}

#macro-reversal-radar.mrr-cpm-signals-off .mrr-cpm-signal-stat {
  color: rgba(106, 120, 132, 0.7);
}

.mrr-cpm-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  font-family: var(--font-bloomberg);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(74, 143, 160, 0.55);
  background: rgba(74, 143, 160, 0.12);
  color: #4A8FA0;
  border-radius: 0;
  box-shadow: none;
}

.mrr-cpm-toggle:hover {
  border-color: rgba(74, 143, 160, 0.75);
  background: rgba(74, 143, 160, 0.18);
  color: #ebe5d8;
}

.mrr-cpm-toggle.is-off {
  border-color: #1a2430;
  background: transparent;
  color: #6a7884;
}

.mrr-cpm-toggle.is-off:hover {
  border-color: rgba(176, 125, 58, 0.45);
  color: #b07d3a;
}

.mrr-cpm-toggle-dot {
  width: 5px;
  height: 5px;
  border-radius: 0;
  flex-shrink: 0;
  background: currentColor;
  box-shadow: none;
}

.mrr-cpm-toggle.is-off .mrr-cpm-toggle-dot {
  box-shadow: none;
  opacity: 0.55;
}

body[data-cpm-enabled="0"] #mrr-cpm-badge {
  opacity: 0;
  visibility: hidden;
}

#macro-reversal-radar.mrr-cpm-signals-off .mrr-cpm-bar-label {
  color: rgba(176, 125, 58, 0.7);
}

body.view-geral-active .mrr-cpm-bar-label,
body.view-geral-active .mrr-cpm-signal-stat,
body.view-geral-active .mrr-cpm-toggle {
  font-family: var(--inst-mono, var(--font-bloomberg));
}
