/* ==========================================================================
   今闪官网 · 全局商机留资与预约弹窗 (Lead Modal Sandboxed Styles)
   遵循工程隔离原则，全部采用 .lead-modal-* 独立前缀
   ========================================================================== */

.lead-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lead-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.lead-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.06);
  padding: 32px;
  box-sizing: border-box;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
  font-family: inherit;
}

.lead-modal-backdrop.is-active .lead-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Close Button */
.lead-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
  padding: 0;
}

.lead-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Header */
.lead-modal-header {
  margin-bottom: 24px;
  padding-right: 32px;
}

.lead-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.lead-modal-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

.lead-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.lead-modal-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Form Groups */
.lead-modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lead-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-modal-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lead-modal-label-req {
  color: #ef4444;
  margin-left: 2px;
}

.lead-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 14px;
  color: #0f172a;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
}

.lead-modal-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lead-modal-input.is-error {
  border-color: #ef4444;
  background: #fff5f5;
}

/* Role Pills */
.lead-modal-roles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.lead-modal-role-pill {
  position: relative;
}

.lead-modal-role-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lead-modal-role-pill label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  text-align: center;
}

.lead-modal-role-pill input:checked + label {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
  box-shadow: 0 0 0 1px #2563eb;
}

/* Submit Button */
.lead-modal-submit-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  background: #2563eb;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  margin-top: 6px;
  font-family: inherit;
}

.lead-modal-submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.42);
}

.lead-modal-submit-btn:active {
  transform: translateY(0);
}

.lead-modal-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Guarantee / Fallback Footer */
.lead-modal-footer-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}

.lead-modal-wechat-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lead-modal-wechat-link:hover {
  text-decoration: underline;
}

/* Success State View */
.lead-modal-success {
  display: none;
  text-align: center;
  padding: 20px 10px 10px;
}

.lead-modal-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  box-shadow: 0 0 0 8px #f0fdf4;
}

.lead-modal-success-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.lead-modal-success-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
}

.lead-modal-success-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  font-size: 13px;
  color: #334155;
  text-align: left;
  line-height: 1.7;
}

.lead-modal-success-close-btn {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background: #f1f5f9;
  border: none;
  border-radius: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lead-modal-success-close-btn:hover {
  background: #e2e8f0;
}

/* Mobile responsive bottom sheet */
@media (max-width: 640px) {
  .lead-modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  
  .lead-modal-dialog {
    max-width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 24px 20px 32px;
    transform: translateY(100%);
  }
  
  .lead-modal-backdrop.is-active .lead-modal-dialog {
    transform: translateY(0);
  }
}
