/* ScalpChartModal — candlestick chart modal for trades/positions */

#scalpChartModal[hidden] { display: none !important; }

#scalpChartModal {
  position: fixed;
  inset: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 9, 0.72);
  backdrop-filter: blur(3px);
}

.scm-dialog {
  position: relative;
  width: min(1200px, calc(100vw - 40px));
  height: min(760px, calc(100vh - 40px));
  background: #111214;
  border: 1px solid #2a2d34;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
  border-bottom: 1px solid #1d1f24;
}

.scm-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
  color: #e8e8e8;
}

.scm-symbol { letter-spacing: 0.3px; }
.scm-side {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.scm-side.long { background: rgba(38, 166, 154, 0.18); color: #26a69a; }
.scm-side.short { background: rgba(239, 83, 80, 0.18); color: #ef5350; }

.scm-pnl { font-variant-numeric: tabular-nums; }
.scm-pnl.pos { color: #26a69a; }
.scm-pnl.neg { color: #ef5350; }

.scm-reason {
  font-size: 12px;
  font-weight: 400;
  color: #8a8d96;
  padding: 2px 7px;
  background: #1d1f24;
  border-radius: 4px;
}

.scm-close {
  background: none;
  border: none;
  color: #8a8d96;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.scm-close:hover { background: #1d1f24; color: #e8e8e8; }

.scm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 6px 18px 10px;
  font-size: 12px;
  color: #8a8d96;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid #1d1f24;
}

.scm-chart-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
}

.scm-chart {
  width: 100%;
  height: 100%;
}

.scm-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8d96;
  font-size: 14px;
  background: rgba(17, 18, 20, 0.6);
}

@media (max-width: 720px) {
  .scm-dialog {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
  .scm-meta { gap: 8px; font-size: 11px; }
}
