div.heloc-calculator-main > div.heloc-gauge > div > div > div.heloc-result-sub {opacity:0;}

/* Wrapper */
.heloc-equity-calculator {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 24px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  max-width: 520px;
  width:80%;
}

/* Header */
.heloc-calculator-header h2 {
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.heloc-calculator-header p {
  margin: 0 0 16px;
  opacity: 0.8;
}

/* Main layout – stacked: gauge, then inputs */
.heloc-calculator-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* -------------------------------------------------
   Donut gauge
-------------------------------------------------- */
.heloc-gauge {
  --heloc-fill: 0; /* 0–1, set from JS */
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;

  background: conic-gradient(
    #2860ef calc(var(--heloc-fill, 0) * 1turn),
    #E5E5E5 0
  );

  /* Fill appears counter-clockwise */
  transform: scaleX(-1);

  /* Smooth-ish change on updates */
  transition: background 0.35s ease-out;
}

/* Inner circle for the content */
.heloc-gauge-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;

  /* Unflip text so it reads correctly */
  transform: scaleX(-1);
}

/* -------------------------------------------------
   Result text inside the donut
-------------------------------------------------- */
.heloc-result {
  text-align: center;
}

.heloc-result-label,
.heloc-result-amount,
.heloc-result-sub {
  transition: opacity 0.2s ease, color 0.2s ease;
  color:#40404f;
}

.heloc-result-label {
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0.08em;
  opacity: 1;
  margin-bottom: 4px;
  color:#40404f;
}

.heloc-result-amount {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.1;
}

.heloc-result-sub {
  font-size: 0.85rem;
  margin-top: 4px;
  opacity: 1;
  color:color:#40404f;
}

/* -------------------------------------------------
   Inputs container
-------------------------------------------------- */
.heloc-inputs {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.heloc-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Label now contains BOTH text + number input (wrapped) */
.heloc-label {
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* Wrapper for currency symbol + number input */
.heloc-number-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width:85px;
}

/* Dollar sign */
.heloc-number-wrap::before {
  content: "$";
  position: absolute;
  left: 10px;
  font-size: 0.95rem;
  color: #333;
  opacity: 1;
  pointer-events: none;
  font-weight: 500;
}

/* Number inputs */
.heloc-number-wrap input[type="number"] {
  width: 120px;
  padding: 6px 32px 6px 0px; /* room on right for K label */
  border-radius: 8px;
  border: 0;
  font-size: 0.95rem;
  text-align: right;
  background-color: #ffffff;
  font-weight: 500;
  max-width:fit-content;

  /* Hide actual digits (K-display overlays) */
  color: transparent;
  caret-color: #000;
}

/* REMOVE SPINNER ARROWS */
.heloc-number-wrap input[type="number"]::-webkit-outer-spin-button,
.heloc-number-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.heloc-number-wrap input[type="number"] {
  -moz-appearance: textfield;
}

/* K text overlay */
.heloc-k-display {
  position: absolute;
  right: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #000;
  pointer-events: none;
}

/* Slider wrapper */
.heloc-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* -------------------------------------------------
   Sliders
-------------------------------------------------- */
.heloc-equity-calculator input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  border-radius: 10px;
  background: #e3e3e3;
  outline: none;
  cursor: pointer;
}

/* Track */
.heloc-equity-calculator input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 999px;
  background: #e3e3e3;
}

.heloc-equity-calculator input[type="range"]::-moz-range-track {
  height: 14px;
  border-radius: 999px;
  background: #e3e3e3;
}

/* Thumb */
.heloc-equity-calculator input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 30px;
  width: 15px;
  border-radius: 5px;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  margin-top: -9px;
}

.heloc-equity-calculator input[type="range"]::-moz-range-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Home value thumb – purple */
.heloc-equity-calculator [data-heloc-home-range]::-webkit-slider-thumb {
  background: #7B3FFF;
}
.heloc-equity-calculator [data-heloc-home-range]::-moz-range-thumb {
  background: #7B3FFF;
}

/* What you owe thumb – teal */
.heloc-equity-calculator [data-heloc-owed-range]::-webkit-slider-thumb {
  background: #00C2D3;
}
.heloc-equity-calculator [data-heloc-owed-range]::-moz-range-thumb {
  background: #00C2D3;
}

/* Footnote */
.heloc-footnote {
  margin-top: 10px;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* -------------------------------------------------
   Mobile
-------------------------------------------------- */
@media (max-width: 767px) {
  .heloc-equity-calculator {margin-top:24px;width:100%;}
  .heloc-result {margin-top:auto;}
  .heloc-gauge {
    width: 180px;
    height: 180px;
    padding: 14px;
  }

  .heloc-number-wrap input[type="number"] {
    width: 110px;
  }

  .heloc-result-amount {font-size: 1.5rem;}
}
