/* =========================================================
   QTC Lead Platform — shared responsive form styles
   Scoped entirely to .qtc-lead-form. Vanilla CSS, no builder deps.
   ========================================================= */
.qtc-lead-form{
  --qtc-navy:#0a2a52;
  --qtc-navy-2:#143764;
  --qtc-blue:#1b6ef3;
  --qtc-blue-dark:#0d56d4;
  --qtc-blue-soft:#eaf2fe;
  --qtc-blue-soft-2:#f5f9ff;
  --qtc-green:#7cbb3f;
  --qtc-green-dark:#69a531;
  --qtc-green-ink:#4d7a23;
  --qtc-grey:#5d6b82;
  --qtc-grey-soft:#7a8aa0;
  --qtc-border:#dce4ee;
  --qtc-border-strong:#bcd0e6;
  --qtc-track:#e3e9f1;
  --qtc-track-num:#c3ccd8;
  --qtc-danger:#c4361f;
  --qtc-radius:18px;
  --qtc-radius-sm:13px;
  --qtc-shadow:0 18px 48px rgba(10,42,82,.10);

  font-family:inherit;color:var(--qtc-navy);
  max-width:1140px;width:100%;margin-inline:auto;
  -webkit-font-smoothing:antialiased;
}
.qtc-lead-form *{box-sizing:border-box}
.qtc-lead-form__form{
  background:#fff;border:1px solid var(--qtc-border);border-radius:var(--qtc-radius);
  box-shadow:var(--qtc-shadow);padding:clamp(20px,3.4vw,40px);overflow:hidden;position:relative;
}

/* ---------- Heading ---------- */
.qtc-lead-form__head{text-align:center;margin:0 0 22px}
.qtc-lead-form__eyebrow{
  margin:0 0 6px;color:var(--qtc-blue);font-weight:800;font-size:12px;
  text-transform:uppercase;letter-spacing:.08em
}
.qtc-lead-form__head h2{
  margin:0;font-size:clamp(24px,3.2vw,38px);line-height:1.05;letter-spacing:-.01em;
  color:var(--qtc-navy);font-weight:900
}

/* ---------- Horizontal stepper ---------- */
.qtc-stepper{
  display:flex;align-items:flex-start;justify-content:space-between;gap:4px;
  margin:6px 0 28px;padding:0;list-style:none
}
.qtc-stepper__item{
  flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:8px;
  position:relative;text-align:center;min-width:0
}
/* connector line sits between circles */
.qtc-stepper__item::before,
.qtc-stepper__item::after{
  content:"";position:absolute;top:16px;height:3px;background:var(--qtc-track);z-index:0
}
.qtc-stepper__item::before{left:0;right:50%;margin-right:18px}
.qtc-stepper__item::after{left:50%;right:0;margin-left:18px}
.qtc-stepper__item:first-child::before{display:none}
.qtc-stepper__item:last-child::after{display:none}
.qtc-stepper__item.is-done::after,
.qtc-stepper__item.is-active::before,
.qtc-stepper__item.is-done::before{background:var(--qtc-blue)}
.qtc-stepper__num{
  position:relative;z-index:1;width:34px;height:34px;border-radius:50%;
  display:grid;place-items:center;font-weight:800;font-size:15px;
  background:var(--qtc-track-num);color:#fff;transition:background .2s ease
}
.qtc-stepper__item.is-active .qtc-stepper__num,
.qtc-stepper__item.is-done .qtc-stepper__num{background:var(--qtc-blue)}
.qtc-stepper__num svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.qtc-stepper__label{
  font-size:13px;font-weight:700;color:var(--qtc-grey-soft);line-height:1.25;
  padding:0 2px;transition:color .2s ease
}
.qtc-stepper__item.is-active .qtc-stepper__label{color:var(--qtc-navy)}
.qtc-stepper__item.is-done .qtc-stepper__label{color:var(--qtc-navy-2)}

/* ---------- Step panels ---------- */
.qtc-step{animation:qtcfade .25s ease}
@keyframes qtcfade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.qtc-step__inner{max-width:680px;margin-inline:auto}
.qtc-step__inner--wide{max-width:1040px}
.qtc-step__head{text-align:center;margin:0 0 22px}
.qtc-step__badge{
  width:46px;height:46px;border-radius:50%;background:var(--qtc-blue);color:#fff;
  display:grid;place-items:center;font-weight:900;font-size:20px;margin:0 auto 14px;
  box-shadow:0 10px 20px rgba(27,110,243,.28)
}
.qtc-step__head h3{margin:0 0 8px;font-size:clamp(22px,2.4vw,28px);line-height:1.15;color:var(--qtc-navy);font-weight:900}
.qtc-step__head p{margin:0 auto;max-width:440px;color:var(--qtc-grey);font-size:15px;line-height:1.5}

/* ---------- Product grid (Step 1) ---------- */
.qtc-product-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch
}
/* Hero icon-choice (single-product first question) — auto-fills so small sets don't orphan */
.qtc-icon-choice{
  grid-template-columns:repeat(auto-fill,minmax(130px,1fr))
}
.qtc-product-card{
  appearance:none;position:relative;border:2px solid var(--qtc-border);background:#fff;
  border-radius:var(--qtc-radius-sm);padding:20px 12px 16px;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  text-align:center;min-height:128px;height:100%;color:var(--qtc-navy);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease,transform .18s ease
}
.qtc-product-card:hover{border-color:var(--qtc-blue);background:var(--qtc-blue-soft-2);color:var(--qtc-navy);box-shadow:0 10px 22px rgba(27,110,243,.12);transform:translateY(-2px)}
.qtc-product-card.is-selected{border-color:var(--qtc-blue);background:var(--qtc-blue-soft-2);box-shadow:0 12px 26px rgba(27,110,243,.16)}
.qtc-product-card__icon{display:grid;place-items:center;width:48px;height:48px}
.qtc-product-card__icon svg{width:42px;height:42px;fill:none;stroke:var(--qtc-green);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.qtc-product-card__name{display:block;font-size:14px;font-weight:800;line-height:1.25;word-break:break-word;hyphens:auto;overflow-wrap:break-word}
.qtc-product-card__check{
  position:absolute;top:8px;right:8px;width:22px;height:22px;border-radius:50%;
  background:var(--qtc-blue);color:#fff;display:none;place-items:center
}
.qtc-product-card__check svg{width:13px;height:13px;fill:none;stroke:#fff;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.qtc-product-card.is-selected .qtc-product-card__check{display:grid}

/* ---------- Questions / fields ---------- */
.qtc-question{margin:0 0 22px;text-align:left}
.qtc-question:last-child{margin-bottom:0}
.qtc-question__label{display:block;margin:0 0 10px;font-weight:800;font-size:15px;color:var(--qtc-navy)}
.qtc-question__help{display:block;margin:-4px 0 10px;font-weight:600;font-size:13px;color:var(--qtc-grey)}
.qtc-lead-form label{font-weight:700}

.qtc-input-wrap{position:relative}
.qtc-lead-form input[type=text],
.qtc-lead-form input[type=email],
.qtc-lead-form input[type=tel],
.qtc-lead-form input[type=number],
.qtc-lead-form input[type=date],
.qtc-lead-form textarea,
.qtc-lead-form select{
  width:100%;border:1.5px solid var(--qtc-border);border-radius:var(--qtc-radius-sm);
  padding:13px 15px;font:inherit;background:#fff;color:var(--qtc-navy);min-height:50px;
  transition:border-color .15s ease,box-shadow .15s ease
}
.qtc-lead-form textarea{min-height:96px;resize:vertical}
.qtc-lead-form select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6b82' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 15px center;padding-right:40px}
.qtc-lead-form input:focus,
.qtc-lead-form textarea:focus,
.qtc-lead-form select:focus{outline:none;border-color:var(--qtc-blue);box-shadow:0 0 0 3px rgba(27,110,243,.16)}
.qtc-input-wrap.is-valid input{border-color:var(--qtc-green);padding-right:44px}
.qtc-input-wrap__tick{
  position:absolute;top:50%;right:14px;transform:translateY(-50%);width:20px;height:20px;
  display:none;color:var(--qtc-green)
}
.qtc-input-wrap.is-valid .qtc-input-wrap__tick{display:block}
.qtc-input-wrap__tick svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}

/* option rows for radio/checkbox questions */
.qtc-lead-form [hidden]{display:none!important}
.qtc-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
.qtc-options--two{grid-template-columns:repeat(2,minmax(0,1fr))}
.qtc-option{
  border:1.5px solid var(--qtc-border);border-radius:var(--qtc-radius-sm);
  padding:14px 16px;font-weight:700;background:#fff;cursor:pointer;
  display:flex;align-items:center;gap:12px;margin:0;min-height:52px;
  transition:border-color .15s ease,background .15s ease
}
.qtc-option:hover{border-color:var(--qtc-border-strong);background:var(--qtc-blue-soft-2)}
.qtc-option.is-checked{border-color:var(--qtc-blue);background:var(--qtc-blue-soft)}
.qtc-option input{position:absolute;opacity:0;width:0;height:0}
.qtc-option__mark{
  flex:0 0 22px;width:22px;height:22px;border:2px solid var(--qtc-border-strong);
  border-radius:50%;display:grid;place-items:center;background:#fff;transition:.15s ease
}
.qtc-option input[type=checkbox]+.qtc-option__mark{border-radius:6px}
.qtc-option__mark svg{width:13px;height:13px;fill:none;stroke:#fff;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .12s ease}
.qtc-option.is-checked .qtc-option__mark{background:var(--qtc-blue);border-color:var(--qtc-blue)}
.qtc-option.is-checked .qtc-option__mark svg{opacity:1}
.qtc-option__text{flex:1 1 auto;min-width:0;word-break:break-word}

/* segmented toggle (Yes/No, Own/Rent) */
.qtc-segment{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.qtc-segment .qtc-option{justify-content:center;text-align:center}

/* two-up name row */
.qtc-field-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}

/* consent */
.qtc-consent{
  display:flex;align-items:flex-start;gap:11px;margin:18px 0 0;font-size:14px;
  line-height:1.5;color:var(--qtc-grey);font-weight:600;cursor:pointer
}
.qtc-consent input{margin:2px 0 0;flex:0 0 auto;width:18px;height:18px;accent-color:var(--qtc-blue)}
.qtc-consent a{color:var(--qtc-blue);font-weight:700}

/* inline error beneath a question/field */
.qtc-error{display:none;margin:8px 0 0;color:var(--qtc-danger);font-size:13px;font-weight:700}
.qtc-question.has-error .qtc-error,
.qtc-field.has-error .qtc-error{display:block}
.qtc-question.has-error .qtc-option,
.qtc-field.has-error input,
.qtc-field.has-error select{border-color:var(--qtc-danger)}

/* secure reassurance box (Step 4) */
.qtc-secure{
  display:flex;gap:13px;align-items:flex-start;margin-top:20px;padding:16px 18px;
  background:var(--qtc-blue-soft);border-radius:var(--qtc-radius-sm)
}
.qtc-secure__icon{flex:0 0 24px;color:var(--qtc-blue)}
.qtc-secure__icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.qtc-secure strong{display:block;color:var(--qtc-navy);font-size:14px;margin:0 0 2px}
.qtc-secure span{display:block;color:var(--qtc-grey);font-size:13px;line-height:1.45}

/* ---------- Summary (Step 5) ---------- */
.qtc-summary{
  background:var(--qtc-blue-soft-2);border:1px solid var(--qtc-border);
  border-radius:var(--qtc-radius-sm);padding:20px 22px;display:grid;gap:16px
}
.qtc-summary__row{display:flex;gap:14px;align-items:flex-start}
.qtc-summary__icon{flex:0 0 24px;color:var(--qtc-green);margin-top:1px}
.qtc-summary__icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.qtc-summary__label{display:block;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--qtc-grey-soft);margin:0 0 3px}
.qtc-summary__value{display:block;font-size:15px;font-weight:700;color:var(--qtc-navy);line-height:1.45;word-break:break-word}
.qtc-submit-note{display:flex;align-items:center;justify-content:center;gap:7px;margin:16px 0 0;color:var(--qtc-grey);font-size:13px;font-weight:700}
.qtc-submit-note svg{width:16px;height:16px;fill:none;stroke:var(--qtc-green);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* ---------- Actions ---------- */
.qtc-actions{
  display:flex;justify-content:flex-end;align-items:center;gap:14px;
  margin-top:28px;padding-top:22px;border-top:1px solid #eef2f7
}
.qtc-lead-form.is-multistep:not(.is-step-1) .qtc-actions{justify-content:space-between}
.qtc-btn{
  appearance:none;border:0;border-radius:var(--qtc-radius-sm);padding:15px 26px;
  font-weight:800;cursor:pointer;font:inherit;min-height:54px;min-width:160px;
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  transition:transform .15s ease,box-shadow .15s ease,opacity .15s ease,background .15s ease
}
.qtc-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.qtc-btn:hover:not(:disabled){transform:translateY(-1px)}
.qtc-btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}
.qtc-btn--primary{background:var(--qtc-blue);color:#fff;box-shadow:0 10px 22px rgba(27,110,243,.26)}
.qtc-btn--primary:hover:not(:disabled){background:var(--qtc-blue-dark)}
.qtc-btn--ghost{background:#fff;color:var(--qtc-navy);border:1.5px solid var(--qtc-border-strong)}
.qtc-btn--ghost:hover:not(:disabled){background:var(--qtc-blue-soft-2);color:var(--qtc-navy)}
.qtc-btn--submit{background:var(--qtc-green);color:#fff;box-shadow:0 10px 22px rgba(124,187,63,.30);min-width:210px}
.qtc-btn--submit:hover:not(:disabled){background:var(--qtc-green-dark)}
.qtc-btn.is-busy{position:relative;color:transparent!important}
.qtc-btn.is-busy::after{
  content:"";position:absolute;top:50%;left:50%;width:18px;height:18px;margin:-9px 0 0 -9px;
  border:2.5px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:qtcspin .7s linear infinite
}
@keyframes qtcspin{to{transform:rotate(360deg)}}

/* form-level message */
.qtc-form-message{border-radius:var(--qtc-radius-sm);padding:13px 16px;margin-top:18px;font-weight:700;font-size:14px;background:#fdf3e7;color:#8a4b00}
.qtc-form-message.is-success{background:#eaf7ec;color:#1f7a37}

/* honeypot */
.qtc-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0!important;overflow:hidden}

/* ---------- Trust bar ---------- */
.qtc-trustbar{
  margin-top:18px;background:var(--qtc-blue-soft);border-radius:var(--qtc-radius);
  padding:22px clamp(16px,3vw,32px);display:grid;grid-template-columns:repeat(4,1fr);gap:24px
}
.qtc-trust{display:flex;gap:14px;align-items:flex-start}
.qtc-trust__icon{flex:0 0 30px;color:var(--qtc-blue)}
.qtc-trust__icon svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.qtc-trust strong{display:block;color:var(--qtc-navy);font-size:15px;margin:0 0 3px}
.qtc-trust span{display:block;color:var(--qtc-grey);font-size:13px;line-height:1.4}

/* ---------- Trade form (single screen) ---------- */
.qtc-lead-form--trade .qtc-step__inner{max-width:560px}
.qtc-lead-form--trade .qtc-question{margin-bottom:18px}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width:1024px){
  .qtc-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .qtc-trustbar{grid-template-columns:repeat(2,1fr);gap:20px}
}
@media (max-width:720px){
  .qtc-lead-form__form{padding:20px;border-radius:16px}
  .qtc-step__inner--wide{max-width:100%}
  .qtc-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .qtc-product-card{min-height:110px;padding:14px 8px 12px;gap:8px}
  .qtc-product-card__name{font-size:12px;line-height:1.2;word-break:break-word;hyphens:auto}
  .qtc-product-card__icon svg{width:34px;height:34px}
  .qtc-options{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
  .qtc-options--two,.qtc-field-row{grid-template-columns:1fr}
  .qtc-stepper__label{display:none}
  .qtc-stepper__item.is-active .qtc-stepper__label{display:block;font-size:12px}
  .qtc-stepper__item::before,.qtc-stepper__item::after{top:15px}
  .qtc-actions{
    position:sticky;bottom:0;z-index:5;background:#fff;
    margin:24px -20px -20px;padding:14px 20px;border-top:1px solid var(--qtc-border);
    box-shadow:0 -8px 20px rgba(10,42,82,.06)
  }
  .qtc-btn{width:100%;min-width:0}
  .qtc-lead-form.is-multistep:not(.is-step-1) .qtc-actions{display:grid;grid-template-columns:1fr 1fr}
}
@media (max-width:420px){
  .qtc-product-grid{grid-template-columns:1fr}
  .qtc-options,.qtc-options--two{grid-template-columns:1fr}
  .qtc-lead-form.is-multistep:not(.is-step-1) .qtc-actions{grid-template-columns:1fr}
  .qtc-trustbar{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  .qtc-step,.qtc-btn,.qtc-product-card{animation:none;transition:none}
  .qtc-btn.is-busy::after{animation:none}
}

/* =========================================================
   Slim / homepage variant  (.qtc-lead-form--slim)
   No stepper, no trust bar, tighter box.
   ========================================================= */
.qtc-lead-form--slim{max-width:720px}
.qtc-lead-form--slim .qtc-lead-form__form{
  padding:clamp(18px,2.8vw,30px);
  border-radius:var(--qtc-radius-sm);
  box-shadow:0 8px 28px rgba(10,42,82,.08)
}
.qtc-lead-form--slim .qtc-stepper{display:none}
.qtc-lead-form--slim .qtc-trustbar{display:none}
.qtc-lead-form--slim .qtc-step__head{padding:0 0 16px;text-align:left}
.qtc-lead-form--slim .qtc-step__head h3{font-size:clamp(16px,2.2vw,20px);margin:0 0 4px}
.qtc-lead-form--slim .qtc-step__badge{display:none}
.qtc-lead-form--slim .qtc-step__head p{margin:0;text-align:left;max-width:none;font-size:14px}
.qtc-lead-form--slim .qtc-step__inner{max-width:none}
.qtc-lead-form--slim .qtc-product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.qtc-lead-form--slim .qtc-product-card{min-height:100px;padding:14px 10px 12px;gap:8px}
.qtc-lead-form--slim .qtc-product-card__icon svg{width:34px;height:34px}
.qtc-lead-form--slim .qtc-product-card__name{font-size:13px}
.qtc-lead-form--slim .qtc-actions{margin-top:18px;padding-top:16px}
@media (max-width:600px){
  .qtc-lead-form--slim .qtc-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:380px){
  .qtc-lead-form--slim .qtc-product-grid{grid-template-columns:1fr}
}

