/* ============================================================
   Shared lead form (js/lead-form.js)
   Used on: index.html (hero "Get a Free Quote") + contact.html ("Request Service")
============================================================ */
.lf-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.lf-group label,
.lf-photo-label {
  font-size: .875rem; font-weight: 600; color: #1f2937;
}
.lf-photo-label { display: flex; align-items: center; gap: 7px; }
.lf-req { color: #ef4444; }
.lf-optional {
  display: inline-block; margin-left: 4px;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #6b7280; background: #f3f4f6; border-radius: 20px; padding: 2px 8px; vertical-align: middle;
}

.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.lf input[type="text"],
.lf input[type="tel"],
.lf input[type="email"],
.lf select,
.lf textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: .9375rem; font-family: inherit; color: #111827; background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.lf textarea { resize: vertical; }
.lf input:focus, .lf select:focus, .lf textarea:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(59,110,128,.15);
}
.lf input.error, .lf select.error, .lf textarea.error { border-color: #ef4444; }

.lf-error { display: none; font-size: .8rem; line-height: 1.35; color: #dc2626; }
.lf-error.show { display: block; }
.lf input.error:focus, .lf select.error:focus, .lf textarea.error:focus {
  border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

/* Summary alert at top of form (validation / send failure) */
.lf-alert { display: none; border-radius: 9px; padding: 11px 14px; margin-bottom: 14px; font-size: .875rem; line-height: 1.45; }
.lf-alert.show { display: block; }
.lf-alert--error { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; }
.lf-alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.lf-alert:focus { outline: none; }

/* Honeypot — hidden from people, visible to bots */
.lf-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Photo upload */
.lf-upload {
  position: relative;
  border: 2px dashed #d1d5db; border-radius: 10px; background: var(--gray-soft);
  cursor: pointer; overflow: hidden; min-height: 96px;
  transition: border-color .2s, background .2s;
}
.lf-upload:hover, .lf-upload:focus, .lf-upload.dragover {
  border-color: var(--blue-mid); background: #edf4f8; outline: none;
}
.lf-upload input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2;
}
.lf-upload__inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 18px 14px; color: var(--gray-text); text-align: center; pointer-events: none;
}
.lf-upload__text { font-size: .9rem; font-weight: 600; color: var(--blue-mid); }
.lf-upload__hint { font-size: .775rem; color: var(--gray-text); }
.lf-previews { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; pointer-events: none; }
.lf-previews:empty { display: none; }
.lf-preview { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 80px; }
.lf-preview__remove {
  position: absolute; top: -6px; right: -6px; z-index: 4;
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%;
  background: #ef4444; color: #fff; font-size: 15px; line-height: 22px; text-align: center;
  cursor: pointer; pointer-events: auto; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.lf-preview__remove:hover { background: #dc2626; }
.lf-preview img {
  width: 80px; height: 60px; object-fit: cover; border-radius: 6px; border: 2px solid var(--blue-mid);
}
.lf-preview span { font-size: .68rem; color: var(--gray-text); text-align: center; word-break: break-all; line-height: 1.2; }

/* Consent + submit */
.lf-consent {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: .8125rem; color: var(--gray-text); line-height: 1.5; margin-bottom: 16px;
}
.lf-consent input { margin-top: 3px; flex-shrink: 0; accent-color: var(--blue-deep); }
.lf-group--consent { margin-bottom: 14px; }
.lf-group--consent .lf-consent { margin-bottom: 0; }
.lf-consent input.error { outline: 2px solid #ef4444; outline-offset: 2px; }

.lf-submit {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 20px;
  background: var(--orange); color: #fff;
  font-size: 1rem; font-weight: 700; font-family: inherit;
  border: none; border-radius: 9px; cursor: pointer;
  transition: background .2s, transform .15s;
}
.lf-submit:hover { background: #d96a25; transform: translateY(-1px); }
.lf-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Success */
.lf-success {
  display: none; text-align: center;
  background: #ecfdf5; border: 2px solid #10b981; border-radius: 12px;
  padding: 24px 22px;
}
.lf-success.show { display: block; }
.lf-success__icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: #22c55e; color: #fff; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.lf-success h4 { font-size: 1.2rem; font-weight: 700; color: #065f46; margin-bottom: 8px; }
.lf-success p { font-size: .9375rem; color: #065f46; }

@media (max-width: 520px) {
  .lf-row { grid-template-columns: 1fr; gap: 0; }
}
