*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.mm-lpc-calc-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.mm-lpc-card {
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

/* ── INPUT GRID ── */
.mm-lpc-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 24px;
}

.mm-lpc-field-label {
  font-size: 1rem;
  font-weight: 600;
  color: #444444;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}


.mm-lpc-input-box {
  display: flex;
  align-items: center;
  border: 1px solid #BABABA;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  height: 40px;
  max-height: 40px;
}

.mm-lpc-input-box .mm-lpc-prefix {
  color: #5D5D5D;
  margin-right: 4px;
  font-size: 14px;
}

.mm-lpc-input-box input {
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  background: transparent;
  color: #5D5D5D;
  font-weight: 600;
}

.mm-lpc-input-box input:focus {
  background: transparent;
}

.mm-lpc-input-box .mm-lpc-suffix {
  color: #5D5D5D;
  margin-left: 4px;
  font-size: 14px;
  white-space: nowrap;
}

/* sliders */
.mm-lpc-slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #5D5D5D;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, #105FA8 var(--pct, 50%), #ccc var(--pct, 50%));
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #105FA8;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

/* down payment dual inputs */
.mm-lpc-dp-inputs {
  display: flex;
  gap: 8px;
}

.mm-lpc-dp-inputs .mm-lpc-input-box:first-child {
  flex: 2;
}

.mm-lpc-dp-inputs .mm-lpc-input-box:last-child {
  flex: 1;
}

/* link button */


/* select */
select {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid #BABABA;
  border-radius: 6px;
  padding: 7px 32px 7px 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
  color: #5D5D5D;
  height: 40px;
  max-height: 40px;
  width: 100%;
  font-weight: 600;
}

select:focus {
  outline: 2px solid #003A70;
}

/* extra payment row */
.mm-lpc-extra-payment-row {
  display: flex;
  gap: 8px;
}

.mm-lpc-extra-payment-row .mm-lpc-input-box {
  flex: 1;
}

.mm-lpc-extra-payment-row select {
  flex: 1;
  width: auto;
}

/* property tax dual */
.mm-lpc-tax-inputs {
  display: flex;
  gap: 8px;
}

.mm-lpc-tax-inputs .mm-lpc-input-box:first-child {
  flex: 2;
}

.mm-lpc-tax-inputs .mm-lpc-input-box:last-child {
  flex: 1;
}

/* hoa dual */
.mm-lpc-hoa-row {
  display: flex;
  gap: 8px;
}

.mm-lpc-hoa-row .mm-lpc-input-box {
  flex: 1;
}

.mm-lpc-hoa-row select {
  flex: 1;
  width: auto;
}

/* ── SAVINGS BANNER ── */




/* ── TABS + RESULTS ── */
.mm-lpc-results-area {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
  border: 1px solid #E5E5E5;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.mm-lpc-left-panel {
  border-right: 1px solid #E5E5E5;
}

.mm-lpc-tabs {
  display: flex;
  border-bottom: 1px solid #E5E5E5;
}

.mm-lpc-tab-btn {
  flex: 1;
  padding: 11px 12px;
  border: none;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  color: #105FA8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-right: 1px solid #E5E5E5;
  transition: background 0.15s;
}

.mm-lpc-tab-btn:last-child {
  border-right: none;
}

.mm-lpc-tab-btn:hover {
  background: #F4F9FC;
  color: #105FA8;
}

.mm-lpc-tab-btn.mm-lpc-active {
  background: #003A70;
  color: #fff;
}

/* tab panels */
.mm-lpc-tab-panel {
  display: none;
  padding: 20px 20px 4px;
}

.mm-lpc-tab-panel.mm-lpc-active {
  display: block;
}

/* loan summary */
.mm-lpc-summary-table {
  width: 100%;
  border-collapse: collapse;
  border-width: 0px;
}

.mm-lpc-summary-table tr td {
  padding: 8px 4px;
  font-size: 14px;
  border-bottom: 1px solid #E5E5E5;
  border-left: 0px;
  border-right: 0px;
}

.mm-lpc-summary-table tr td:first-child {
  color: #555;
}

.mm-lpc-summary-table tr td:last-child {
  text-align: right;
  font-weight: 600;
}

.mm-lpc-summary-table tr:last-child td {
  border-bottom: none;
}

/* amortization table */
.mm-lpc-amort-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.mm-lpc-amort-table {
  width: 100%;
  border-collapse: collapse;
  border-width: 0px;
  font-size: 13px;
}

.mm-lpc-amort-table th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 2px solid #E5E5E5;
  border-right: 0px;
  border-left: 0px;
  font-weight: 700;
  color: #333;
  font-size: 13px;
}

.mm-lpc-amort-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #E5E5E5;
  border-left: 0px;
  border-right: 0px;
  color: #333;
}

.mm-lpc-amort-table tr:nth-child(even) td {
  background: #fafafa;
}

.mm-lpc-amort-table td:not(:first-child) {
  text-align: right;
}

.mm-lpc-amort-table th:not(:first-child) {
  text-align: right;
}

.mm-lpc-amort-scroll {
  max-height: 460px;
  overflow-y: auto;
}


/* right panel — PITI */
.mm-lpc-piti-panel {
  width: 100%;
  padding: 20px 20px;
  text-align: center;
  flex-shrink: 0;
}

.mm-lpc-piti-title {
  font-size: 14px;
  color: #ffffff;
  background: #105FA8;
  padding-top: 10px;
  border-radius: 8px 8px 0px 0px;
}

.mm-lpc-piti-amount {
  font-size: 52px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  padding-bottom: 2px;
  background: #105FA8;
}

.mm-lpc-piti-amount sup {
  font-size: 28px;
  vertical-align: super;
}

.mm-lpc-piti-monthly {
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  background: #105FA8;
  border-radius: 0px 0px 8px 8px;
}

.mm-lpc-piti-divider {
  border: none;
  margin: 12px 0 0;
}

.mm-lpc-piti-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 5px 0;
  border-top: 1px solid #E5E5E5;
}

.mm-lpc-piti-row .mm-lpc-label {
  color: #444;
  font-weight: 700;
}

.mm-lpc-piti-row .mm-lpc-value {
  font-weight: 600;
  color: #222;
}

.mm-lpc-loan-amount-block {
  margin: 10px 0 14px;
  padding: 10px 14px 14px;
  background: #f7f7f7;
  border-radius: 8px;
}

.mm-lpc-loan-amount-label {
  font-size: 13px;
  color: #5D5D5D;
  margin-bottom: 2px;
}

.mm-lpc-loan-amount-value {
  font-size: 30px;
  font-weight: 700;
  color: #003A70;
}

.mm-lpc-loan-amount-value sup {
  font-size: 16px;
  vertical-align: super;
}

.mm-lpc-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 5px 0;
  border-top: 1px solid #E5E5E5;
}

.mm-lpc-detail-row .mm-lpc-label {
  font-weight: 700;
}

/* ── RESPONSIVE / MOBILE ── */
@media (max-width: 700px) {
  .mm-lpc-inputs-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* savings block sits below extra payment naturally in single col */
  .mm-lpc-savings-block {
    padding-bottom: 0;
  }

  .mm-lpc-savings-inner {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center;
    gap: 20px !important;
    width: 100%;
  }

  .mm-lpc-savings-item-row {
    align-items: center !important;
    gap: 5px !important;
  }

  .mm-lpc-savings-label {
    font-size: 13px !important;
  }

  .mm-lpc-savings-value-num {
    font-size: 16px !important;
  }

  .mm-lpc-results-area {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  .mm-lpc-left-panel {
    border-right: none;
    border-bottom: 1px solid #E5E5E5;
    order: 2;
  }

  .mm-lpc-piti-panel {
    width: 100%;
    border-top: none;
    padding: 20px 16px;
    order: 1;
  }

  .mm-lpc-tabs {
    flex-wrap: wrap;
  }

  .mm-lpc-tab-btn {
    font-size: 12.5px;
    padding: 10px 8px;
  }

  .mm-lpc-dp-inputs,
  .mm-lpc-tax-inputs,
  .mm-lpc-extra-payment-row,
  .mm-lpc-hoa-row {
    gap: 8px;
  }

  .mm-lpc-piti-amount {
    font-size: 42px;
  }
}