/* ============================================================
   咨询弹窗 / 通用表单样式（v10 新主题配套）
   说明：只负责「弹窗 + 表单」这一层，
        悬浮条本体样式仍完全沿用 float-service-v7.css，未作改动。
   ============================================================ */

/* ---------- 遮罩 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 26, 40, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}
.modal-mask.open { display: flex; }

.modal-box {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(8, 26, 40, .3);
  position: relative;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn .3s cubic-bezier(.34, 1.3, .64, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.modal-head {
  padding: 26px 30px 18px;
  border-bottom: 1px solid #EEF3F7;
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(180deg, #F6FAFD, #fff);
}
.modal-head h3 {
  font-size: 19px;
  font-weight: 700;
  color: #14202B;
  margin: 0 0 6px;
  padding-right: 44px;
  letter-spacing: -.01em;
}
.modal-head p { font-size: 13px; color: #7C8894; line-height: 1.65; margin: 0; }

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: #EFF4F8;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s, transform .25s;
  padding: 0;
}
.modal-close:hover { background: #E2EBF2; color: #14202B; transform: rotate(90deg); }

.modal-body {
  padding: 22px 30px 26px;
  overflow-y: auto;
  flex: 1;
}
.modal-loading { padding: 44px 0; text-align: center; color: #94a3b8; font-size: 14px; }

/* ---------- 表单基础 ---------- */
.cf-form { display: flex; flex-direction: column; gap: 15px; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 16px; }
.cf-item { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.cf-item.cf-full { grid-column: 1 / -1; }
.cf-label { font-size: 13px; color: #46545F; font-weight: 600; }
.cf-label .req { color: #D9534F; margin-left: 2px; }
.cf-input,
.cf-select,
.cf-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #DFE7EE;
  background: #fff;
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 14px;
  color: #14202B;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color .16s, box-shadow .16s;
  -webkit-appearance: none;
  appearance: none;
}
.cf-textarea { min-height: 104px; resize: vertical; }
.cf-input:focus,
.cf-select:focus,
.cf-textarea:focus {
  outline: 0;
  border-color: #0E5C8A;
  box-shadow: 0 0 0 3px rgba(14, 92, 138, .12);
}
.cf-input::placeholder,
.cf-textarea::placeholder { color: #A9B4BE; }
.cf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237C8894' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.cf-radios { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 2px; }
.cf-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #46545F; cursor: pointer; }
.cf-radio input { accent-color: #0E5C8A; width: 15px; height: 15px; }
.cf-hint { font-size: 12px; color: #94a3b8; }

/* 提交按钮 */
.cf-submit,
.cf-form .btn,
.cf-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: #0E5C8A;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .18s, transform .18s, box-shadow .18s;
  box-shadow: 0 6px 18px -8px rgba(14, 92, 138, .6);
  align-self: flex-start;
}
.cf-submit:hover,
.cf-form button[type="submit"]:hover { background: #0A4368; transform: translateY(-1px); }

/* 表单提示 */
.cf-msg { border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.7; }
.cf-msg.ok { background: #ECF8F1; border: 1px solid #BFE8CF; color: #1B7A44; }
.cf-msg.err { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }
.lp-consult-tip {
  display: block;
  background: #EAF3F9;
  border: 1px solid #CFE3EF;
  color: #0E5C8A;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .modal-box { border-radius: 16px; max-height: calc(100vh - 32px); }
  .modal-head { padding: 22px 20px 15px; }
  .modal-head h3 { font-size: 17px; }
  .modal-body { padding: 18px 20px 22px; }
  .cf-grid { grid-template-columns: 1fr; }
  .cf-submit, .cf-form button[type="submit"] { width: 100%; align-self: stretch; }
}
