.re-mcalc{
--pj-summary-bg:#22183a;
}

.theme-purple{
--pj-summary-bg:#22183a;
}

.theme-navy{
--pj-summary-bg:#1a2b44;
}

.theme-gray{
--pj-summary-bg:#2b2b2b;
}

.re-mcalc__summary { background: var(--pj-summary-bg, #22183a); }

/* PRO: right panel text color */
.re-mcalc__summary{
  color: var(--pj-mcalc-right-fg, #ffffff);
}

/* Force children to inherit panel color */
.re-mcalc__summary *{
  color: inherit;
}

.re-sum__big { color:#fff; }
.re-sum__row div:last-child { color:#fff; }

/* Optional: ensure common text elements inherit nicely */
.re-mcalc__summary .re-sum__big,
.re-mcalc__summary .re-sum__sub,
.re-mcalc__summary .re-sum__row,
.re-mcalc__summary .re-sum__row div,
.re-mcalc__summary .re-savings,
.re-mcalc__summary a{
  color: inherit;
}
.re-mcalc {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f6f6f7;
  padding: 36px 28px;
}

.re-mcalc__header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.re-mcalc__title {
  font-size: clamp(28px, 3.4vw, 54px);
  font-weight: 300;
  letter-spacing: 0.2px;
  margin: 0;
  color: #222;
}

.re-mcalc__type {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.re-mcalc__layout {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.re-mcalc__controls {
  padding: 38px 34px;
  background: #fff;
}

.re-mcalc__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 40px;
align-items: start; 
}

.re-field--wide { grid-column: 1 / -1; }

.re-field__label {
  font-size: 16px;
  color: #444;
  margin-bottom: 10px;
}

.re-field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.re-field__value {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}

.re-field__value--stacked {
  font-size: 22px;
  font-weight: 700;
  margin-top: 0px;
  margin-bottom: 8px;
}

.re-field__moneyline {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.re-field__prefix {
  font-size: 22px;
  color: #777;
}

.re-input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 26px;
  font-weight: 500;
  color: #222;
  background: transparent;
  padding: 0;
}

.re-input--select {
  font-size: 24px;
  padding: 2px 0;
  appearance: auto;
}

.re-input--years {
  width: 100%;
}

input.re-input--years {
  margin-top: 5px;
}

.re-field {
  display: flex;
  flex-direction: column;
}

.re-field__moneyline {
  margin-top: auto;
}

.re-field__moneyline {
  margin-top: 5px;
}

.re-range--years {
  margin-top: 10px;
}



.re-field__underline {
  height: 2px;
  background: #e4e4e6;
  margin-top: 10px;
}

.re-field__sub {
  margin-top: 8px;
  font-size: 18px;
  color: #333;
}

.re-range {
  width: 100%;
  accent-color: var(--pj-summary-bg, #22183a);
}

.re-range--years {
  margin-top: 6px;
}

/* Right panel */
.re-mcalc__summary {
  background: var(--pj-summary-bg, #22183a);
  color: #fff;
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: start !important;
  height: 100%;
}

/* Safety: if any parent is flex-centered */
.re-mcalc__layout > *{
  align-self: start !important;
}

.re-sum__big {
  font-size: clamp(48px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.re-sum__sub {
  margin-top: 6px;
  letter-spacing: 6px;
  font-size: 14px;
  opacity: 0.6;
}

.re-sum__list {
  margin-top: 44px;
  display: grid;
  gap: 22px;
}

.re-sum__row {
  display: flex;
  justify-content: space-between;
  gap: 0px;
  font-size: 18px;
}

.re-sum__row > div:last-child {
  font-weight: 700;
  font-size: 22px;
}

.re-sum__divider {
  margin-top: 20px;
  height: 1px;
  background: rgba(255,255,255,0.18);
}

/* Responsive */
@media (max-width: 980px) {
  .re-mcalc__layout { grid-template-columns: 1fr; }
  .re-mcalc__grid2 { grid-template-columns: 1fr; }
}


.re-input--small {
  font-size: 18px;
  max-width: 180px;
}

.re-savings {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: grid;
  gap: 12px;
}

.re-savings__title {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.75;
}

.re-savings__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 16px;
}

.re-savings__row > div:last-child {
  font-weight: 700;
}

/* Schedule container */
.re-amort-wrap {
  margin-top: 20px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 16px;
}

.re-amort-title {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 10px;
}

/* Schedule table inside purple panel */
.re-amort-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.re-amort-wrap th, .re-amort-wrap td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  text-align: right;
}

.re-amort-wrap th:first-child,
.re-amort-wrap td:first-child {
  text-align: left;
}

/* Full-width amortization section below both columns */
.re-amort-below {
  background: #fff;
  border-radius: 8px;
  margin-top: 22px;
  padding: 18px 18px 10px;
  border: 1px solid #eee;
}

.re-amort-below__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}

.re-amort-below__title {
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #333;
  font-weight: 700;
}

.re-amort-below__note {
  font-size: 12px;
  color: #666;
}

/* Table */
.re-amort-below table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.re-amort-below th, .re-amort-below td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  text-align: right;
  white-space: nowrap;
}

.re-amort-below th:first-child,
.re-amort-below td:first-child {
  text-align: left;
}

/* Make it scroll nicely on small screens */
@media (max-width: 900px) {
  .re-amort-below__table {
    overflow-x: auto;
  }
  .re-amort-below table {
    min-width: 760px;
  }
}

/* Prevent number-width wiggle */
.re-mcalc { font-variant-numeric: tabular-nums; }

/* Keep the right-side value column stable */
.re-sum__row > div:last-child,
.re-savings__row > div:last-child {
  min-width: 140px;
  text-align: right;
}

/* "Disabled" row style (keeps space, no jump) */
.re-sum__row.is-disabled {
  opacity: 0.45;
}

/* Soft fade on value updates */
.re-fade {
  transition: opacity 160ms ease;
}
.re-fade.is-dim {
  opacity: 0.35;
}

/* Make the big total + right-side numbers eligible */
.re-sum__big,
.re-sum__row [data-out],
.re-savings [data-out],
.re-field [data-out] {
  transition: opacity 160ms ease;
}

.re-amort-below__table {
  max-height: 520px;
  overflow: auto;
}


/* Print button */
.re-print-btn {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}
.re-print-btn:hover {
  opacity: 0.9;
}

.re-print-header,
.re-print-inputs {
  display: none !important;
}

/* PDF capture mode: only affects the cloned content we generate */
html.re-pdf-capture body {
  background: #fff !important;
}

/* Make sure the amort table wrapper isn't clipped */
html.re-pdf-capture .re-amort-below__table {
  max-height: none !important;
  overflow: visible !important;
  height: auto !important;
}

/* Optional: avoid weird shadows/filters during capture */
html.re-pdf-capture * {
  animation: none !important;
  transition: none !important;
  filter: none !important;
}

html.re-pdf-capture .re-amort-below { page-break-before: always; }
html.re-pdf-capture * { animation: none !important; transition: none !important; }

/* Branding footer (bottom-left) */
.re-mcalc__controls{
  display: flex;
  flex-direction: column;
}

.pj-powered{
  margin-top: auto;         
  padding-top: 18px;
  font-size: 12px;
  color: #777;
  opacity: 0.85;
}

.pj-powered a{
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.pj-powered a:hover{
  text-decoration: underline;
}

.pj-swatch{ 
   position: relative; 
}

.pj-swatch:hover{
  border-color:#a7aaad;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

/* PRO override — must be last in the file */
.re-mcalc__summary,
.re-mcalc__summary .re-sum__big,
.re-mcalc__summary .re-sum__sub,
.re-mcalc__summary .re-sum__list,
.re-mcalc__summary .re-sum__row,
.re-mcalc__summary .re-sum__row > div,
.re-mcalc__summary .re-savings,
.re-mcalc__summary .re-savings *{
  color: var(--pj-mcalc-right-fg, #ffffff) !important;
}