/* ============================================================
   Chart Area — #chartColumn, #chartWrap, #chart, price/OHLC labels,
   the drawing toolbar, and the drawing canvas.
   ============================================================ */
#chartWrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#chart { width: 100%; height: 100%; }
#rsiPanelWrap { height: 160px; border-top: 1px solid #1e222d; flex-shrink: 0; position: relative; }
#rsiChart { width: 100%; height: 100%; }
#rsiDrawCanvas { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 3; }
#rsiResizeBar { position: absolute; top: 0; left: 0; right: 0; height: 6px; cursor: ns-resize; z-index: 10; background: transparent; }
#rsiResizeBar:hover { background: rgba(255,255,255,0.07); }
#rsiCloseBtn { position: absolute; top: 4px; right: 46px; background: none; border: none; color: #5d6068; cursor: pointer; font-size: 11px; padding: 0 2px; line-height: 1; z-index: 5; font-family: inherit; }
#rsiCloseBtn:hover { color: #f23645; }
#rsiLabel { position: absolute; top: 5px; left: 8px; font-size: 10px; color: #787b86; font-family: "Share Tech Mono", monospace; pointer-events: none; z-index: 2; }
#rsiDrawBtn { position: absolute; top: 3px; right: 8px; font-size: 9px; color: #5d6068; cursor: pointer; z-index: 4; background: #1c2030; border: 1px solid #2a2e39; padding: 1px 6px; border-radius: 3px; font-family: "Share Tech Mono", monospace; transition: color 0.12s, border-color 0.12s; }
#rsiDrawBtn:hover { color: #9598a1; border-color: #555; }
#rsiDrawBtn.active { color: #f0e027; border-color: #f0e027; }
/* Indicator pills */
#emaMainBtn { border-radius: 4px 0 0 4px; }
#emaDropBtn { border-radius: 0 4px 4px 0; border-left: none !important; padding: 4px 7px; margin-left: -1px; }
#emaMainBtn.active { background: rgba(255,255,255,0.07); color: #d1d4dc; border-color: #555; }
#emaDropBtn.active  { background: rgba(255,255,255,0.07); color: #d1d4dc; border-color: #555; }
#indRsiBtn.active   { background: rgba(155,89,182,0.15); color: #9b59b6; border-color: #9b59b6; }
#indBBBtn.active    { background: rgba(255,165,0,0.15);  color: #ffa500; border-color: #ffa500; }
#indVwapBtn.active  { background: rgba(139,90,250,0.15); color: #8b5afa; border-color: #8b5afa; }
/* EMA dropdown panel */
#emaDropdown {
  position: fixed; z-index: 9999;
  background: #1c2030; border: 1px solid #2a2e39; border-radius: 4px;
  padding: 8px 10px; display: none; flex-direction: column; gap: 8px; min-width: 170px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.emaRow { display: flex; align-items: center; gap: 8px; }
.emaDot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  cursor: pointer; opacity: 0.25; transition: opacity 0.15s, transform 0.1s;
  border: 1px solid rgba(255,255,255,0.2);
}
.emaDot:hover { transform: scale(1.2); }
.emaDot.on { opacity: 1; }
/* PHASE 1 FOUNDATION: each EMA row's dot color, keyed to its own data-slot instead of a
   repeated inline background (same three colors, 13/21/55). */
.emaRow[data-slot="0"] .emaDot { background: #00bcd4; }
.emaRow[data-slot="1"] .emaDot { background: #ff9800; }
.emaRow[data-slot="2"] .emaDot { background: #e040fb; }
.emaRowLabel {
  font-size: 10px; font-family: "Share Tech Mono", monospace;
  color: #787b86; text-transform: uppercase; letter-spacing: 0.05em; flex: 1;
}
.emaPeriodInput {
  width: 48px; background: #131722; border: 1px solid #2a2e39; border-radius: 3px;
  color: #d1d4dc; font-family: "Share Tech Mono", monospace; font-size: 11px;
  text-align: center; padding: 3px 4px; outline: none;
}
.emaPeriodInput:focus { border-color: #555; }
/* hide number input spinners */
.emaPeriodInput::-webkit-outer-spin-button,
.emaPeriodInput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.emaPeriodInput[type=number] { -moz-appearance: textfield; appearance: textfield; }
/* ---------- Drawing toolbar ---------- */
.drawSep { width: 1px; height: 20px; background: rgba(255,255,255,0.06); margin: 0 6px; flex-shrink: 0; }
.pill.drawTool.active { background: rgba(240,180,41,0.15); color: #f0b429; border-color: rgba(240,180,41,0.4); }
.pill.drawClear { color: var(--red); border-color: var(--border2); }
.pill.drawClear:hover { background: rgba(242,54,69,0.12); color: var(--red); border-color: rgba(242,54,69,0.4); }
#magnetToggle.active { background: rgba(240,180,41,0.15); color: #f0b429; border-color: rgba(240,180,41,0.4); }
#magnetToggle { font-size: 14px; padding: 2px 8px; }

/* ========== CHEV'S ARSENAL ========== */
#arsenalToggleBtn {
  background: var(--gold-dim); border: 1px solid rgba(212,175,55,0.25); color: var(--gold);
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 0.06em; padding: 5px 12px; border-radius: var(--r-pill);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
/* PHASE 2 bug fix: real "currently showing Layers" state, synced by
   panel-toggle.js's _syncArsenalBtnState() — brighter version of its own resting
   gold-dim look, matching how #magnetToggle.active/.pill.drawTool.active handle an
   already-gold-accented control's pressed state. */
#arsenalToggleBtn.active { background: rgba(212,175,55,0.28); border-color: var(--gold); box-shadow: var(--glow-gold); }
.arsenalToggleIcon { height: 13px; width: auto; vertical-align: middle; margin-right: 4px; margin-bottom: 1px; }

/* ---------- Object tree panel ---------- */
#objectTree {
  display: none; position: fixed; bottom: 34px; right: 10px; z-index: 110;
  width: 230px; max-height: 280px; overflow-y: auto;
  background: #131722; border: 1px solid #2a2e39; border-radius: 6px;
  font-family: "Share Tech Mono", monospace;
}
