/* ============================================================
   HOWZIT PORTAL — Lead Form Styles
   ============================================================
   Multi-step lead submission form with validation states.
   Matches the Howzit brand (orange primary, navy secondary).
   ============================================================ */

/* ---------- Lead Hero CTA Section ---------- */
.lead-hero-section {
  background: linear-gradient(135deg, #0a0f2c 0%, #0e1538 50%, #0a0f2c 100%);
  border-radius: 20px;
  padding: 40px 28px;
  margin: 0 auto 24px;
  max-width: 1200px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lead-hero-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,107,0,.15), transparent 70%);
  pointer-events: none;
}
.lead-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,107,0,.15);
  border: 1px solid rgba(255,107,0,.3);
  color: #ff8c40;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: .5px;
}
.lead-hero-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.2;
}
.lead-hero-title .highlight {
  background: linear-gradient(135deg, #ff6b00, #ff9500);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead-hero-subtitle {
  font-size: clamp(.95rem, 2.5vw, 1.15rem);
  color: #9fb3d6;
  margin: 0 auto 24px;
  max-width: 580px;
  line-height: 1.5;
}
.lead-hero-cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.lead-cta-primary {
  background: linear-gradient(135deg, #ff6b00, #ff8c00);
  color: #fff;
  border: none;
  padding: 15px 36px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: .25s;
  box-shadow: 0 6px 24px rgba(255,107,0,.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.lead-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255,107,0,.5);
}
.lead-cta-secondary {
  background: rgba(255,255,255,.08);
  color: #eaf2ff;
  border: 1.5px solid rgba(255,255,255,.2);
  padding: 15px 32px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: .25s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lead-cta-secondary:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.4);
  color: #fff;
  text-decoration: none;
}
.lead-hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}
.lead-hero-stat {
  text-align: center;
}
.lead-hero-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ff8c40;
  display: block;
}
.lead-hero-stat-label {
  font-size: 12px;
  color: #9fb3d6;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---------- Lead Form Modal ---------- */
/* Sized to match the "My Inquiries" sidebar pop-up (.inquiry-sidebar):
   a right-side panel, 380px wide, full viewport height. */
.lead-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2147483601;
  display: block;
  overflow: hidden;
  padding: 0;
  animation: lf-fade-in .25s ease;
}
@keyframes lf-fade-in { from { opacity: 0 } to { opacity: 1 } }

.lead-form-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100%;
  background: #fff;
  border-radius: 0;
  margin: 0;
  box-shadow: -4px 0 20px rgba(0,0,0,.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: lf-slide-in .3s ease;
}
@keyframes lf-slide-in {
  from { transform: translateX(100%) }
  to { transform: translateX(0) }
}

.lead-form-header {
  background: linear-gradient(135deg, #0a0f2c, #16213e);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lead-form-header-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lead-form-header-title i { color: #ff8c40 }
.lead-form-close {
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: .2s;
}
.lead-form-close:hover { background: rgba(255,255,255,.25) }

/* ---------- Progress Stepper ---------- */
.lead-form-stepper {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  background: #f8f9fc;
  border-bottom: 1px solid #e9ecf3;
  gap: 6px;
  flex-wrap: nowrap;
}
.lf-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #a0a8b8;
  transition: .25s;
  flex: 1;
  min-width: 0;
}
.lf-step-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lf-step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #e9ecf3;
  color: #a0a8b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: .25s;
}
.lf-step.active .lf-step-circle {
  background: linear-gradient(135deg, #ff6b00, #ff8c00);
  color: #fff;
}
.lf-step.active { color: #ff6b00 }
.lf-step.completed .lf-step-circle {
  background: #28a745;
  color: #fff;
}
.lf-step.completed { color: #28a745 }
.lf-step-line {
  flex: 0 0 20px;
  height: 2px;
  background: #e9ecf3;
  margin: 0 2px;
}
.lf-step-line.completed { background: #28a745 }

/* ---------- Form Body ---------- */
.lead-form-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}
.lf-step-content { display: none }
.lf-step-content.active { display: block; animation: lf-fade-in .3s ease }

.lf-field { margin-bottom: 16px }
.lf-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #2a3553;
  margin-bottom: 6px;
}
.lf-label .required { color: #e74c3c }
.lf-input, .lf-select, .lf-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e2e6ee;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #2a3553;
  transition: .2s;
  background: #fff;
}
.lf-input:focus, .lf-select:focus, .lf-textarea:focus {
  outline: none;
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255,107,0,.12);
}
.lf-textarea { resize: vertical; min-height: 80px }
.lf-input.error, .lf-select.error, .lf-textarea.error {
  border-color: #e74c3c;
  background: #fef5f5;
}
.lf-error-msg {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.lf-error-msg.show { display: block }

.lf-field-row {
  display: flex;
  gap: 12px;
}
.lf-field-row .lf-field { flex: 1; margin-bottom: 16px }

/* Urgency options as radio cards */
.lf-urgency-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 480px) { .lf-urgency-grid { grid-template-columns: 1fr } }

/* ---------- Responsive stepper (fix: last steps hidden on the right) ---------- */
@media (max-width: 560px) {
  .lead-form-stepper {
    padding: 12px 12px;
    gap: 4px;
  }
  .lf-step {
    gap: 5px;
    font-size: 11px;
    flex: 1 1 0;
    justify-content: center;
  }
  .lf-step-circle {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .lf-step-line {
    flex: 0 0 8px;
    margin: 0;
  }
  .lead-form-body {
    padding: 18px 14px;
  }
}

/* On very small screens, show only the active step's label in full and
   shrink the rest so nothing is cut off on the right. */
@media (max-width: 400px) {
  .lf-step-label {
    max-width: 52px;
  }
  .lf-step.active .lf-step-label {
    max-width: none;
  }
}
.lf-urgency-card {
  border: 2px solid #e2e6ee;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.lf-urgency-card:hover { border-color: #ffaa66 }
.lf-urgency-card.selected {
  border-color: #ff6b00;
  background: #fff5ed;
}
.lf-urgency-card input { display: none }
.lf-urgency-card .lf-urgency-icon {
  font-size: 18px;
  color: #ff6b00;
}
.lf-urgency-card .lf-urgency-label {
  font-weight: 600;
  color: #2a3553;
}
.lf-urgency-card .lf-urgency-desc {
  font-size: 11px;
  color: #8a92a3;
}

/* Preferred contact as pill buttons */
.lf-contact-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lf-contact-pill {
  padding: 8px 18px;
  border: 2px solid #e2e6ee;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #5a6478;
  transition: .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lf-contact-pill:hover { border-color: #ffaa66 }
.lf-contact-pill.selected {
  border-color: #ff6b00;
  background: #fff5ed;
  color: #ff6b00;
}

/* ---------- Form Footer (navigation) ---------- */
.lead-form-footer {
  padding: 16px 24px;
  background: #f8f9fc;
  border-top: 1px solid #e9ecf3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lf-btn {
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: .25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lf-btn-back {
  background: #e9ecf3;
  color: #5a6478;
}
.lf-btn-back:hover { background: #dde2eb }
.lf-btn-next, .lf-btn-submit {
  background: linear-gradient(135deg, #ff6b00, #ff8c00);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,107,0,.25);
}
.lf-btn-next:hover, .lf-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,107,0,.4);
}
.lf-btn-submit {
  background: linear-gradient(135deg, #28a745, #2ecc71);
  box-shadow: 0 4px 16px rgba(40,167,69,.25);
}
.lf-btn-submit:hover {
  box-shadow: 0 8px 24px rgba(40,167,69,.4);
}
.lf-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Success Screen ---------- */
.lf-success {
  text-align: center;
  padding: 40px 24px;
}
.lf-success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #28a745, #2ecc71);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
  animation: lf-pop .4s ease;
}
@keyframes lf-pop {
  from { transform: scale(0); opacity: 0 }
  to { transform: scale(1); opacity: 1 }
}
.lf-success-title {
  font-size: 24px;
  font-weight: 900;
  color: #2a3553;
  margin: 0 0 8px;
}
.lf-success-subtitle {
  font-size: 15px;
  color: #6a7388;
  margin: 0 0 20px;
  line-height: 1.5;
}
.lf-success-ref {
  background: #f0f7ff;
  border: 1px solid #cce4ff;
  border-radius: 10px;
  padding: 14px;
  margin: 0 auto 20px;
  max-width: 320px;
}
.lf-success-ref-label {
  font-size: 12px;
  color: #8a92a3;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.lf-success-ref-value {
  font-size: 22px;
  font-weight: 900;
  color: #0066cc;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}
.lf-success-matches {
  background: #f0fff4;
  border: 1px solid #c6efce;
  border-radius: 10px;
  padding: 14px;
  margin: 0 auto 20px;
  max-width: 320px;
  font-size: 14px;
  color: #28a745;
  font-weight: 600;
}
.lf-success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ---------- Error Screen ---------- */
.lf-error-screen {
  text-align: center;
  padding: 40px 24px;
}
.lf-error-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #fee;
  color: #e74c3c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}
.lf-error-title {
  font-size: 22px;
  font-weight: 800;
  color: #2a3553;
  margin: 0 0 8px;
}
.lf-error-msg-text {
  font-size: 15px;
  color: #6a7388;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ---------- Loading state ---------- */
.lf-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: #ff6b00;
  font-weight: 600;
}
.lf-spinner {
  width: 20px; height: 20px;
  border: 3px solid #ffe0cc;
  border-top-color: #ff6b00;
  border-radius: 50%;
  animation: lf-spin .8s linear infinite;
}
@keyframes lf-spin { to { transform: rotate(360deg) } }

/* ============================================================
   MULTI-GROUP MODE (My Inquiries -> Get Free Quotes)
   ============================================================ */
.lf-group-intro {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 0 16px;
}
.lf-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.lf-notice i { font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.lf-notice-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.lf-group-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #f8fafc;
}
.lf-group-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.lf-group-card-cat {
  font-weight: 700;
  font-size: 14px;
  color: #2d1952;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lf-group-card-cat i { color: #ff6b00; }
.lf-group-card-count {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #1885b0;
  padding: 3px 10px;
  border-radius: 20px;
}
.lf-group-biz-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.lf-group-biz-list li {
  font-size: 13px;
  color: #334155;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lf-group-biz-list li i { color: #94a3b8; font-size: 12px; }
.lf-group-card-note {
  font-size: 12px;
  color: #64748b;
  font-style: italic;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
}

.lf-group-step-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #2d1952 0%, #1885b0 100%);
  color: #fff;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.lf-group-step-banner i { color: #ffb020; }
.lf-group-step-of { font-size: 12px; opacity: 0.85; margin-left: auto; }

/* Success screen: per-group reference list */
.lf-group-refs {
  max-width: 420px;
  margin: 0 auto 20px;
  text-align: left;
}
.lf-group-ref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #f8fafc;
}
.lf-group-ref-cat {
  font-size: 13px;
  font-weight: 600;
  color: #2d1952;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lf-group-ref-cat i { color: #ff6b00; }
.lf-group-ref-val {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #1885b0;
}

/* ---------- Responsive: full-width panel on small screens ---------- */
/* Matches the "My Inquiries" sidebar which goes full-width on mobile. */
@media (max-width: 480px) {
  .lead-form-modal {
    width: 100% !important;
    max-width: 100vw;
  }
}

/* ============================================================
   POPIA CONSENT CHECKBOX (lead form + quote flow)
   ============================================================ */
.lf-consent-field { margin-top: 4px; }
.lf-consent {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f8f5ff; border: 1px solid #e2d9f7; border-radius: 8px;
  padding: 12px 14px; cursor: pointer;
  font-size: 12.5px; line-height: 1.55; color: #444;
  transition: border-color .2s, background .2s;
}
.lf-consent:hover { border-color: #b9a7e8; }
.lf-consent input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px; accent-color: #ff6a02;
  cursor: pointer; flex-shrink: 0;
}
.lf-consent input[type="checkbox"].error {
  outline: 2px solid #e74c3c; outline-offset: 2px; border-radius: 3px;
}
.lf-consent span { user-select: none; }
.lf-consent a { color: #2d1952; text-decoration: underline; font-weight: 600; }
.lf-consent a:hover { color: #ff6a02; }
#lf-error-consent { margin-top: 6px; }

/* Quote flow confirm-step consent (quote-flow.css equivalents) */
.qf-consent {
  margin-top: 16px; background: #f8f5ff; border: 1px solid #e2d9f7;
  border-radius: 8px; padding: 12px 14px;
}
.qf-consent-label {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 12.5px; line-height: 1.55; color: #444;
}
.qf-consent-label input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px; accent-color: #ff6a02;
  cursor: pointer; flex-shrink: 0;
}
.qf-consent-label input[type="checkbox"].error {
  outline: 2px solid #e74c3c; outline-offset: 2px; border-radius: 3px;
}
.qf-consent-label a { color: #2d1952; text-decoration: underline; font-weight: 600; }
.qf-consent-label a:hover { color: #ff6a02; }
.qf-consent-error {
  display: none; margin-top: 6px; color: #e74c3c;
  font-size: 12px; font-weight: 600;
}
.qf-consent-error.show { display: block; }
