/* ============================================================
   Welthby — outcome-range widget
   Consumes tokens from css/welthby-neon.css.
   Shows an adverse-to-favourable range, never a single promised return.
   ============================================================ */

.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }

/* ---- sliders card ---- */
.calc-form {
  border: 1px solid var(--wb-line);
  border-radius: var(--wbr-lg);
  background: linear-gradient(180deg, var(--wb-glass-2), var(--wb-glass));
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-form__field { margin-bottom: 34px; }
.calc-form__field:last-child { margin-bottom: 0; }

.calc-form__label {
  display: block;
  font-family: var(--wbf-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wb-dim);
  margin-bottom: 10px;
}

.calc-form__value {
  font-family: var(--wbf-disp);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  color: var(--wb-tx-strong);
  text-shadow: 0 0 20px rgba(0, 240, 255, .35);
  margin-bottom: 14px;
}

.calc-form__input-group { display: flex; flex-direction: column; }

.calc-slider { position: relative; height: 30px; display: flex; align-items: center; }

.calc-slider__background {
  position: absolute;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--wb-line);
  border-radius: var(--wbr-pill);
  z-index: 1;
}

.calc-slider__progress {
  position: absolute;
  left: 0;
  height: 6px;
  background: var(--wb-grad-x);
  box-shadow: 0 0 14px rgba(0, 240, 255, .6);
  border-radius: var(--wbr-pill);
  z-index: 2;
}

.calc-slider__input {
  position: absolute;
  left: 0;
  width: 100%;
  height: 12px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  outline: none;
  z-index: 3;
  cursor: pointer;
  padding: 0;
  border: none !important;
}
.calc-slider__input:focus-visible { outline: 2px solid var(--wb-neon); outline-offset: 6px; }

.calc-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--wb-bg-2);
  cursor: pointer;
  border: 2px solid var(--wb-neon);
  box-shadow: 0 0 12px rgba(0, 240, 255, .8), 0 0 20px -4px rgba(255, 43, 214, .7);
}
.calc-slider__input::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--wb-bg-2);
  cursor: pointer;
  border: 2px solid var(--wb-neon);
  box-shadow: 0 0 12px rgba(0, 240, 255, .8), 0 0 20px -4px rgba(255, 43, 214, .7);
}

.calc-slider__details {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--wbf-mono);
  font-size: .66rem;
  letter-spacing: .04em;
  color: var(--wb-dim);
}

/* ---- results column ---- */
.calc-results { display: flex; flex-direction: column; gap: 18px; }

.calc-results__final {
  background: var(--wb-neon-glass);
  border: 1px solid transparent;
  box-shadow: var(--wbs-neon);
  border-radius: var(--wbr-lg);
  padding: 28px 26px;
}
.calc-results__final-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.calc-results__icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--wb-neon); }
.calc-results__final-label {
  font-family: var(--wbf-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wb-cyan-hi);
}
.calc-results__final-amount {
  font-family: var(--wbf-disp);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.2;
  color: var(--wb-tx-strong);
  text-shadow: 0 0 24px rgba(0, 240, 255, .4);
  margin-bottom: 8px;
}
.calc-results__final-subtitle { font-size: .9rem; color: var(--wb-muted); }

.calc-results__profit {
  border: 1px solid var(--wb-line);
  border-radius: var(--wbr-lg);
  background: linear-gradient(180deg, var(--wb-glass-2), var(--wb-glass));
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}
.calc-results__profit-inner { position: relative; z-index: 10; }
.calc-results__profit-header { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.calc-results__profit-icon-wrap {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--wb-grad);
  box-shadow: var(--wbs-glow), var(--wbs-glow-mag);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.calc-results__profit-icon { width: 20px; height: 20px; color: var(--wb-on-neon); }
.calc-results__profit-meta { display: flex; flex-direction: column; }
.calc-results__profit-title { font-family: var(--wbf-disp); font-weight: 600; font-size: 1rem; color: var(--wb-tx-strong); line-height: 1.5; }
.calc-results__profit-subtitle { font-family: var(--wbf-mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wb-dim); }
.calc-results__profit-amount {
  font-family: var(--wbf-disp);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  color: var(--wb-tx-strong);
}
.calc-results__profit-amount .dn { color: #ff7ab6; text-shadow: 0 0 16px rgba(255, 43, 214, .45); }
.calc-results__profit-amount .up { color: var(--wb-cyan-hi); text-shadow: 0 0 16px rgba(0, 240, 255, .45); }
.calc-results__profit-amount .sep { color: var(--wb-dim); padding-inline: 6px; }

/* two-sided bar: downside grows left from the centre line, upside grows right */
.calc-results__profit-bar { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.calc-results__profit-bar-track {
  height: 8px; flex: 1;
  background: var(--wb-line-soft);
  border-radius: var(--wbr-pill);
  position: relative;
  overflow: hidden;
}
.calc-results__profit-bar-track::after {
  content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px;
  background: var(--wb-tx-strong); opacity: .6; transform: translateX(-1px);
}
.calc-range__down, .calc-range__up { position: absolute; top: 0; bottom: 0; transition: width .25s ease; }
.calc-range__down { right: 50%; background: linear-gradient(270deg, #ff2bd6, #c026d3); box-shadow: 0 0 12px rgba(255, 43, 214, .6); border-radius: var(--wbr-pill) 0 0 var(--wbr-pill); }
.calc-range__up { left: 50%; background: linear-gradient(90deg, #17cae7, #00f0ff); box-shadow: 0 0 12px rgba(0, 240, 255, .6); border-radius: 0 var(--wbr-pill) var(--wbr-pill) 0; }
.calc-results__profit-percent { font-family: var(--wbf-mono); font-size: .74rem; font-weight: 500; color: var(--wb-muted); white-space: nowrap; }

.calc-disclaimer {
  background: var(--wb-glass);
  border: 1px solid rgba(255, 43, 214, .25);
  border-radius: var(--wbr-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.calc-disclaimer__icon { width: 18px; height: 18px; color: var(--wb-mag); flex-shrink: 0; }
.calc-disclaimer__text { font-size: .78rem; color: var(--wb-muted); line-height: 1.7; }

@media (max-width: 960px) { .calc-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .calc-form, .calc-results__final, .calc-results__profit { padding: 24px 20px; }
  .calc-form__field { margin-bottom: 26px; }
}
@media (max-width: 340px) {
  .calc-form__value, .calc-results__profit-amount { font-size: 1.45rem; }
}
