/* =============================================================
   BrightPath Loans — 30-Second Qualification Widget
   qualifier-widget.css
   Shared styles for the product-page qualification widgets.
   Inherits site fonts/colors; scoped under .bpq- to avoid clashes.
   ============================================================= */

.bpq-section {
  background: linear-gradient(135deg, #0f172a 0%, #1a365d 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}
.bpq-section .bpq-pattern {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236eb441' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.bpq-container { position: relative; z-index: 1; }

/* Eyebrow + heading */
.bpq-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(110,180,65,.15); border: 1px solid rgba(110,180,65,.3);
  color: #6eb441 !important; padding: 6px 16px; border-radius: 50px;
  font-size: .85rem; font-weight: 600; margin-bottom: .75rem;
}
/* Use !important so the site theme's own h2/heading color rules (which are
   more specific than a bare class selector) can't override these on the dark
   widget background. */
.bpq-section .bpq-heading, .bpq-heading { color: #fff !important; font-size: 2.1rem; font-weight: 700; margin-bottom: .5rem; }
.bpq-section .bpq-subtext, .bpq-subtext { color: rgba(255,255,255,.82) !important; font-size: 1.05rem; max-width: 620px; margin: 0 auto .25rem; }
/* Card header title sits on the green bar — keep it white too. */
.bpq-card-header h3 { color: #fff !important; }

/* Card */
.bpq-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.3);
  overflow: hidden; max-width: 620px; margin: 0 auto;
}
.bpq-card-header {
  background: linear-gradient(135deg, #6eb441 0%, #5a9434 100%);
  color: #fff; padding: 1.1rem 1.5rem; text-align: center;
}
.bpq-card-header h3 { margin: 0; font-size: 1.3rem; font-weight: 700; color: #fff; }
.bpq-card-body { padding: 1.5rem 1.5rem 1.75rem; }

/* Progress */
.bpq-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 1.1rem; }
.bpq-progress-label { font-size: .78rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.bpq-progress-track { flex: 1; height: 6px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
.bpq-progress-fill { height: 100%; background: linear-gradient(90deg, #6eb441, #5a9434); width: 0; transition: width .3s ease; }

/* Question groups */
.bpq-step { display: none; }
.bpq-step.bpq-active { display: block; animation: bpqFade .25s ease; }
@keyframes bpqFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.bpq-q { margin-bottom: 1.15rem; }
.bpq-q:last-child { margin-bottom: 0; }
.bpq-q-label {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; color: #1f2937; margin-bottom: .5rem; font-size: .95rem;
}
.bpq-q-label i { color: #6eb441; }

/* Selection cards (radio-style) */
.bpq-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .55rem; }
.bpq-options.bpq-two { grid-template-columns: repeat(2, 1fr); }
.bpq-options.bpq-one { grid-template-columns: 1fr; }
.bpq-opt {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: .65rem .75rem;
  border: 2px solid #e5e7eb; border-radius: 12px; background: #fff;
  font-size: .92rem; font-weight: 500; color: #374151; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.bpq-opt:hover { border-color: #a7cd86; }
.bpq-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bpq-opt.bpq-checked { border-color: #6eb441; background: #f2f8ec; color: #2f5d1f; box-shadow: 0 0 0 3px rgba(110,180,65,.12); font-weight: 600; }
.bpq-opt.bpq-checked::after {
  content: "\2713"; position: absolute; top: 6px; right: 8px;
  color: #6eb441; font-weight: 800; font-size: .8rem;
}
/* Keyboard focus ring on the whole card (not the inner text). Uses
   :has(:focus-visible) so it only appears for keyboard navigation — a
   programmatic/pre-selected radio won't draw a stray box around the label. */
.bpq-opt:has(input:focus-visible) { outline: 2px solid #1e5fa8; outline-offset: 2px; }

/* Currency + text inputs */
.bpq-money-wrap, .bpq-input-wrap { position: relative; }
.bpq-money-wrap .bpq-dollar {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: #6b7280; font-size: 1.05rem; font-weight: 500; pointer-events: none; z-index: 2;
}
.bpq-input {
  width: 100%; border: 2px solid #e5e7eb; border-radius: 12px;
  padding: .8rem .85rem; font-size: 1.05rem; color: #1f2937;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bpq-money-wrap .bpq-input { padding-left: 2.25rem; }
.bpq-input:focus { border-color: #6eb441; box-shadow: 0 0 0 3px rgba(110,180,65,.15); outline: none; }

/* ── Live in-field ",000" overlay ──────────────────────────────────
   As the visitor types their thousands (e.g. "300"), a faint ",000"
   appears pinned right after their number, inside the box, so they see
   "300,000" forming in real time and never over-type. The real input
   sits on top with transparent text (caret stays visible) so it owns
   all typing/selection; the overlay renders the visible characters. */
.bpq-money-wrap.bpq-money-live { position: relative; }
.bpq-money-wrap.bpq-money-live .bpq-money {
  /* Hide the input's own glyphs but keep a visible caret. */
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #1f2937;
  position: relative;
  z-index: 2;
  background: transparent;
}
.bpq-money-wrap.bpq-money-live .bpq-money::placeholder { color: #9ca3af; -webkit-text-fill-color: #9ca3af; }
.bpq-money-overlay {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0;
  display: flex; align-items: center;
  /* Match the input's box model exactly so text lines up glyph-for-glyph. */
  padding: .8rem .85rem .8rem 2.25rem;
  font-size: 1.05rem; line-height: 1.2;
  white-space: pre; pointer-events: none; z-index: 1;
  border: 2px solid transparent; border-radius: 12px;
  overflow: hidden;
}
.bpq-money-overlay .bpq-ovl-typed { color: #1f2937; }        /* their number, normal */
.bpq-money-overlay .bpq-ovl-zeros { color: #8a94a3; }        /* auto-filled ",000" (medium grey) */
.bpq-select {
  width: 100%; border: 2px solid #e5e7eb; border-radius: 12px;
  padding: .8rem .85rem; font-size: 1rem; color: #1f2937; background: #fff;
}
.bpq-select:focus { border-color: #6eb441; box-shadow: 0 0 0 3px rgba(110,180,65,.15); outline: none; }

/* Toggle (e.g. monthly/annual) */
.bpq-toggle { display: inline-flex; border: 2px solid #e5e7eb; border-radius: 10px; overflow: hidden; margin-top: .5rem; }
.bpq-toggle button {
  border: none; background: #fff; color: #6b7280; padding: .45rem .95rem;
  font-size: .85rem; font-weight: 600; cursor: pointer;
}
.bpq-toggle button.bpq-on { background: #6eb441; color: #fff; }

.bpq-hint { font-size: .78rem; color: #6b7280; margin-top: .3rem; }
.bpq-error { display: none; color: #b91c1c; font-size: .82rem; margin-top: .4rem; font-weight: 600; }
.bpq-error.bpq-show { display: block; }

/* Nav buttons */
.bpq-nav { display: flex; gap: .6rem; margin-top: 1.35rem; }
.bpq-btn {
  border: none; border-radius: 12px; padding: .85rem 1.5rem;
  font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: all .2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.bpq-btn-primary {
  flex: 1; color: #fff;
  background: linear-gradient(135deg, #fa931a 0%, #e07d0a 100%);
  box-shadow: 0 4px 15px rgba(250,147,26,.35);
}
.bpq-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(250,147,26,.45); }
.bpq-btn-back {
  background: #fff; color: #6b7280; border: 2px solid #e5e7eb; flex: 0 0 auto; padding: .85rem 1.15rem;
}
.bpq-btn-back:hover { border-color: #d1d5db; color: #374151; }

.bpq-skip { display: block; text-align: center; margin-top: .85rem; }
.bpq-skip a { color: #6b7280; font-size: .85rem; text-decoration: underline; }
.bpq-skip a:hover { color: #374151; }

/* Result */
.bpq-result { display: none; }
.bpq-result.bpq-active { display: block; animation: bpqFade .25s ease; }
.bpq-result-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #f2f8ec; color: #2f5d1f; border: 1px solid #b5d98a;
  padding: .5rem 1rem; border-radius: 50px; font-weight: 700; font-size: .9rem; margin-bottom: .85rem;
}
.bpq-result-badge i { color: #6eb441; }
.bpq-result-msg { color: #1f2937; font-size: 1.02rem; line-height: 1.6; margin-bottom: 1rem; }
.bpq-highlights { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .55rem; }
.bpq-highlights li { display: flex; align-items: flex-start; gap: 9px; font-size: .92rem; color: #374151; }
.bpq-highlights li i { color: #6eb441; margin-top: 2px; flex-shrink: 0; }

.bpq-disclaimer { font-size: .72rem; color: #9ca3af; margin-top: 1rem; display: flex; align-items: flex-start; gap: 6px; line-height: 1.5; }
.bpq-disclaimer i { color: #fa931a; margin-top: 1px; flex-shrink: 0; }

/* No-JS fallback */
.bpq-nojs { text-align: center; }
.bpq-nojs a {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #6eb441, #5a9434); color: #fff;
  padding: .85rem 1.75rem; border-radius: 12px; font-weight: 700; text-decoration: none;
}
.bpq-js-ready .bpq-nojs { display: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bpq-step, .bpq-result, .bpq-progress-fill, .bpq-btn-primary { animation: none !important; transition: none !important; }
}

/* Mobile */
@media (max-width: 575px) {
  .bpq-heading { font-size: 1.6rem; }
  .bpq-card-body { padding: 1.25rem 1.1rem 1.5rem; }
  .bpq-options { grid-template-columns: 1fr; }
  .bpq-options.bpq-two { grid-template-columns: 1fr; }
}

/* =============================================================
   Hero "See If You Qualify" CTA button
   Used in page heroes to scroll down to the widget (#bpq-widget).
   Kept here (shared) so all pages get consistent styling instead of
   a per-page inline <style> block. Uses !important so the site theme's
   .btn color rules can't hide the white label.
   ============================================================= */
.hero-qual-btn { color: #ffffff !important; transition: background-color 0.2s ease; }
.hero-qual-btn:hover { background: #65a63c !important; color: #ffffff !important; }

/* =============================================================
   Money "thousands" entry — live full-dollar hint
   The input holds the typed thousands (e.g. "300"); this line
   shows the resolved full amount ("= $300,000") right beneath.
   ============================================================= */
.bpq-mhint {
  font-size: .95rem; font-weight: 700; color: #2f5d1f;
  margin-top: .35rem; min-height: 1.1em; letter-spacing: .2px;
}
.bpq-mhint:empty { display: none; }
/* Faint preview shown on load (from the placeholder) before the visitor types. */
.bpq-mhint.bpq-mhint-ghost { color: #9ca3af; font-weight: 600; }
