/* Form */

.form-row input[type=number] {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.form-row select {
  flex: 1;
  min-width: 0;   /* flex items default to min-width:auto, which kept this select
                     from shrinking below its longest option and pushed it out of .main-col */
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  cursor: pointer;
}

.form-unit {
  font-size: 13px;
  color: #999;
  flex-shrink: 0;
  width: 20px;
}

/* Loan repayment schedule */
.loan-schedule-wrap { margin-top: 16px; }
.loan-schedule-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.loan-schedule {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #eee;
  border-radius: 6px;
}
.loan-schedule table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.loan-schedule th,
.loan-schedule td {
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
}
.loan-schedule th:first-child,
.loan-schedule td:first-child {
  text-align: center;
}
.loan-schedule thead th {
  position: sticky;
  top: 0;
  background: #f8f8f8;
  color: #666;
  font-weight: 600;
  border-bottom: 1px solid #eee;
}
.loan-schedule tbody tr:nth-child(even) { background: #fafafa; }
.loan-schedule tbody td {
  border-bottom: 1px solid #f5f5f5;
  font-family: 'Consolas', monospace;
}

.footnote {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
  padding: 0 4px;
}

/* Result */

.result-main {
  font-size: 32px;
  font-weight: 700;
  color: #0078d4;
  font-family: 'Consolas', monospace;
  line-height: 1.2;
  word-break: break-all;
}
.result-unit {
  font-size: 16px;
  color: #5a9fd4;
  margin-left: 4px;
}
.result-sub {
  margin-top: 10px;
  font-size: 13px;
  color: #666;
  line-height: 1.8;
}
.result-sub span {
  display: inline-block;
  background: #fff;
  border: 1px solid #d0e1fb;
  border-radius: 4px;
  padding: 2px 10px;
  margin: 2px 4px;
  font-weight: 600;
  color: #0078d4;
}
