/*
 * ╔══════════════════════════════════════════════════════════════╗
 * ║              LEAD CAPTURE MODAL  (email + website)          ║
 * ║              Matches the "Popup" Figma design.              ║
 * ╚══════════════════════════════════════════════════════════════╝
 */

#lfm-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg,
    rgba(28, 25, 23, 0.45) 0%,
    rgba(28, 25, 23, 0.55) 100%);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  z-index: 1000;
  opacity: 0;
  transition: opacity 220ms ease;
  padding: 20px;
  overflow-y: auto;
}
#lfm-backdrop.lfm-open { display: flex; opacity: 1; }
body.lfm-locked { overflow: hidden; }

#lfm-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 36px 28px 30px;
  box-shadow:
    0 24px 80px rgba(28, 25, 23, 0.28),
    0 4px 16px rgba(28, 25, 23, 0.12);
  transform: translateY(16px) scale(0.98);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  margin: auto;
}
#lfm-backdrop.lfm-open #lfm-card { transform: translateY(0) scale(1); }

.lfm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  color: #78716C;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, color 140ms ease;
}
.lfm-close:hover { background: #F5F5F4; color: #1C1917; }

.lfm-logo {
  display: block;
  width: 96px;
  height: auto;
  margin: 4px auto 18px;
}

.lfm-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: #1C1917;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.lfm-sub {
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: #78716C;
  margin: 0 0 24px;
}

.lfm-field { margin-bottom: 14px; }
.lfm-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1C1917;
  margin-bottom: 6px;
}
.lfm-field input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  color: #1C1917;
  background: #FFFFFF;
  border: 1px solid #D6D3D1;
  border-radius: 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.lfm-field input::placeholder { color: #A8A29E; }
.lfm-field input:focus {
  border-color: #4B4E80;
  box-shadow: 0 0 0 3px rgba(75, 78, 128, 0.18);
}
.lfm-field input.lfm-invalid {
  border-color: #D14747;
  box-shadow: 0 0 0 3px rgba(209, 71, 71, 0.16);
}

.lfm-error {
  font-size: 12px;
  color: #D14747;
  margin: -8px 0 8px;
  min-height: 16px;
}

.lfm-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  margin-top: 8px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  background: #4B4E80;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease, transform 80ms ease,
              box-shadow 140ms ease;
  box-shadow: 0 2px 10px rgba(75, 78, 128, 0.28),
              0 1px 3px rgba(75, 78, 128, 0.18);
  font-family: inherit;
  letter-spacing: 0.01em;
}
.lfm-submit:hover:not(:disabled) {
  background: #3A3D65;
  box-shadow: 0 4px 18px rgba(75, 78, 128, 0.36),
              0 1px 4px rgba(75, 78, 128, 0.20);
}
.lfm-submit:active:not(:disabled) { transform: scale(0.985); }
.lfm-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.lfm-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: lfm-spin 700ms linear infinite;
  display: none;
}
.lfm-submit.lfm-loading .lfm-spinner { display: inline-block; }
.lfm-submit.lfm-loading .lfm-submit-label { opacity: 0.85; }

@keyframes lfm-spin { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  #lfm-card { padding: 30px 22px 26px; border-radius: 20px; }
  .lfm-title { font-size: 17px; }
}
