/* ============================================================
   Wuzmiq — return projection widget (SAR)
   Uses the tokens from css/wuzmiq-ui.css. Bidirectional.
   ============================================================ */

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

/* ---- sliders card (shared card surface comes from wuzmiq-ui.css) ---- */
.calc-form {
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc-form__field { margin-block-end: 36px; }
.calc-form__field:last-child { margin-block-end: 0; }

.calc-form__label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  color: var(--wq-muted);
  margin-block-end: 8px;
}
.calc-form__value {
  font-family: var(--wqf-num);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.3;
  color: var(--wq-tx-strong);
  margin-block-end: 14px;
  font-variant-numeric: tabular-nums;
}

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

/* Anchored to the inline start so the fill grows the same way the native
   range input moves under RTL. */
.calc-slider__background {
  position: absolute;
  inset-inline-start: 0;
  width: 100%;
  height: 4px;
  background: var(--wq-raise);
  border-radius: var(--wqr-pill);
  z-index: 1;
}
.calc-slider__progress {
  position: absolute;
  inset-inline-start: 0;
  height: 4px;
  background: var(--wq-metal);
  border-radius: var(--wqr-pill);
  z-index: 2;
}
.calc-slider__input {
  position: absolute;
  inset-inline-start: 0;
  width: 100%;
  height: 14px;
  -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(--wq-gold-hi); outline-offset: 6px; }
.calc-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 3px;
  transform: rotate(45deg);
  background: var(--wq-gold-hi);
  cursor: pointer;
  border: 3px solid var(--wq-bg);
  box-shadow: 0 0 0 1px var(--wq-gold), 0 0 14px rgba(201, 164, 92, .55);
}
.calc-slider__input::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 3px;
  transform: rotate(45deg);
  background: var(--wq-gold-hi);
  cursor: pointer;
  border: 3px solid var(--wq-bg);
  box-shadow: 0 0 0 1px var(--wq-gold), 0 0 14px rgba(201, 164, 92, .55);
}
.calc-slider__details {
  display: flex;
  justify-content: space-between;
  margin-block-start: 8px;
  font-family: var(--wqf-num);
  font-size: .74rem;
  color: var(--wq-dim);
}

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

.calc-results__final {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--wq-gold-line);
  border-radius: var(--wqr-md);
  padding: 30px 28px;
  background:
    radial-gradient(80% 80% at var(--wq-glow-x) 0%, rgba(201, 164, 92, .14), transparent 70%),
    linear-gradient(180deg, var(--wq-surface-2), var(--wq-surface));
}
.calc-results__final::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--wq-metal);
}
.calc-results__final-header { display: flex; align-items: center; gap: 9px; margin-block-end: 12px; }
.calc-results__icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--wq-gold); }
.calc-results__final-label { font-size: .86rem; font-weight: 600; color: var(--wq-gold-hi); }
.calc-results__final-amount {
  font-family: var(--wqf-num);
  font-weight: 600;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.2;
  margin-block-end: 8px;
  color: var(--wq-tx-strong);
  font-variant-numeric: tabular-nums;
}
.calc-results__final-subtitle { font-size: .9rem; color: var(--wq-muted); }

.calc-results__profit { padding: 28px 28px; position: relative; overflow: hidden; }
.calc-results__profit-inner { position: relative; z-index: 1; }
.calc-results__profit-header { display: flex; align-items: center; gap: 14px; margin-block-end: 14px; }
.calc-results__profit-icon-wrap {
  width: 46px; height: 46px;
  border-radius: var(--wqr-sm);
  background: var(--wq-metal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.calc-results__profit-icon { width: 20px; height: 20px; color: var(--wq-on-gold); }
.calc-results__profit-meta { display: flex; flex-direction: column; }
.calc-results__profit-title { font-weight: 600; font-size: .96rem; color: var(--wq-tx-strong); line-height: 1.5; }
.calc-results__profit-subtitle { font-size: .78rem; color: var(--wq-dim); }
.calc-results__profit-amount {
  font-family: var(--wqf-num);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  line-height: 1.25;
  color: var(--wq-tx-strong);
  font-variant-numeric: tabular-nums;
}
.calc-results__profit-bar { margin-block-start: 14px; display: flex; align-items: center; gap: 12px; }
.calc-results__profit-bar-track { height: 4px; flex: 1; background: var(--wq-raise); border-radius: var(--wqr-pill); overflow: hidden; }
.calc-results__profit-bar-fill { height: 100%; background: var(--wq-metal); border-radius: var(--wqr-pill); }
.calc-results__profit-percent { font-family: var(--wqf-num); font-size: .8rem; font-weight: 700; color: var(--wq-gold-hi); direction: ltr; unicode-bidi: isolate; }

.calc-disclaimer {
  border: 1px solid var(--wq-line-soft);
  border-radius: var(--wqr-sm);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, .015);
}
.calc-disclaimer__icon { width: 18px; height: 18px; color: var(--wq-gold); flex-shrink: 0; margin-block-start: 3px; }
.calc-disclaimer__text { font-size: .8rem; color: var(--wq-dim); line-height: 1.8; }

@media (max-width: 960px) { .calc-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .calc-form, .calc-results__final, .calc-results__profit { padding: 26px 22px; }
  .calc-form__field { margin-block-end: 28px; }
}
@media (max-width: 340px) {
  .calc-form__value, .calc-results__profit-amount { font-size: 1.5rem; }
}
