/* ============================================================
   WebQuote Pro — Frontend Form CSS
   Form multi-step professionale con design moderno
   ============================================================ */

:root {
  --wqp-c:        #1a472a;
  --wqp-c-light:  #d4edda;
  --wqp-c-mid:    #7cb99a;
  --wqp-bg:       #f7f6f2;
  --wqp-white:    #ffffff;
  --wqp-ink:      #1a1916;
  --wqp-ink2:     #4a4840;
  --wqp-ink3:     #8a8778;
  --wqp-border:   #e0ddd5;
  --wqp-radius:   14px;
  --wqp-font:     'Bricolage Grotesque', -apple-system, sans-serif;
  --wqp-shadow:   0 4px 24px rgba(0,0,0,0.08);
}

#wqp-form-wrap {
  font-family: var(--wqp-font);
  max-width: 860px;
  margin: 0 auto;
  color: var(--wqp-ink);
}

.wqp-form-hero {
  text-align: center;
  padding: 48px 20px 32px;
}
.wqp-form-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--wqp-ink);
  margin: 0 0 12px;
}
.wqp-form-sub {
  font-size: 16px;
  color: var(--wqp-ink3);
  margin: 0 auto;
  max-width: 520px;
  line-height: 1.5;
}

.wqp-progress-wrap {
  padding: 0 20px 24px;
  max-width: 700px;
  margin: 0 auto;
}
.wqp-progress-bar {
  height: 4px;
  background: var(--wqp-border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}
.wqp-progress-fill {
  height: 100%;
  background: var(--wqp-c);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}

.wqp-step-indicators {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.wqp-step-ind {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.wqp-step-ind-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--wqp-border);
  background: var(--wqp-white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--wqp-ink3);
  transition: all 0.3s;
}
.wqp-step-ind.done .wqp-step-ind-dot { background: var(--wqp-c); border-color: var(--wqp-c); color: #fff; }
.wqp-step-ind.active .wqp-step-ind-dot { border-color: var(--wqp-c); color: var(--wqp-c); box-shadow: 0 0 0 4px var(--wqp-c-light); font-weight: 800; }
.wqp-step-ind-label { font-size: 10px; color: var(--wqp-ink3); text-align: center; max-width: 70px; line-height: 1.2; }
.wqp-step-ind.active .wqp-step-ind-label { color: var(--wqp-c); font-weight: 600; }
.wqp-step-ind.done .wqp-step-ind-label { color: var(--wqp-ink2); }
@media (max-width: 600px) { .wqp-step-ind-label { display: none; } .wqp-step-ind-dot { width: 22px; height: 22px; } }

.wqp-price-live {
  background: var(--wqp-ink);
  color: #fff;
  border-radius: var(--wqp-radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 20px 24px;
}
.wqp-price-live-label { font-size: 12px; color: #888; font-weight: 500; flex-shrink: 0; }
.wqp-price-live-value { font-size: 24px; font-weight: 800; color: #4ade80; transition: all 0.3s; }
.wqp-price-live-note { font-size: 11px; color: #666; flex: 1; line-height: 1.4; }

.wqp-steps-container { padding: 0 20px; }

.wqp-step { display: none; animation: wqpStepIn 0.3s ease both; }
.wqp-step.active { display: block; }
@keyframes wqpStepIn { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:translateX(0); } }
@keyframes wqpStepBack { from { opacity:0; transform:translateX(-16px); } to { opacity:1; transform:translateX(0); } }
.wqp-step.going-back { animation: wqpStepBack 0.3s ease both; }

.wqp-step-header { margin-bottom: 24px; }
.wqp-step-num { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--wqp-c); margin-bottom: 4px; }
.wqp-step-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 4px; }
.wqp-step-desc { font-size: 14px; color: var(--wqp-ink3); margin: 0; }

.wqp-tipo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(175px,1fr)); gap: 10px; }
.wqp-tipo-card {
  background: var(--wqp-white);
  border: 2px solid var(--wqp-border);
  border-radius: var(--wqp-radius);
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
}
.wqp-tipo-card:hover { border-color: var(--wqp-c); transform: translateY(-2px); box-shadow: var(--wqp-shadow); }
.wqp-tipo-card.selected { border-color: var(--wqp-c); background: var(--wqp-c-light); }
.wqp-tipo-emoji { font-size: 32px; margin-bottom: 10px; display: block; }
.wqp-tipo-label { font-size: 13px; font-weight: 700; margin-bottom: 4px; line-height: 1.2; }
.wqp-tipo-desc { font-size: 11px; color: var(--wqp-ink3); line-height: 1.3; }
.wqp-tipo-price { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--wqp-c); background: var(--wqp-c-light); padding: 3px 8px; border-radius: 20px; }
.wqp-tipo-card.selected .wqp-tipo-price { background: var(--wqp-c); color: #fff; }

.wqp-section-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--wqp-ink3); margin: 24px 0 12px; display: flex; align-items: center; gap: 8px; }
.wqp-section-title::after { content: ''; flex: 1; height: 1px; background: var(--wqp-border); }

.wqp-options-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 8px; }
.wqp-option-card {
  background: var(--wqp-white);
  border: 1.5px solid var(--wqp-border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.wqp-option-card:hover { border-color: var(--wqp-c); background: var(--wqp-c-light); }
.wqp-option-card.selected { border-color: var(--wqp-c); background: var(--wqp-c-light); }
.wqp-option-check {
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 2px solid var(--wqp-border);
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: all 0.15s;
  background: var(--wqp-white);
}
.wqp-option-card.selected .wqp-option-check { background: var(--wqp-c); border-color: var(--wqp-c); }
.wqp-option-card.selected .wqp-option-check::after { display: block; }
.wqp-option-check::after { content: '✓'; display: none; position: absolute; top:50%; left:50%; transform:translate(-50%,-50%); font-size:12px; font-weight:700; color:#fff; }
.wqp-option-card.radio-style .wqp-option-check { border-radius: 50%; }
.wqp-option-card.radio-style.selected .wqp-option-check::after { content: ''; width:8px; height:8px; background:#fff; border-radius:50%; display:block; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
.wqp-option-body { flex: 1; min-width: 0; }
.wqp-option-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; line-height: 1.3; }
.wqp-option-desc { font-size: 11px; color: var(--wqp-ink3); line-height: 1.4; }
.wqp-option-price { font-size: 13px; font-weight: 700; color: var(--wqp-c); white-space: nowrap; }

.wqp-user-form { background: var(--wqp-white); border: 1px solid var(--wqp-border); border-radius: var(--wqp-radius); padding: 28px; box-shadow: var(--wqp-shadow); }
.wqp-user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .wqp-user-grid { grid-template-columns: 1fr; } }
.wqp-field { display: flex; flex-direction: column; gap: 6px; }
.wqp-field.full { grid-column: 1 / -1; }
.wqp-field label { font-size: 12px; font-weight: 700; color: var(--wqp-ink2); text-transform: uppercase; letter-spacing: 0.5px; }
.wqp-field label .req { color: var(--wqp-c); }
.wqp-field input, .wqp-field textarea {
  font-family: var(--wqp-font); font-size: 14px;
  background: var(--wqp-bg); border: 1.5px solid var(--wqp-border);
  border-radius: 8px; padding: 10px 14px; color: var(--wqp-ink); width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wqp-field input:focus, .wqp-field textarea:focus { outline: none; border-color: var(--wqp-c); box-shadow: 0 0 0 3px var(--wqp-c-light); background: var(--wqp-white); }
.wqp-field input.error { border-color: #c8401a; }
.wqp-field textarea { resize: vertical; min-height: 80px; }
.wqp-field-error { font-size: 11px; color: #c8401a; display: none; }
.wqp-field-error.visible { display: block; }
.wqp-gdpr-row { display: flex; align-items: flex-start; gap: 10px; padding: 14px; background: var(--wqp-bg); border-radius: 8px; border: 1.5px solid var(--wqp-border); grid-column: 1/-1; cursor: pointer; }
.wqp-gdpr-row input[type="checkbox"] { width:18px; height:18px; accent-color: var(--wqp-c); flex-shrink:0; margin-top:2px; }
.wqp-gdpr-label { font-size: 12px; color: var(--wqp-ink2); line-height: 1.5; }
.wqp-gdpr-label a { color: var(--wqp-c); }

.wqp-riepilogo { background: var(--wqp-white); border: 1px solid var(--wqp-border); border-radius: var(--wqp-radius); overflow: hidden; box-shadow: var(--wqp-shadow); margin-bottom: 20px; }
.wqp-riepilogo-header { background: var(--wqp-ink); color: #fff; padding: 16px 20px; }
.wqp-riepilogo-header h3 { font-size: 15px; font-weight: 700; margin: 0; }
.wqp-voci-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--wqp-border); font-size: 13px; }
.wqp-voci-row:last-child { border-bottom: none; }
.wqp-voci-row .vn { color: var(--wqp-ink); }
.wqp-voci-row .vp { font-weight: 600; color: var(--wqp-c); }
.wqp-riepilogo-footer { background: var(--wqp-bg); border-top: 2px solid var(--wqp-border); padding: 16px 20px; }
.wqp-total-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--wqp-ink3); margin-bottom: 6px; }
.wqp-total-row.final { font-size: 18px; font-weight: 800; color: var(--wqp-ink); padding-top: 8px; border-top: 1px solid var(--wqp-border); margin-top: 4px; }
.wqp-total-row.final .tv { color: var(--wqp-c); }

.wqp-nav { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px 40px; gap: 16px; }
.wqp-nav-center { text-align: center; font-size: 12px; color: var(--wqp-ink3); }
.wqp-nav-btn { font-family: var(--wqp-font); font-size: 14px; font-weight: 700; padding: 12px 28px; border-radius: 10px; cursor: pointer; border: none; transition: all 0.2s; }
.wqp-nav-prev { background: var(--wqp-bg); color: var(--wqp-ink3); border: 1.5px solid var(--wqp-border); }
.wqp-nav-prev:hover { background: var(--wqp-border); color: var(--wqp-ink); }
.wqp-nav-next { background: var(--wqp-c); color: #fff; }
.wqp-nav-next:hover { transform: translateY(-1px); }
.wqp-nav-next:disabled, .wqp-nav-prev:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.wqp-btn-submit { background: var(--wqp-c); color: #fff; font-family: var(--wqp-font); font-size: 15px; font-weight: 700; padding: 14px 36px; border-radius: 10px; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.wqp-btn-submit:hover { transform: translateY(-2px); }
.wqp-btn-submit.loading { opacity: 0.7; cursor: wait; }

.wqp-step-error { background: #fde8e2; color: #c8401a; border: 1px solid rgba(200,64,26,0.3); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; display: none; }
.wqp-step-error.visible { display: flex; align-items: center; gap: 8px; }

.wqp-thankyou { text-align: center; padding: 60px 20px; max-width: 560px; margin: 0 auto; display: none; }
.wqp-thankyou.visible { display: block; animation: wqpStepIn 0.5s ease; }
.wqp-thankyou-icon { font-size: 64px; margin-bottom: 20px; display: block; }
.wqp-thankyou h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 12px; }
.wqp-thankyou p { font-size: 15px; color: var(--wqp-ink3); line-height: 1.6; }
.wqp-thankyou-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--wqp-c-light); color: var(--wqp-c); font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 20px; margin-top: 20px; }

.wqp-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: wqpSpin 0.7s linear infinite; display: inline-block; }
@keyframes wqpSpin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .wqp-tipo-grid { grid-template-columns: repeat(2,1fr); }
  .wqp-options-grid { grid-template-columns: 1fr; }
  .wqp-nav-btn { padding: 10px 18px; font-size: 13px; }
}
