/* Trading Modals: TP/SL modal, modify modal, close position modal,
   report-modify-btn, block/segmented containers */

/* ─── TP/SL Modal ────────────────────────────────────────────────── */

.tpsl-modal-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.tpsl-modal-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.tpsl-modal-info-row > span:first-child {
  color: var(--muted);
}

.tpsl-modal-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.tpsl-modal-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tpsl-modal-field label {
  font-size: 11px;
  color: var(--muted);
}

.tpsl-modal-field input {
  background: var(--bg-input, #1a1a2e);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 0 12px;
  height: 40px;
  font-size: 13px;
  font-family: var(--mono, monospace);
}
.tpsl-modal-field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.tpsl-modal-pnl {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-family: var(--mono, monospace);
  min-height: 32px;
  padding: 0 4px;
}

/* ─── Modify Modal ──────────────────────────────────────────────── */

.modify-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modify-modal {
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  width: 420px;
  max-width: 90vw;
  padding: 24px;
}

.modify-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modify-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.modify-modal-close {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modify-modal-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

.modify-modal-info .coin-name {
  font-weight: 700;
}

.modify-modal-info .tag {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.modify-modal-info .tag.buy { background: rgba(47,180,99,0.15); color: var(--green); }

.modify-modal-info .tag.sell { background: rgba(255,93,115,0.15); color: var(--red); }

.modify-modal-info .tag.neutral { background: rgba(255,255,255,0.06); color: var(--muted); }

.modify-modal-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.modify-modal-field label {
  font-size: 12px;
  color: var(--muted);
  flex: 0 0 auto;
  min-width: 60px;
}

.modify-modal-field input {
  border: none;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-family: var(--mono);
  text-align: right;
  flex: 1;
  outline: none;
  min-width: 0;
}

.modify-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modify-modal-actions button {
  flex: 1;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.modify-modal-actions .btn-cancel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.modify-modal-actions .btn-confirm {
  border: none;
  background: var(--blue);
  color: #fff;
}

/* ─── Close Position Modal ───────────────────────────────────────── */

.close-modal-prices {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.close-modal-price-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.close-modal-price-label {
  font-size: 12px;
  color: var(--muted);
}

.close-modal-price-value {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--mono);
}

.close-modal-section-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.close-modal-market-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 auto;
}

.close-modal-market-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.close-modal-slider-row {
  margin-bottom: 14px;
}

.close-modal-slider {
  width: 100%;
  accent-color: var(--blue);
  height: 4px;
  cursor: pointer;
}

.close-modal-pct-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.close-modal-pct-labels span {
  cursor: pointer;
}

.close-modal-pct-labels span:hover {
  color: var(--text);
}

.close-modal-details {
  margin-bottom: 4px;
}

.close-modal-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
  color: var(--muted);
}

.close-modal-detail-row span:last-child {
  color: var(--text);
  font-family: var(--mono);
}

.close-modal-pnl {
  font-weight: 600;
}

/* ─── Report Modify Button ──────────────────────────────────────── */

.report-modify-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}

/* ─── Block + Segmented containers ──────────────────────────────── */

.block {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;
}
.right-panel > .block {
  overflow-y: auto;
  min-height: 0;
}

.block h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.segmented button,
.segmented .order-mode-tab {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.segmented button.active,
.segmented .order-mode-tab.active {
  background: var(--green);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}
