/**
 * ═══════════════════════════════════════════════════════════════════════
 * [AXION WAR ROOM] — XAU/NQ SYNCED MULTI-PANE CSS
 * Cyberpunk Black & Lime #C6E310 — High-Fidelity Bloomberg-Grade
 * ═══════════════════════════════════════════════════════════════════════
 */

/* ── ROOT LAYOUT ── */
.wr-root {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: calc(100vh - 160px);
  background: #000;
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
}

/* ── HEADER BAR ── */
.wr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #1a1a1a;
  background: #020202;
  gap: 16px;
  flex-wrap: wrap;
}
.wr-title {
  font-size: 11px;
  font-weight: 700;
  color: #c6e310;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wr-title-diamond {
  color: #c6e310;
  font-size: 14px;
}
.wr-badge {
  font-size: 8px;
  padding: 2px 8px;
  border: 1px solid #c6e31040;
  color: #c6e310;
  letter-spacing: 1px;
  background: #c6e31010;
  animation: wr-pulse-badge 2s ease-in-out infinite;
}
@keyframes wr-pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ── KPI BAR ── */
.wr-kpi-bar {
  display: flex;
  gap: 1px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.wr-kpi-bar::-webkit-scrollbar { display: none; }
.wr-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 14px;
  border: 1px solid #111;
  background: #050505;
  min-width: 100px;
  flex-shrink: 0;
  transition: border-color 0.2s;
  cursor: default;
}
.wr-kpi:hover { border-color: #2a2a2a; }
.wr-kpi-label {
  font-size: 7px;
  color: #444;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.wr-kpi-val {
  font-size: 14px;
  font-weight: 700;
  color: #e0e0e0;
  letter-spacing: -0.5px;
  transition: color 0.15s;
}
.wr-kpi-chg {
  font-size: 9px;
  color: #555;
}
.wr-kpi-chg.up { color: #c6e310; }
.wr-kpi-chg.dn { color: #ff2a55; }

/* ── TIMEFRAME CONTROLS ── */
.wr-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wr-tf-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 4px 10px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  color: #555;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}
.wr-tf-btn:hover { border-color: #333; color: #888; }
.wr-tf-btn.active {
  border-color: #c6e310;
  color: #c6e310;
  background: #c6e31010;
}

/* ── CHART GRID ── */
.wr-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 160px;
  gap: 1px;
  background: #0d0d0d;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.wr-chart-pane {
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wr-chart-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #020202;
  border-bottom: 1px solid #0f0f0f;
  z-index: 10;
  flex-shrink: 0;
}
.wr-chart-pane-title {
  font-size: 9px;
  font-weight: 700;
  color: #c6e310;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.wr-chart-pane-sub {
  font-size: 8px;
  color: #333;
  letter-spacing: 0.3px;
}
.wr-chart-pane-live {
  font-size: 7px;
  color: #c6e310;
  padding: 2px 6px;
  border: 1px solid #c6e31040;
  background: #c6e31008;
}

.wr-chart-canvas {
  flex: 1;
  min-height: 0;
  position: relative;
}

/* Bottom pane: correlation */
.wr-corr-pane {
  grid-column: 1 / 3;
  background: #020202;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wr-corr-inner {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 1px;
  background: #111;
  overflow: hidden;
}
.wr-corr-chart {
  flex: 1;
  min-height: 0;
  position: relative;
}
.wr-corr-stats {
  width: 240px;
  flex-shrink: 0;
  padding: 10px 14px;
  background: #050505;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.wr-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #0f0f0f;
}
.wr-stat-label {
  font-size: 8px;
  color: #444;
  letter-spacing: 0.5px;
}
.wr-stat-val {
  font-size: 10px;
  font-weight: 700;
  color: #e0e0e0;
}

/* ── CROSSHAIR SYNC OVERLAY ── */
.wr-crosshair-sync-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 7px;
  color: #c6e310;
  letter-spacing: 0.5px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 20;
}
.wr-crosshair-sync-badge.active { opacity: 1; }

/* ── TOOLTIP OVERLAY ── */
.wr-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 50;
  padding: 0 8px;
}
.wr-tooltip-inner {
  font-size: 9px;
  color: #c6e310;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: rgba(0,0,0,0.8);
  padding: 3px 8px;
  border-left: 2px solid #c6e310;
  white-space: nowrap;
}

/* ── FOOTER ── */
.wr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 16px;
  border-top: 1px solid #0f0f0f;
  background: #020202;
  font-size: 8px;
  color: #2a2a2a;
  letter-spacing: 0.5px;
}
.wr-footer-time { color: #333; }
.wr-footer-mode { color: #1e1e1e; }

/* ── CHART CROSSHAIR SYNC FLASH ── */
@keyframes wr-sync-flash {
  0% { border-color: #c6e310; }
  100% { border-color: #1a1a1a; }
}
.wr-chart-pane.syncing {
  animation: wr-sync-flash 0.15s ease-out;
}

/* ── LOADING STATE ── */
.wr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  background: #000;
}
.wr-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #0f0f0f;
  border-top: 2px solid #c6e310;
  border-radius: 50%;
  animation: wr-spin 0.8s linear infinite;
}
@keyframes wr-spin { 100% { transform: rotate(360deg); } }
.wr-loading-text {
  font-size: 9px;
  color: #333;
  letter-spacing: 2px;
  animation: wr-pulse-badge 1.5s ease-in-out infinite;
}

/* ── PRICE DELTA FLASH ── */
.wr-price-flash-up {
  animation: wr-flash-up 0.3s ease-out;
}
.wr-price-flash-dn {
  animation: wr-flash-dn 0.3s ease-out;
}
@keyframes wr-flash-up {
  0% { color: #c6e310; }
  100% { color: #e0e0e0; }
}
@keyframes wr-flash-dn {
  0% { color: #ff2a55; }
  100% { color: #e0e0e0; }
}
