/* trade.css

/* === Trade Tab Panel === */
#tab-trade {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem;
  min-height: 0;
}

#tab-trade.hidden {
  display: none;
}

/* === Prediction & Leverage Row === */
.prediction-leverage-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  gap: 1rem;
}

/* Left 70% */
.trade-metrics {
  flex: 7;
  display: flex;
  flex-direction: column;
}

/* Right 30% */
.direction-toggle-wrapper {
  flex: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: -2rem;
}

.direction-toggle-wrapper.hidden {
  display: none !important;
}

/* === Prediction Display === */
.prediction-display {
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  margin: 0.5rem 0 0.75rem;
  visibility: hidden;
}

/* === Leverage Bar === */
.leverage-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0 0 0.5rem;
  text-align: center;
  gap: 0.5rem;
}

.leverage-label {
  font-weight: bold;
  text-align: center;
  font-size: 0.95rem;
}

.leverage-slider {
  width: 100%;
  height: 24px;
  cursor: pointer;
  accent-color: #2d7f2d;
  background: transparent;
}

.leverage-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background-color: #2d7f2d;
  border-radius: 50%;
  border: none;
}

.leverage-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background-color: #2d7f2d;
  border-radius: 50%;
  border: none;
}

/* === Apple-Style Vertical Toggle (Compact Version) === */
.direction-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  width: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
}

.direction-toggle input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 3px;
  height: 100%;
  background-color: #aaa;
  border-radius: 2px;
}

.toggle-knob {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background-color: #333;
  border-radius: 50%;
  border: 2px solid white;
  transition: top 0.25s ease;
  top: 0px;
}

.direction-toggle input[type="checkbox"]:checked + .toggle-slider .toggle-knob {
  top: calc(100% - 12px);
}

/* === Direction Labels === */
.direction-labels {
  position: absolute;
  right: -45px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: bold;
  color: #222;
  text-align: left;
  pointer-events: none;
  user-select: none;
}

.direction-labels span {
  line-height: 1;
}

.direction-labels .long-text {
  color: #2d7f2d;
}

.direction-labels .short-text {
  color: #b63d3d;
}

/* === Action Buttons === */
.action-buttons {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.pre-buy-buttons,
.post-buy-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

/* === Button Toggle Disable === */
#shortToggle:disabled + .toggle-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

#shortToggle:disabled + .toggle-slider .toggle-knob {
  background-color: #777;
  border-color: #ccc;
}
