/* Bar Replay UI. Kept visually close to the existing platform panels so it
   reads as part of the product rather than a bolted-on tool. */
.rp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rp-bar input, .rp-bar select, .rp-bar button {
  font-family: inherit; font-size: .88rem; padding: 8px 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-primary);
}
.rp-symbol { width: 108px; text-align: center; letter-spacing: .5px; font-weight: 700; }
.rp-bar button { cursor: pointer; transition: .15s; }
.rp-bar button:hover:not(:disabled) { border-color: var(--border-accent); }
.rp-bar button:disabled { opacity: .4; cursor: not-allowed; }
.rp-back, .rp-play, .rp-step, .rp-reset { min-width: 44px; font-size: 1rem; }
.rp-sep { flex: 1 1 12px; }

.rp-chart { width: 100%; min-height: 380px; }

.rp-scrub-wrap { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.rp-scrub { flex: 1; accent-color: #06d6a0; }
.rp-pos { font-size: .8rem; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.rp-trade { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rp-trade button {
  font-family: inherit; font-size: .88rem; padding: 9px 18px; border-radius: 10px;
  border: 1px solid var(--border); cursor: pointer; font-weight: 700;
  background: var(--bg-card); color: var(--text-primary);
}
.rp-buy:not(:disabled)  { border-color: rgba(6,214,160,.45);  color: #06d6a0; }
.rp-sell:not(:disabled) { border-color: rgba(239,68,68,.45);  color: #ef4444; }
.rp-trade button:disabled { opacity: .4; cursor: not-allowed; }
.rp-open { font-size: .84rem; color: var(--text-secondary); }
.rp-pnl  { font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-pnl.up, .up  { color: #06d6a0; }
.rp-pnl.down, .down { color: #ef4444; }

.rp-stats { min-height: 42px; }
.rp-muted { color: var(--text-muted); font-size: .82rem; line-height: 1.9; }
.rp-err   { color: #ef4444; font-size: .85rem; }
.rp-grid  { display: flex; flex-wrap: wrap; gap: 10px; }
.rp-grid > div {
  flex: 1 1 96px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; text-align: center;
}
.rp-grid b { display: block; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-grid span { font-size: .72rem; color: var(--text-muted); }

@media (max-width: 600px) {
  .rp-sep { flex-basis: 100%; height: 0; }
  .rp-chart { min-height: 300px; }
}

/* Timeframe select in the replay bar. */
.rp-tf {
  background: rgba(0, 0, 0, .3); color: var(--text-secondary, #8892a4);
  border: 1px solid var(--border, #1e2a3d); border-radius: 8px;
  padding: 6px 9px; font: inherit; font-size: 12px; min-height: 34px; cursor: pointer;
}
.rp-tf:hover { color: var(--text-primary, #e8edf7); border-color: rgba(212,175,55,.4); }
.rp-tf:focus-visible { outline: 2px solid var(--gold, #d4af37); outline-offset: 1px; }
.light-theme .rp-tf,
.light-theme .rp-period,
.light-theme .rp-speed,
.light-theme .rp-symbol {
  background: #fff; color: var(--text-primary);
  border-color: rgba(8, 40, 60, .18);
}
