Mortgage Calculator Prototype body { margin: 0; padding: 50px 30px; color: #111; font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.4; background: #f3f3f3; } a { color: #005b9d; text-decoration: none; } a:hover { text-decoration: underline; } h5, label { display: block; margin: 0; padding: 0; font-weight: 700; font-size: 0.875em; } label { margin-bottom: 6px; } :focus { outline: none; } /* calculator */ #calculator, #calculator * { box-sizing: border-box; } #calculator { display: flex; flex-wrap: wrap; border: solid 1px #ddd; background: #fff; margin: 0 auto; padding: 40px 0; min-height: 521px; max-width: 1040px; } /* inputs */ #inputs { width: 33.333%; padding: 0 30px; display: flex; flex-wrap: wrap; align-content: flex-start; transition: opacity 400ms; opacity: 0; } .input-group { width: 100%; } input[type=text], select { width: 100%; height: 44px; color: #333; font-family: inherit; font-size: 16px; line-height: 24px; padding: 9px; margin: 0 0 24px; background: #f5f5f5; border: solid 1px #e6e6e6; border-radius: 0; -webkit-appearance: none; -moz-appearance: none; appearance: none; -webkit-transition : border 200ms; -moz-transition : border 200ms; -o-transition : border 200ms; transition : border 200ms; } input[type=text]:focus { border-color: #bdbdbd; } select { border: none; background: transparent; height: 42px; margin: 0; padding: 0 9px; position: relative; z-index: 10; cursor: pointer; outline: none !important; } input[type=range] { -webkit-appearance: none; -moz-appearance: none; appearance: none; width: 100%; margin: 0 0 26px; } input[type=range]:focus { outline: none; } /* we need to repeat a few times below for webkit, firefox, and ie separately, because commas don't always play nice with the these ::-vendor-hyphen-prefixs */ /* webkit */ input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6px; cursor: pointer; background: #e6e6e6; border-radius: 3px; border: 0px; } input[type=range]::-webkit-slider-thumb { border: 0px; height: 16px; width: 16px; border-radius: 50%; background: #01579b; cursor: pointer; -webkit-appearance: none; appearance: none; margin-top: -5px; } /* firefox - not tested */ input[type=range]::-moz-range-track { width: 100%; height: 6px; cursor: pointer; background: #e6e6e6; border-radius: 3px; border: 0px; } input[type=range]::-moz-range-thumb { border: 0px; height: 16px; width: 16px; border-radius: 50%; background: #01579b; cursor: pointer; -moz-appearance: none; appearance: none; margin-top: -5px; } /* ie - not tested */ input[type=range]::-ms-track { width: 100%; height: 6px; cursor: pointer; border-radius: 3px; border: 0px; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #e6e6e6; border: 0; border-radius: 50%; box-shadow: none; } input[type=range]::-ms-fill-upper { background: #e6e6e6; border: 0; border-radius: 50%; box-shadow: none; } input[type=range]::-ms-thumb { box-shadow: none; border: 0px; height: 16px; width: 16px; border-radius: 50%; background: #01579b; cursor: pointer; margin-top: -5px; } #rate > div { position: relative; } #rate > div::after { content: "%"; color: #bdbdbd; font-weight: 700; font-size: 14px; line-height: 43px; top: 0; right: 9px; position: absolute; display: block; z-index: 10; } #term > div { position: relative; background: #f5f5f5; border: solid 1px #e6e6e6; margin: 0 0 24px; } #term > div:before, #term > div:after { content: ''; position: absolute; top: 13px; right: 9px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #ccc; } #term > div:after { border-top: solid 7px #ccc; border-bottom: none; margin-top: 9px; } #save { align-self: flex-end; } button { border: 0; height: 44px; color: #fff; font-weight: 600; font-size: 13px; line-height: 43px; background: #01579b; text-align: center; display: inline-block; width: 100%; margin: 0; overflow: hidden; cursor: pointer; transition: background 400ms; border-radius: 3px; } button:hover { background: #01376b; } /* results */ #results { display: flex; flex-wrap: wrap; width: 66.6666%; transition: opacity 400ms; opacity: 0; } /* details */ #details { list-style-type: none; border-left: solid 1px #e6e6e6; margin: 0; padding: 0 30px; width: 50%; } #details li { padding: 0 0 10px; margin: 0 0 10px; border-bottom: dotted 1px #ddd; } #details li:first-child div { font-weight: 200; font-size: 2.5em; line-height: 1; overflow: hidden; text-overflow: ellipsis; margin: 6px 0 24px; } #details li:last-child { color: #888; font-size: 0.875em; border: 0; margin: 0; padding: 0; } /* chart */ #chart { width: 50%; margin: 0; padding: 0 20px; border-left: solid 1px #e6e6e6; } #chart > div { margin: 0 auto; max-width: 280px; } /* medium */ @media (max-width: 768px) { body { padding: 20px; } #calculator { padding: 0 0 30px; } #inputs { border-bottom: solid 1px #e6e6e6; padding: 30px 20px 6px; margin-bottom: 30px; width: 100%; background: #f8f8f8; } input[type=text] { background: #fff; border-color: #ddd; } input[type=range] { margin: 18px 0 0; } #price, #upfront { width: calc(50% - 20px); margin: 0 10px; } #rate, #term, #save { width: calc(33.3333% - 20px); margin: 0 10px; } #term > div { background: #fff; border: solid 1px #ddd; } button { margin-bottom: 24px; } #results { width: 100%; } #details { border: 0; } } /* small */ @media (max-width: 576px) { body { padding: 15px; } #calculator { padding: 0; } #inputs { padding: 20px 20px 0; margin-bottom: 20px; } input[type=range] { margin: 0 0 26px; } input[type=range]::-webkit-slider-thumb { height: 22px; width: 22px; margin-top: -8px; } input[type=range]::-moz-range-thumb { height: 22px; width: 22px; margin-top: -8px; } input[type=range]::-ms-thumb { height: 22px; width: 22px; margin-top: -8px; } #price, #upfront { width: 100%; margin: 0; } #rate { width: calc(40% - 10px); margin: 0 10px 0 0; } #term { width: calc(60% - 10px); margin: 0 0 0 10px; } #save { width: 100%; margin: 0; } #results { flex-direction: column-reverse; } #details { width: 100%; padding: 20px; border-top: solid 1px #e6e6e6; } #details li:first-child div { margin-bottom: 2px; } #chart { width: 100%; padding-bottom: 20px; border: 0; } } /* visibility */ [v-cloak] { display: none; } .visible { opacity: 1 !important; }
  • Monthly payment*
  • Total payments
    {{ months }} monthly payments
    ––
  • Down payment ({{ upfront }}%)
  • Principal
  • Total interest paid
  • Total mortgage cost*
  • *Estimated, not including taxes and insurance.