/* rates-tool.css — VA Rate & Payment Calculator + 3-Lender Worksheet
   VALN · Claude-era tool build · October 2026 */

/* ── Shared ────────────────────────────────────────────── */

.rt-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a2b42;
  line-height: 1.5;
}

.rt-wrap *,
.rt-wrap *::before,
.rt-wrap *::after {
  box-sizing: border-box;
}

.rt-head {
  background: linear-gradient(135deg, #0d1f3c 0%, #1a3a6a 100%);
  color: #fff;
  padding: 24px 28px 20px;
  border-radius: 12px 12px 0 0;
}

.rt-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
}

.rt-subtitle {
  font-size: 13px;
  color: #b4c7df;
  margin: 0;
}

.rt-body {
  background: #fff;
  border: 1px solid #d4dce8;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 24px 28px 28px;
}

.rt-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #3d5068;
  margin-bottom: 6px;
}

.rt-note {
  font-size: 12px;
  color: #7a8da3;
  margin-top: 4px;
}

/* ── Calculator ────────────────────────────────────────── */

.rc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.rc-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #c9d4e2;
  border-radius: 8px;
  font-size: 16px;
  color: #1a2b42;
  background: #f8fafd;
  transition: border-color 0.15s;
}

.rc-input:focus {
  outline: none;
  border-color: #1a5fb4;
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.12);
}

.rc-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.rc-rate-btn,
.rc-term-btn {
  padding: 7px 16px;
  border: 1px solid #c9d4e2;
  border-radius: 20px;
  background: #f0f4f9;
  color: #3d5068;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.rc-rate-btn:hover,
.rc-term-btn:hover {
  background: #e2e9f2;
  border-color: #9ab0c9;
}

.rc-rate-btn.active,
.rc-term-btn.active {
  background: #1a5fb4;
  border-color: #1a5fb4;
  color: #fff;
}

/* Results */

.rc-results {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e4eaf1;
}

.rc-result-card {
  text-align: center;
  padding: 16px 12px;
  background: #f4f7fb;
  border-radius: 10px;
}

.rc-result-label {
  font-size: 12px;
  font-weight: 600;
  color: #5e7189;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.rc-result-value {
  font-size: 28px;
  font-weight: 800;
  color: #0d1f3c;
  line-height: 1.15;
}

.rc-result-card:first-child {
  background: #eaf1fa;
}

.rc-result-card:first-child .rc-result-value {
  color: #1a5fb4;
}

/* ── 3-Lender Worksheet ───────────────────────────────── */

.ws-disclaimer {
  background: #f0f4f9;
  border: 1px solid #d4dce8;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #3d5068;
}

.ws-shared-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.ws-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.ws-table th {
  background: #eaf0f8;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: #1a2b42;
  border-bottom: 2px solid #c9d4e2;
}

.ws-table th:first-child {
  border-radius: 8px 0 0 0;
  width: 160px;
}

.ws-table th:last-child {
  border-radius: 0 8px 0 0;
}

.ws-table td {
  padding: 8px 14px;
  border-bottom: 1px solid #e4eaf1;
  vertical-align: middle;
}

.ws-table tr:last-child td {
  border-bottom: none;
}

.ws-table .ws-row-label {
  font-weight: 600;
  color: #3d5068;
  font-size: 13px;
}

.ws-table input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #c9d4e2;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.ws-table input:focus {
  outline: none;
  border-color: #1a5fb4;
  box-shadow: 0 0 0 2px rgba(26, 95, 180, 0.12);
}

.ws-table .ws-computed {
  font-weight: 700;
  font-size: 15px;
  color: #1a2b42;
}

.ws-table .ws-row-total td {
  background: #f0f5fb;
  font-weight: 700;
  border-top: 2px solid #c9d4e2;
  padding-top: 12px;
  padding-bottom: 12px;
}

.ws-best {
  color: #0e6e38 !important;
  background: #e6f5ec !important;
  border-radius: 6px;
  padding: 4px 8px;
}

/* ── Disclosure bar ────────────────────────────────────── */

.rt-disclosure {
  margin-top: 16px;
  padding: 12px 16px;
  background: #f8f9fb;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  font-size: 12px;
  color: #5e7189;
  line-height: 1.6;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 640px) {
  .rc-grid {
    grid-template-columns: 1fr;
  }
  .rc-results {
    grid-template-columns: 1fr;
  }
  .rc-result-value {
    font-size: 24px;
  }
  .ws-shared-row {
    grid-template-columns: 1fr;
  }
  .ws-table {
    display: block;
    overflow-x: auto;
  }
  .rt-body {
    padding: 16px 18px 20px;
  }
  .rt-head {
    padding: 18px 18px 14px;
  }
}
