.mortgage-calculator-step {
  position: relative;
}
.mortgage-calculator {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  height: auto !important;
  background: #f8f6f3;
  border-radius: 16px;
  padding: 24px;
  font-family: 'Helvetica Neue', sans-serif;
  color: #1e1e1e;
}

.mortgage-calculator h4 {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  margin-top: 5px;
}

.mortgage-calculator label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 14px;
  color: #545454;
}

.mortgage-calculator input[type="text"], .mortgage-calculator input[type="email"] {
  width: -webkit-fill-available;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.mortgage-calculator select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.range-section {
  margin-bottom: 1.5rem;
}

/* --- UPDATE: "Back" Button Styling (Text Link) --- */
button.calculator-back-btn {
  background: transparent !important;
  border: none !important;
  color: #888 !important; /* Subtle Gray */
  text-decoration: underline;
  box-shadow: none !important;
  width: 100%;
  margin: 10px 0 30px 0; /* Adjust spacing */
  padding: 10px;
  font-weight: normal !important;
  font-size: 0.9rem;
  cursor: pointer;
}

button.calculator-back-btn:hover {
  color: #333 !important;
  background: transparent !important;
}

.range-container {
  position: relative;
}

.range-container input[type="range"] {
  width: 100%;
  margin-top: 0.5rem;
}

.range-value {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #fd8c3e;
  color: white;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: bold;
}

.results {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  border-radius: 5px;
  background: #e5e5e5;
}

.result-box {
  background: #ffffff;
  padding: 1rem;
  border-radius: 12px;
  width: 48%;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  margin: 11px;
}

.result-box h3 {
  margin: 1rem;
  font-size: 2rem;
  font-weight: bold;
}

@media screen and (max-width: 600px) {
  .result-box h3 {
    margin: 0 !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
  }
}

.result-box p {
  margin: 0;
  text-align: left;
  font-size: 15px;
}

.ltv-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 58px;
}

.cta-button {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  background: #fd8c3e;
  color: white !important;
  padding: 0.75rem;
  margin-top: 1.5rem;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
  border: 1px solid #fd8c3e;
}

.cta-button:hover, .cta-button:focus {
  color: #fd8c3e !important;
  border: 1px solid #fd8c3e !important;
  background: transparent !important;
}

.cta-toggle-button {
  display: block;
  width: 100%;
  background: #fd8c3e !important;
  color: white !important;
  padding: 0.75rem;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
  margin: 8px 0;
  border: 2px solid #fd8c3e !important; /* Added explicit border for ghost mode switching */
  transition: all 0.3s ease;
}

.cta-toggle-button:hover, .cta-toggle-button:focus {
  color: #fd8c3e !important;
  background: transparent !important;
}

/* --- UPDATE: Ghost Mode for Unselected Buttons --- */
.cta-toggle-button.ghost-mode {
    background: transparent !important;
    color: #fd8c3e !important;
    opacity: 0.7;
}

.cta-toggle-button.ghost-mode:hover {
    opacity: 1;
    background: rgba(253, 140, 62, 0.1) !important;
}

.error-message {
  color: red;
  font-size: 13px;
}
.success-message {
  color: #5cb85c;
  font-size: 13px;
  font-weight: bold;
}

.postal_code {
  margin-bottom: 0;
}

/* Firefox */
input[type=range]::-moz-range-track {
  background: #ddd;
  height: 8px;
  border-radius: 4px;
}
input[type=range]::-moz-range-progress {
  background-color: green;
  height: 8px;
}

/* Optional: remove focus outline */
input[type=range]:focus {
  outline: none;
}

.e-con .e-child:has(.mortgage-calculator),
.elementor-widget-shortcode:has(.mortgage-calculator),
.elementor-widget-container:has(.mortgage-calculator),
.elementor-shortcode:has(.mortgage-calculator) {
    height: auto !important;
}

.mortgage-extra {
  margin-bottom: 55px;
}

@supports (-webkit-touch-callout: none) {
  .e-con .e-child:has(.mortgage-calculator),
  .elementor-widget-shortcode:has(.mortgage-calculator),
  .elementor-widget-container:has(.mortgage-calculator),
  .elementor-shortcode:has(.mortgage-calculator) {
      height: auto !important;
  }
}