/* ==========================================================================
   Futures Position Size Calculator - Core Styles
   Dark navy + gold theme
   ========================================================================== */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.calculator {
  background: #13294b;
  padding: 25px 35px;
  border-radius: 10px;
  box-shadow: 0 0 15px #ffd700aa;
  max-width: 420px;
  width: 100%;
  margin: 2rem auto;
}

.calculator h2 {
  text-align: center;
  margin-bottom: 1.8rem;
  color: #ffd700;
  font-size: 1.8rem;
}

label {
  display: block;
  margin: 1.2rem 0 0.4rem;
  font-weight: 600;
  color: #ffd700;
}

select,
input:not([type="number"]) {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ffd70066;
  background-color: #0a1a33;
  color: #ffd700;
  font-size: 1rem;
  box-sizing: border-box;
}

select option {
  background-color: #13294b;
  color: #ffd700;
}

/* Number inputs (including readonly) */
input[type="number"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
  margin: 0;
  width: 100%;
  padding: 11px 58px 11px 14px;
  border: 1px solid #ffd70066;
  border-radius: 5px;
  background: #0a1a33;
  color: #ffd700;
  font-size: 1.1rem;
  box-sizing: border-box;
}

/* Hide native spinners completely */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Wrapper for custom stepper */
.number-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 380px;
  margin: 0.6rem 0 1.4rem;
}
.number-input-wrapper input[type="number"] {
  width: 100%;
  padding: 11px 60px 11px 14px;    /* RIGHT padding MUST be >= button width */
  border: 1px solid #ffd70066;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  background: #0a1a33;
  color: #ffd700;
  font-size: 1.1rem;
  box-sizing: border-box;
}

/* Vertical button stack on the right */
.stepper-stack {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 44px;
  display: flex;
  flex-direction: column;
  background: #3a3a3a;
  border: 1px solid #ffd70044;
  border-left: none;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  overflow: hidden;
  z-index: 2;
}

.stepper-stack {
  background: #2a2a2a;   /* darker base so it blends better */
}

/* Stepper buttons */
.stepper-btn {
  flex: 1;
  background: #3a3a3a;
  color: #cccccc;
  border: none;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.stepper-btn:hover {
  background: #505050;
}

.stepper-btn:active {
  background: #2a2a2a;
}

.stepper-btn:focus {
  outline: 2px solid #ffd70088;
  outline-offset: -2px;
}

/* Optional: subtle divider between buttons */
.stepper-btn.increment {
  border-bottom: 1px solid #ffd70022;
}

/* Button to calculate */
button:not(.stepper-btn) {
  margin-top: 1.8rem;
  padding: 12px;
  width: 100%;
  background-color: #ffd700;
  border: none;
  color: #0a1a33;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button:not(.stepper-btn):hover {
  background-color: #e6c300;
}

/* Result display */
#result {
  margin-top: 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  color: #ffd700;
  min-height: 2.2rem;
}

/* Readonly field */
#tickValue {
  background: #13294b !important;
  color: #ffd700aa !important;
  cursor: default;
}

.stepper-stack,
.stepper-btn {
  background: red !important;      /* bright red = easy to spot */
  min-height: 20px !important;
  z-index: 999 !important;
}