/* Loan-widget wizard styles — extracted from trustpointloans/assets/css/app.css.
   Self-contained so any brand can ship the wizard by including the modal +
   linking this stylesheet. Update by re-extracting from the trustpoint source. */

/* Brand-variable aliases. The trustpoint stylesheet uses a `--color-*` token
   scheme; quick5k uses `--ink`, `--navy`, `--green-cta`, etc. Map them here
   so we don't have to find/replace inside the extracted rules below. */
:root {
  --color-ink: var(--ink, #0b1530);
  --color-sub-ink: var(--ink-3, #5a6386);
  --color-accent: var(--green-cta, #0f8b47);
  --color-accent-bright: var(--green-deep, #14a85e);
  --color-accent-pale: var(--green-soft, #ecfbf1);
  --color-brand: var(--navy, #0e2452);
  --color-brand-deep: var(--navy-deep, #06163b);
  --color-band-6: var(--bg-soft, #f4f6fb);
  --color-border-soft: var(--ink-line, #dde1ec);
  --color-rule-soft: var(--ink-line, #dde1ec);
  --font-display: var(--font-sans, "Hanken Grotesk", system-ui, sans-serif);
  --font-body: var(--font-sans, "Hanken Grotesk", system-ui, sans-serif);
}

/* ---------- Loan widget modal ---------- */
.tpl-loan-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tpl-loan-modal[hidden] { display: none !important; }
.tpl-loan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 22, 39, 0.72);
  backdrop-filter: blur(2px);
  animation: tpl-fade-in 0.18s ease-out;
}
.tpl-loan-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #ffffff;
  color: var(--color-ink);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(15, 26, 36, 0.28);
  animation: tpl-modal-pop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.tpl-loan-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-band-6);
  color: var(--color-ink);
  font-size: 24px;
  line-height: 1;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background-color 0.15s ease;
}
.tpl-loan-modal-close:hover { background: #e6ebe2; }

.tpl-loan-widget {
  padding: 28px 28px 24px;
}
.tpl-loan-widget .tpl-range {
  --tpl-track: var(--color-band-6);
}
.tpl-loan-widget-head { margin-bottom: 18px; }
.tpl-loan-widget-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--color-brand-deep);
}
.tpl-loan-widget-sub {
  font-size: 13.5px;
  color: var(--color-sub-ink);
  margin: 0 0 14px;
}
.tpl-loan-widget-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-sub-ink);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tpl-loan-widget-secure { font-weight: 600; }
.tpl-loan-widget-progress-bar { width: 16.66%; }

.tpl-loan-widget-form { display: flex; flex-direction: column; gap: 4px; }
.tpl-honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tpl-loan-widget-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  margin: 14px 0 10px;
}
.tpl-loan-widget-amount {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.tpl-loan-widget-range-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--color-sub-ink);
  margin-top: 4px;
}

.tpl-loan-widget-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tpl-loan-widget-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-band-6);
  border: 1px solid var(--color-rule-soft);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-ink);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tpl-loan-widget-option:hover { background: #e6ebe2; }
.tpl-loan-widget-option input { accent-color: var(--color-accent); }
.tpl-loan-widget-option:has(input:checked) {
  background: var(--color-accent-pale);
  border-color: var(--color-accent);
}

.tpl-loan-widget-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--color-border-soft);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--color-ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tpl-loan-widget-input::placeholder { color: var(--color-sub-ink); }
.tpl-loan-widget-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(60, 138, 14, 0.15);
}
.tpl-loan-widget-input-zip { max-width: 160px; }
.tpl-loan-widget-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tpl-loan-widget-fineprint {
  font-size: 12px;
  color: var(--color-sub-ink);
  margin: 8px 0 0;
}

.tpl-loan-widget-error {
  margin-top: 12px;
  background: #fdecec;
  border: 1px solid #f3b6b6;
  color: #8a1f1f;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.tpl-loan-widget-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  align-items: center;
}
.tpl-loan-widget-back,
.tpl-loan-widget-next,
.tpl-loan-widget-submit {
  border: 0;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 15px;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.tpl-loan-widget-back {
  background: transparent;
  color: var(--color-sub-ink);
  padding: 13px 14px;
}
.tpl-loan-widget-back:hover { color: var(--color-ink); }
.tpl-loan-widget-back[hidden] { display: none; }
.tpl-loan-widget-next,
.tpl-loan-widget-submit {
  background: var(--color-accent-bright);
  color: #fff;
  margin-left: auto;
  min-width: 160px;
}
.tpl-loan-widget-next:hover,
.tpl-loan-widget-submit:hover { background: var(--color-accent); }
.tpl-loan-widget-next[hidden],
.tpl-loan-widget-submit[hidden] { display: none; }

.tpl-loan-widget-disclaimer {
  margin: 14px 0 0;
  font-size: 11.5px;
  color: var(--color-sub-ink);
  line-height: 1.5;
  text-align: center;
}
.tpl-loan-widget-disclaimer a { color: var(--color-brand); text-decoration: underline; }

.tpl-loan-widget-searching,
.tpl-loan-widget-approved {
  text-align: center;
  padding: 18px 4px 8px;
}
.tpl-loan-widget-status-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--color-brand-deep);
}
.tpl-loan-widget-status-sub {
  font-size: 14px;
  color: var(--color-sub-ink);
  margin: 0 0 18px;
}
.tpl-loan-widget-approved-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--color-accent-bright);
  color: #fff;
  font-size: 38px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tpl-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.loan-widget-search-ring {
  --search-duration: 3s;
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}
.loan-widget-search-ring-track,
.loan-widget-search-ring-progress {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.loan-widget-search-ring-track {
  border: 6px solid var(--color-band-6);
}
.loan-widget-search-ring-progress {
  border: 6px solid transparent;
  border-top-color: var(--color-accent);
  border-right-color: var(--color-accent);
  animation: tpl-spin var(--search-duration) linear infinite;
}

@keyframes tpl-spin {
  to { transform: rotate(360deg); }
}
@keyframes tpl-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes tpl-modal-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes tpl-pop-in {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

@media (max-width: 520px) {
  .tpl-loan-widget { padding: 22px 20px 20px; }
  .tpl-loan-widget-options { grid-template-columns: 1fr; }
  .tpl-loan-widget-amount { font-size: 32px; }
}


/* ===== 7-step wizard additions (loan_widget_modal.php + wizard.js) ===== */

.tpl-amount-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background-color 0.15s;
  min-height: 64px;
}
.tpl-amount-chip:hover { border-color: var(--color-accent, #f28314); }
.tpl-amount-chip.is-selected {
  border-color: var(--color-accent, #f28314);
  border-width: 2px;
  background: rgba(242, 131, 20, 0.06);
}
.tpl-amount-chip-caption {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #6b7280;
  margin-bottom: 2px;
}
.tpl-amount-chip-label {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}
.tpl-amount-chip.is-selected .tpl-amount-chip-label { color: var(--color-brand, #0f2b44); }
.tpl-loan-widget-chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 20px;
}
.tpl-amount-chip-wide { grid-column: 1 / -1; }

.tpl-trust-card {
  display: flex;
  gap: 10px;
  padding: 14px;
  margin: 12px 0 20px;
  border-radius: 10px;
  background: rgba(151, 201, 94, 0.10);
  border: 1px solid rgba(151, 201, 94, 0.35);
}
.tpl-trust-card-icon { font-size: 22px; line-height: 1; }
.tpl-trust-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #5a8a2c;
}
.tpl-trust-card-body {
  font-size: 12.5px;
  color: rgba(90, 138, 44, 0.95);
  line-height: 1.35;
  margin-top: 2px;
}

.tpl-loan-widget-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl-loan-widget-step-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.tpl-loan-widget-step-sub { font-size: 14px; color: #6b7280; margin: 0 0 16px; }
.tpl-loan-widget-helper { font-size: 12px; color: #6b7280; margin: -8px 0 12px; }

.tpl-loan-widget-toggle {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  font-size: 14px;
  cursor: pointer;
}
.tpl-loan-widget-toggle input[type="checkbox"] { margin-top: 3px; }

.tpl-loan-widget-input-wrap { position: relative; }
.tpl-loan-widget-input-wrap .tpl-loan-widget-input { padding-right: 64px; }
.tpl-loan-widget-reveal {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--color-brand, #0f2b44);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 8px;
}

.tpl-loan-widget-review { display: grid; grid-template-columns: 1fr 2fr; gap: 6px 12px; font-size: 14px; margin: 8px 0 20px; }
.tpl-loan-widget-review dt { color: #6b7280; }
.tpl-loan-widget-review dd { margin: 0; color: #1f2937; font-weight: 500; }

.tpl-loan-widget-searching {
  padding: 32px 24px;
  text-align: center;
}
.tpl-loan-widget-search-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid rgba(15, 43, 68, 0.12);
  border-top-color: var(--color-accent, #f28314);
  animation: tpl-spin 1s linear infinite;
}
@keyframes tpl-spin { to { transform: rotate(360deg); } }

.tpl-loan-widget-no-match {
  padding: 32px 24px;
  text-align: center;
}
.tpl-loan-widget-no-match .tpl-loan-widget-back { margin-top: 16px; }
