/* ============================================================
   hcalc-refi.css — SLRC Calculator styles
   All rules are scoped under .slrc-wrap to guarantee higher
   specificity than WordPress theme overrides.
   ============================================================ */

.slrc-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.slrc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  color: #1a1a2e;
  padding: 24px 16px;
  min-width: 320px;
}

.slrc-wrap .slrc-grid {
  display: flex;
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
  align-items: flex-start;
}

.slrc-wrap .slrc-left {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slrc-wrap .slrc-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Cards */
.slrc-wrap .slrc-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 12px rgba(2, 121, 116, .07), 0 1px 3px rgba(0, 0, 0, .06);
}

.slrc-wrap .slrc-card--impact {
  border: 2.5px solid #1a1a2e;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .13), 0 1px 4px rgba(0, 0, 0, .08);
}

/* Headings */
.slrc-wrap .slrc-heading {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: var(--awb-color5);
  outline: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
  display: inline-block;
  margin-bottom: 0;
  line-height: 1.3 !important;
}

.slrc-wrap h2.slrc-heading {
  font-family: var(--h2_typography-font-family);
}

.slrc-wrap .slrc-heading:hover,
.slrc-wrap .slrc-heading:focus {
  border-bottom-color: transparent;
}

.slrc-wrap .slrc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.slrc-wrap .slrc-add-btn {
  flex-shrink: 0;
  background: transparent !important;
  border: 2px solid var(--awb-color5) !important;
  border-radius: 8px;
  color: var(--awb-color5) !important;
  font-size: 13px !important;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: background .18s, color .18s;
  white-space: nowrap;
  line-height: normal;
  text-decoration: none;
}

.slrc-wrap .slrc-add-btn:hover {
  background: var(--awb-color5) !important;
  color: #fff !important;
}

.slrc-wrap .slrc-reset-btn {
  flex-shrink: 0;
  background: transparent !important;
  border: none !important;
  color: #9a9ab0 !important;
  font-size: 12.5px !important;
  font-weight: 500;
  padding: 5px 4px;
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
  transition: color .18s;
  line-height: normal;
}

.slrc-wrap .slrc-reset-btn:hover {
  color: var(--awb-color5) !important;
}

.slrc-wrap .slrc-divider {
  height: 1px;
  background: #ebebf5;
  margin: 12px 0 16px;
}

/* Loan rows */
.slrc-wrap .slrc-loan-header,
.slrc-wrap .slrc-loan-row {
  display: grid;
  grid-template-columns: 27fr 15fr 21fr 23fr 7fr;
  align-items: center;
  gap: 0 6px;
}

.slrc-wrap .slrc-loan-header {
  margin-bottom: 8px;
}

.slrc-wrap .slrc-loan-row {
  margin-bottom: 6px;
}

.slrc-wrap .slrc-col-hdr {
  font-size: 11px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #7a7a9a !important;
  line-height: 1.3;
  padding-right: 4px;
}

.slrc-wrap .slrc-col-hdr.pmt {
  padding-right: 12px;
}

.slrc-wrap .slrc-loan-cell {
  min-width: 0;
  padding-right: 4px;
}

.slrc-wrap .slrc-loan-cell.pmt {
  padding-right: 12px;
}

.slrc-wrap .slrc-loan-cell.del {
  padding-right: 0;
  text-align: right;
}

/* Inputs */
.slrc-wrap .slrc-input {
  width: 100%;
  border: 1.5px solid #dcdcec !important;
  border-radius: 8px;
  padding: 7px 9px !important;
  font-size: 13.5px !important;
  color: #1a1a2e !important;
  background: #fafafe !important;
  transition: border-color .2s, box-shadow .2s;
  -moz-appearance: textfield;
  box-shadow: none;
}

.slrc-wrap .slrc-input::-webkit-outer-spin-button,
.slrc-wrap .slrc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.slrc-wrap .slrc-input::placeholder {
  color: #1a1a2e !important;
  opacity: 1;
}

.slrc-wrap .slrc-input::-webkit-input-placeholder {
  color: #1a1a2e !important;
  opacity: 1;
}

.slrc-wrap .slrc-input::-moz-placeholder {
  color: #1a1a2e !important;
  opacity: 1;
}

.slrc-wrap .slrc-input:-ms-input-placeholder {
  color: #1a1a2e !important;
}

.slrc-wrap .slrc-input:focus {
  outline: none;
  border-color: var(--awb-color5) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--awb-color5) 10%, transparent) !important;
}

.slrc-wrap .slrc-input:disabled {
  opacity: .5;
  cursor: not-allowed;
  background: #f0f0f8 !important;
}

.slrc-wrap .slrc-input.slrc-invalid {
  border-color: #f59e0b !important;
  background: #fffbf0 !important;
}

.slrc-wrap .slrc-input.slrc-pmt-auto {
  background: #f3f1fa !important;
  color: #4a4a6a !important;
  font-weight: 600;
  cursor: default;
  border-style: dashed;
}

.slrc-wrap .slrc-input.slrc-invalid:focus {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .15) !important;
}

.slrc-wrap .slrc-input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.slrc-wrap .slrc-input-prefix .slrc-sym {
  position: absolute;
  left: 9px;
  color: #7a7a9a !important;
  font-size: 13px !important;
  pointer-events: none;
}

.slrc-wrap .slrc-input-prefix .slrc-input {
  padding-left: 20px !important;
}

.slrc-wrap .slrc-input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.slrc-wrap .slrc-input-suffix .slrc-sym {
  position: absolute;
  right: 9px;
  color: #7a7a9a !important;
  font-size: 13px !important;
  pointer-events: none;
}

.slrc-wrap .slrc-input-suffix .slrc-input {
  padding-right: 24px !important;
}

.slrc-wrap .slrc-delete-btn {
  background: none !important;
  border: none !important;
  cursor: pointer;
  color: #bbb !important;
  padding: 5px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  line-height: 1;
}

.slrc-wrap .slrc-delete-btn:hover {
  color: #e05252 !important;
  background: #fff0f0 !important;
}

/* Refi form */
.slrc-wrap .slrc-refi-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.slrc-wrap .slrc-refi-group {
  flex: 1 1 0;
}

.slrc-wrap .slrc-label {
  display: block;
  font-size: 12px !important;
  font-weight: 600;
  color: #4a4a6a !important;
  margin-bottom: 5px;
}

.slrc-wrap .slrc-select {
  width: 100%;
  border: 1.5px solid #dcdcec !important;
  border-radius: 8px;
  padding: 8px 28px 8px 11px !important;
  font-size: 13.5px !important;
  color: #1a1a2e !important;
  background: #fafafe 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='%237a7a9a' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}

.slrc-wrap .slrc-select:focus {
  outline: none;
  border-color: var(--awb-color5) !important;
  box-shadow: 0 0 0 3px rgba(2, 121, 116, .1) !important;
}

.slrc-wrap .slrc-rate-box {
  border: 1.5px solid #dcdcec;
  border-radius: 8px;
  padding: 7px 12px;
  background: #fafafe;
}

.slrc-wrap .slrc-radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  cursor: pointer;
  position: relative;
}

.slrc-wrap .slrc-radio-row input[type="radio"] {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid #b8b8cc !important;
  border-radius: 50% !important;
  background: #fff !important;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: none !important;
  outline: none !important;
}

.slrc-wrap .slrc-radio-row.slrc-checked input[type="radio"] {
  border-color: var(--awb-color5) !important;
}

.slrc-wrap .slrc-radio-row.slrc-checked::before {
  content: "" !important;
  position: absolute;
  left: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--awb-color5) !important;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.slrc-wrap .slrc-radio-row span {
  font-size: 13.5px !important;
  color: #1a1a2e !important;
}

.slrc-wrap .slrc-disclaimer-italic {
  font-size: 10.5px !important;
  color: #7a7a9a !important;
  font-style: italic;
  margin-bottom: 12px;
}

.slrc-wrap .slrc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid #ebebf5;
  padding-top: 12px;
  margin-top: 2px;
}

.slrc-wrap .slrc-total-label {
  font-size: 13.5px !important;
  color: #4a4a6a !important;
  font-weight: 500;
}

.slrc-wrap .slrc-total-value {
  font-size: 17px !important;
  font-weight: 700;
  color: #1a1a2e !important;
}

/* Estimated Impact */
.slrc-wrap .slrc-impact-sublabel {
  font-size: 11.5px !important;
  color: #7a7a9a !important;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.slrc-wrap .slrc-payment-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.slrc-wrap .slrc-new-payment {
  font-size: 42px !important;
  font-weight: 800;
  color: #1a1a2e !important;
  line-height: 1;
  transition: color .3s;
}

.slrc-wrap .slrc-new-payment.is-lower {
  color: #16a34a !important;
}

.slrc-wrap .slrc-new-payment.is-higher {
  color: #dc2626 !important;
}

.slrc-wrap .slrc-old-payment {
  font-size: 17px !important;
  font-weight: 500;
  color: #9a9ab0 !important;
  text-decoration: line-through;
}

.slrc-wrap .slrc-monthly-diff {
  display: block;
  font-size: 13px !important;
  font-weight: 600;
  margin-bottom: 16px;
  min-height: 18px;
}

.slrc-wrap .slrc-monthly-diff.is-lower {
  color: #16a34a !important;
}

.slrc-wrap .slrc-monthly-diff.is-higher {
  color: #dc2626 !important;
}

.slrc-wrap .slrc-monthly-diff.is-same {
  color: #7a7a9a !important;
}

.slrc-wrap .slrc-costs-section {
  margin-bottom: 16px;
}

.slrc-wrap .slrc-cost-row {
  margin-bottom: 10px;
}

.slrc-wrap .slrc-cost-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.slrc-wrap .slrc-cost-label {
  font-size: 13px !important;
  color: #4a4a6a !important;
  font-weight: 500;
}

.slrc-wrap .slrc-cost-amount {
  font-size: 13px !important;
  font-weight: 700;
  color: #1a1a2e !important;
}

.slrc-wrap .slrc-bar-track {
  height: 8px;
  background: #f0f0f8;
  border-radius: 99px;
  overflow: hidden;
}

.slrc-wrap .slrc-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
}

.slrc-wrap .slrc-bar-fill.current {
  background: #1a1a2e;
}

.slrc-wrap .slrc-bar-fill.new-cost {
  background: #16a34a;
}

.slrc-wrap .slrc-summary-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.slrc-wrap .slrc-summary-box {
  border: 1.5px solid #ebebf5;
  border-radius: 10px;
  padding: 11px 13px;
  background: #fafafe;
}

.slrc-wrap .slrc-summary-box-label {
  font-size: 11px !important;
  color: #7a7a9a !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 6px;
  line-height: 1.3;
}

.slrc-wrap .slrc-summary-box-value {
  font-size: 17px !important;
  font-weight: 800;
  line-height: 1;
}

.slrc-wrap .slrc-summary-box-value.negative {
  color: #dc2626 !important;
}

.slrc-wrap .slrc-summary-box-value.positive {
  color: #16a34a !important;
}

.slrc-wrap .slrc-summary-box-value.neutral {
  color: #1a1a2e !important;
}

.slrc-wrap .slrc-poor-warning {
  background: color-mix(in srgb, var(--awb-color5) 10%, transparent);
  border: 1.5px solid var(--awb-color5);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 4px;
}

.slrc-wrap .slrc-poor-warning p {
  font-size: 13px !important;
  color: var(--awb-color5) !important;
  font-style: italic;
  line-height: 1.6;
}

.slrc-wrap .slrc-estimates-note {
  font-size: 11px !important;
  color: #aaa !important;
  text-align: center;
}

/* Apply card */
.slrc-wrap .slrc-apply-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(2, 121, 116, .07), 0 1px 3px rgba(0, 0, 0, .06);
  text-align: center;
}

.slrc-wrap .slrc-apply-desc {
  font-size: 13px !important;
  color: #4a4a6a !important;
  line-height: 1.55;
  margin-bottom: 14px;
}

.slrc-wrap .slrc-apply-btn {
  display: block;
  width: 100%;
  padding: 13px 20px !important;
  background: var(--awb-color5) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  letter-spacing: .02em;
  transition: background .2s, transform .1s;
  outline: none;
}

.slrc-wrap .slrc-apply-btn:hover {
  background: var(--button_gradient_top_color_hover) !important;
  color: var(--button_accent_hover_color, var(--button_accent_color));
  transform: translateY(-1px);
  border-color: var(--button_border_hover_color);
}

.slrc-wrap .slrc-apply-btn:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 760px) {
  .slrc-wrap .slrc-grid {
    flex-direction: column;
  }

  .slrc-wrap .slrc-refi-row {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .slrc-wrap .slrc-card {
    padding: 14px 12px;
  }

  .slrc-wrap .slrc-new-payment {
    font-size: 34px !important;
  }
}