/* ==========================================================================
   需求提交弹窗（首页首屏「获取方案与报价」「查看服务能力」共用）
   独立文件：桌面首页 index.html 与移动首页 pindex.html 都引用这一份，
   所以这里不依赖 index.css / pindex.css 的任何变量与选择器。
   ========================================================================== */

.leadModal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.leadModal[hidden] {
  display: none;
}

/* 打开时锁住背景滚动，避免弹窗后面还在滑 */
.leadModal-open {
  overflow: hidden !important;
}

.leadModal__mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 16, 38, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.leadModal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 34px 34px 26px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(4, 16, 44, 0.38);
  box-sizing: border-box;
  animation: leadModalIn 0.26s cubic-bezier(0.22, 0.68, 0.3, 1) both;
}

@keyframes leadModalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .leadModal__dialog {
    animation: none;
  }
}

.leadModal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f5fa;
  color: #6b7a94;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.leadModal__close:hover {
  background: #e6ebf5;
  color: #26374f;
}

.leadModal__close svg {
  width: 16px;
  height: 16px;
  margin: 0 auto;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.leadModal__eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #e2412a;
}

.leadModal__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 700;
  color: #101d33;
  letter-spacing: 0.01em;
}

.leadModal__desc {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #5c6b84;
}

.leadModal__form {
  margin-top: 22px;
}

.leadModal__field {
  margin-bottom: 14px;
}

.leadModal__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #2b3a52;
}

.leadModal__input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #fbfcfe;
  color: #101d33;
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.leadModal__input::placeholder {
  color: #9aa7bd;
}

.leadModal__input:focus {
  outline: none;
  border-color: #ff5a3c;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 90, 60, 0.14);
}

.leadModal__textarea {
  height: auto;
  min-height: 88px;
  padding: 12px 14px;
  line-height: 1.7;
  resize: vertical;
}

.leadModal__field.is-invalid .leadModal__input {
  border-color: #e04141;
  background: #fffafa;
}

.leadModal__err {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  font-style: normal;
  line-height: 1.5;
  color: #d92d2d;
}

.leadModal__field.is-invalid .leadModal__err {
  display: block;
}

/* 蜜罐字段：正常访客看不到，脚本会填 */
.leadModal__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.leadModal__submit {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff5a3c 0%, #f5281f 100%);
  box-shadow: 0 14px 28px rgba(226, 44, 28, 0.3);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.leadModal__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(226, 44, 28, 0.36);
}

.leadModal__submit:disabled {
  opacity: 0.68;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.leadModal__tips {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.6;
  color: #8290a8;
}

.leadModal__tips a {
  color: #d8412b;
  font-weight: 600;
  text-decoration: none;
}

.leadModal__tips a:hover {
  text-decoration: underline;
}

/* 提交成功面板 */
.leadModal__done {
  padding: 12px 0 4px;
  text-align: center;
}

.leadModal__done[hidden] {
  display: none;
}

.leadModal__doneIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5a3c 0%, #f5281f 100%);
  box-shadow: 0 14px 28px rgba(226, 44, 28, 0.26);
}

.leadModal__doneIcon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.leadModal__doneText {
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 500;
  color: #1b2942;
}

.leadModal__doneBtn {
  min-width: 132px;
  height: 44px;
  margin-top: 22px;
  padding: 0 22px;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #f7f9fd;
  color: #26374f;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.leadModal__doneBtn:hover {
  background: #eef2f9;
  border-color: #c9d4e4;
}

/* 移动首页把首屏主按钮从 div 换成 a，链接样式需要归零 */
a.home-v2-btn {
  text-decoration: none;
}

@media (max-width: 640px) {
  .leadModal {
    padding: 16px;
    align-items: flex-end;
  }

  .leadModal__dialog {
    max-width: 100%;
    max-height: calc(100vh - 32px);
    padding: 26px 20px 20px;
    border-radius: 16px;
  }

  .leadModal__title {
    font-size: 19px;
    padding-right: 24px;
  }

  .leadModal__desc {
    font-size: 13px;
  }

  .leadModal__form {
    margin-top: 18px;
  }

  .leadModal__input {
    height: 44px;
    font-size: 16px; /* 16px 起 iOS 不再自动放大输入框 */
  }

  .leadModal__textarea {
    height: auto;
  }

  .leadModal__submit {
    height: 48px;
    font-size: 15.5px;
  }

  .leadModal__doneText {
    font-size: 15px;
  }
}
