/* Bludian Realty Calculator - Finalized Clean CSS */

#mortgage-calculator {
  max-width: 650px;
  margin: 10px auto;
  font-family: 'Helvetica Neue', sans-serif;
  padding: 10px 20px 20px 20px;
  border: 0.5px solid #000000;
  border-radius: 30px;
  box-shadow: 0px 1px 0.5px 1px rgba(0,0,0,0.1);
}

.mc-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.mc-row.email-row {
  margin-bottom: 0;
}

.mc-row label {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
  color: inherit;
  margin-bottom: 0 !important;
}

.mc-row input[type="number"] {
  margin-top: 0 !important;
}

input[type="number"],
input[type="email"],
select {
  width: 100%;
  padding: 8px 0 !important;
  font-size: 16px;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-bottom: 2px solid #ccc !important;
  border-radius: 0 !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
input[type="number"] {
  -moz-appearance: textfield !important;
}

/* ——— Sliders (native CSS gradient fill) ——— */
.slider-container {
  position: relative;
  width: 100%;
  height: 28px;
  margin-top: 10px;
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  background: #ccc;
  background-image: linear-gradient(#0c4a8c, #0c4a8c);
  background-repeat: no-repeat;
  background-size: 0% 100%; /* updated via JS */
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
}

/* Hide native track for WebKit and Blink */
.slider-container input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
}

/* Thumb styling */
.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -6px;
  background: #003366;
  border-radius: 50%;
  cursor: pointer;
}

/* Firefox track & progress styling */
.slider-container input[type="range"]::-moz-range-track {
  background: #ccc;
  height: 8px;
  border-radius: 4px;
}
.slider-container input[type="range"]::-moz-range-progress {
  background: #0c4a8c;
  height: 8px;
  border-radius: 4px;
}
.slider-container input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #003366;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}
/* ———————————————————————————————— */

.compact-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.compact-field span {
  flex-shrink: 0;
  min-width: 50px;
  font-weight: 500;
  font-size: 14px;
  color: inherit;
}

#paymentResult {
  text-align: center;
  margin-top: 40px;
}
.payment-box {
  background: #0c4a8c;
  color: white;
  padding: 15px 20px;
  font-size: 2.2rem;
  font-weight: bold;
  border-radius: 8px;
  max-width: 700px;
  margin: 0 auto;
}
#monthlyPayment {
  font-size: 2rem;
  font-weight: bold;
}
.payment-box .label {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 4px !important;
  color: rgba(255,255,255,0.8);
}

.breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin: -10px 0 15px;
  width: 100%;
}
.breakdown .break-row {
  flex: 1 1 48%;
  display: flex;
  align-items: center;
  font-weight: 600;
  gap: 8px;
}
.breakdown .break-row span,
.breakdown .break-row strong {
  font-size: 1.2rem;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0 !important;
}
.money-input .prefix {
  font-weight: bold;
  font-size: 18px;
  line-height: 1;
  color: inherit;
}

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
}
.email-label {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.email-label input[type="email"] {
  margin-top: 6px;
}

#sendBtn {
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
  margin-top: 10px;
}
#sendBtn:hover {
  filter: brightness(0.9);
}

.inline-breakdown {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}
.inline-breakdown .break-row {
  flex: 1 1 48%;
  display: flex;
  align-items: center;
}
.email-row .inline-breakdown {
  order: -1;
}

/* Space out the Down Payment label and dollar amount */
.dp-header {
  display: flex;
  align-items: center;
  gap: 0px;
}

/* Optional tweak */
#downPaymentAmount {
  margin-left: 16px;
}