/* ============================================================
   MoonAI — lead-modal.css
   Modal form for lead capture (name / phone / business sphere)
   ============================================================ */

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 10, 46, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .22s ease;
}
.lead-modal.is-open {
  display: flex;
  opacity: 1;
}

.lead-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 30px 80px -20px rgba(15, 10, 46, 0.4),
              0 0 0 1px rgba(15, 10, 46, 0.06);
  transform: translateY(12px) scale(.98);
  transition: transform .28s cubic-bezier(.2,.7,.2,1);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.lead-modal.is-open .lead-modal__dialog {
  transform: translateY(0) scale(1);
}

.lead-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #51545C;
  transition: background .15s ease, color .15s ease;
}
.lead-modal__close:hover {
  background: #F2F2EE;
  color: #0E1B17;
}
.lead-modal__close .ms { font-size: 22px; }

.lead-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6E56F8;
  margin-bottom: 10px;
}
.lead-modal__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6E56F8;
  box-shadow: 0 0 0 4px rgba(110,86,248,.15);
}
.lead-modal__title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: #0E1B17;
  letter-spacing: -0.01em;
}
.lead-modal__subtitle {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: #51545C;
}

.lead-form { display: flex; flex-direction: column; gap: 14px; }
.lead-form__field { display: flex; flex-direction: column; gap: 6px; }
.lead-form__label {
  font-size: 12px;
  font-weight: 600;
  color: #2B2D33;
  letter-spacing: .01em;
}
.lead-form__input,
.lead-form__select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: #0E1B17;
  background: #FAFAF7;
  border: 1px solid #E6E7E2;
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.lead-form__select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2351545C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.lead-form__input:focus,
.lead-form__select:focus {
  border-color: #6E56F8;
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(110,86,248,.15);
}
.lead-form__input::placeholder { color: #A7AAB3; }

.lead-form__error {
  display: none;
  font-size: 12px;
  color: #D14343;
  margin-top: -2px;
}
.lead-form__field.has-error .lead-form__input,
.lead-form__field.has-error .lead-form__select {
  border-color: #D14343;
  background: #FFF6F6;
}
.lead-form__field.has-error .lead-form__error { display: block; }

.lead-form__submit {
  margin-top: 6px;
  height: 52px;
  border-radius: 12px;
  background: #0E1B17;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, background .15s ease, opacity .15s ease;
}
.lead-form__submit:hover { background: #1A1240; }
.lead-form__submit:active { transform: translateY(1px); }
.lead-form__submit:disabled { opacity: .6; cursor: progress; }
.lead-form__submit .ms { font-size: 18px; }

.lead-form__legal {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #767A85;
  text-align: center;
}
.lead-form__legal a {
  color: #51545C;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Success state */
.lead-modal__success {
  display: none;
  text-align: center;
  padding: 8px 0 4px;
}
.lead-modal.is-success .lead-form,
.lead-modal.is-success .lead-modal__eyebrow,
.lead-modal.is-success .lead-modal__title,
.lead-modal.is-success .lead-modal__subtitle { display: none; }
.lead-modal.is-success .lead-modal__success { display: block; }

.lead-modal__success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #EAF7E8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1F8A5B;
}
.lead-modal__success-icon .ms { font-size: 36px; }
.lead-modal__success h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #0E1B17;
}
.lead-modal__success p {
  margin: 0 auto;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.5;
  color: #51545C;
}

@media (max-width: 560px) {
  .lead-modal { padding: 16px; align-items: flex-end; }
  .lead-modal__dialog {
    padding: 26px 22px;
    border-radius: 20px 20px 16px 16px;
    max-height: calc(100vh - 32px);
  }
  .lead-modal__title { font-size: 21px; }
}

/* Lock body scroll when modal open */
body.lead-modal-open { overflow: hidden; }
