/* ============================================================
   留言表单-采购咨询 (page-faq page-message-form) — 主设计稿 1166:21866
   (X-34392,Y3673) 1920×1986
   banner(0,64) 1920×460 深灰 + 表单(494,604) 932×756 + footer(0,1460)
   字段 446×48 圆角6 灰底 #F2F3F5, 行距 72, 提交 216×56 圆角6 #2168E5
   = faq.css 头部白底样式 + 表单专属
   ============================================================ */
@import url('faq.css');

/* ---------- 页面白底 ---------- */
body.page-message-form { background: #fff; }

/* ============ banner (设计 (0,64) 1920×460 浅色图片 + 左侧白雾) ============ */
.mf-banner {
  position: relative;
  height: 460px;
  margin-top: 64px;                  /* fixed header 占位 */
  background: #D3E2F4;               /* 图片加载前底色 */
  overflow: hidden;
}
.mf-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* 白雾遮罩: PC 隐藏, 移动端显示 (深色标题在图片上可读) */
.mf-banner-mask {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(211,226,244,.55) 0%, rgba(211,226,244,.75) 60%, rgba(211,226,244,.9) 100%);
  pointer-events: none;
}
.mf-banner-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mf-banner-title {
  margin: 0;
  font-size: 48px;
  font-weight: 749;
  line-height: 72px;
  letter-spacing: 2.4px;
  color: #222426;                    /* 设计稿标题深色 */
}
.mf-banner-sub {
  margin: 12px 0 0;                  /* 标题底 290 → 副标题 302 = 12 */
  font-size: 20px;
  font-weight: 513;
  line-height: 40px;
  color: #3A3C40;                    /* 设计稿副标题深色 */
  opacity: .8;
}

/* ============ 表单容器 (设计 Group 4875 (494,604) 932×756) ============ */
.mf-form-wrap {
  width: 932px;
  max-width: calc(100% - 48px);
  margin: 0 auto 100px;
  padding: 80px 0 0;                 /* banner 底 524 → 表单 604 = 80 */
}
.mf-form { width: 100%; }

/* ---------- 字段网格: 2 列 (输入框 446×48, 行距 72) ---------- */
.mf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 40px;                    /* 行距 48+24=72 (设计 604→676), 列距 40 */
}
.mf-field {
  display: flex;
  flex-direction: column;
}
.mf-field--full { grid-column: 1 / -1; }
.mf-field--spacer { height: 0; }     /* 与 country 同行占右列, 无行距影响 */

.mf-control {
  position: relative;
  display: block;
  height: 48px;
}
.mf-input,
.mf-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #F2F3F5;               /* Rectangle 116 #F2F3F5 */
  font-size: 16px;
  font-weight: 513;
  line-height: 48px;
  color: #2E3033;
  outline: 0;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.mf-input:focus,
.mf-select:focus {
  background: #fff;
  box-shadow: 0 0 0 1px #2168E5;
}
.mf-input::placeholder { color: #9A9DA1; }
.mf-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  color: #9A9DA1;                    /* 未选时同 placeholder */
}
.mf-select:valid { color: #2E3033; }  /* 选中后文字深色 */
.mf-select option { color: #2E3033; }
.mf-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9A9DA1;
  pointer-events: none;
}

/* ---------- 单选 (有无销售对接, 设计 18px 圆, label 与圆圈同行) ---------- */
.mf-field--radio {
  flex-direction: row;
  align-items: center;
  gap: 40px;                         /* 设计: label 右 638 → 圆点 678 = 40 */
  height: 48px;
}
/* 「有无销售和您对接？」同行右列的「销售名称」: 选「无」时由 JS 加 .is-hidden 隐藏
   (display:none 让网格项真正退出, 该行只剩左侧单选项, 后面的字段不受影响) */
.mf-field--sales-name.is-hidden { display: none; }
.mf-label {
  display: block;
  font-size: 16px;
  font-weight: 513;
  line-height: 28px;
  color: #2E3033;
}
.mf-radio-group {
  display: flex;
  align-items: center;
  gap: 32px;                         /* 设计: 有→圆点2 = 32 */
}
.mf-radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.mf-radio input { position: absolute; opacity: 0; pointer-events: none; }
.mf-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #B4BDCC;
  box-sizing: border-box;
  position: relative;
  transition: border-color .2s ease;
}
.mf-radio input:checked + .mf-radio-dot { border-color: #2168E5; }
.mf-radio input:checked + .mf-radio-dot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #2168E5;
}
.mf-radio-txt {
  font-size: 16px;
  font-weight: 513;
  line-height: 28px;
  color: #2E3033;
}

/* ---------- 备注 (设计 (494,1108) 932×120 圆角6) ---------- */
.mf-control--area { height: auto; }
.mf-textarea {
  width: 100%;
  height: 120px;
  padding: 12px 16px;
  border: 0;
  border-radius: 6px;
  background: #F2F3F5;
  font-size: 16px;
  font-weight: 513;
  line-height: 28px;
  color: #2E3033;
  outline: 0;
  resize: none;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.mf-textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 1px #2168E5;
}
.mf-textarea::placeholder { color: #9A9DA1; }

/* ---------- 隐私条款 (设计 (494,1244) 复选框 18×18) ---------- */
.mf-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;                  /* 备注底 1228 → 条款 1244 = 16; 实测差4 微调 */
  cursor: pointer;
  user-select: none;
}
.mf-agree input { position: absolute; opacity: 0; pointer-events: none; }
.mf-checkbox-box {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #B4BDCC;
  border-radius: 3px;
  box-sizing: border-box;
  position: relative;
  transition: border-color .2s ease, background-color .2s ease;
}
.mf-agree input:checked + .mf-checkbox-box {
  border-color: #2168E5;
  background: #2168E5;
}
.mf-agree input:checked + .mf-checkbox-box::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 9px;
  margin-left: -2.5px;               /* 5px 宽居中 */
  margin-top: -4.5px;                /* 9px 高居中 */
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transform-origin: center;
}
.mf-agree-txt {
  font-size: 13px;
  font-weight: 513;
  line-height: 20px;
  color: #2E3033;
  opacity: .85;
}
/* 《隐私保护条款》: 设计稿覆盖色 #005AFA 链接 */
.mf-privacy {
  color: #005AFA;
  text-underline-offset: 2px;
  transition: opacity .2s ease;
}
.mf-privacy:hover { opacity: .8; }

/* ---------- 提交 (设计 (852,1304) 216×56 圆角6 #2168E5) ---------- */
.mf-submit-row {
  margin-top: 36px;                  /* 条款底 1268 → 提交 1304 = 36 */
  text-align: center;
}
.mf-submit {
  width: 216px;
  height: 56px;
  border: 0;
  border-radius: 6px;
  background: #2168E5;
  color: #fff;
  font-size: 18px;
  font-weight: 666;
  line-height: 20px;
  cursor: pointer;
  transition: background-color .25s ease;
}
.mf-submit:hover { background: #1A56C4; }

/* ============ 自适应 ============ */
@media (max-width: 1100px) {
  .mf-banner { height: 400px; }
  .mf-banner-title { font-size: 40px; line-height: 60px; }
  .mf-banner-sub { font-size: 18px; line-height: 32px; }
}

@media (max-width: 900px) {
  .mf-form-wrap { width: 100%; padding-top: 56px; }
  .mf-banner { height: 360px; }
  .mf-banner-title { font-size: 34px; line-height: 52px; }
}

@media (max-width: 767px) {
  .mf-banner { height: 320px; }
  .mf-banner-mask { display: none; }   /* 客户要求: 移动端隐藏遮罩 */
  .mf-banner-inner { justify-content: center; }
  .mf-banner-title { font-size: 28px; line-height: 44px; letter-spacing: 1px; }
  .mf-banner-sub { font-size: 15px; line-height: 26px; }
  .mf-form-wrap { padding-top: 40px; }
  .mf-grid { grid-template-columns: 1fr; gap: 16px; }
  .mf-field--spacer { display: none; }
  .mf-submit-row { margin-top: 32px; }
  .mf-field--radio { height: auto; margin-top: 8px; }
}

@media (max-width: 400px) {
  .mf-banner { height: 280px; }
  .mf-banner-title { font-size: 24px; line-height: 38px; }
  .mf-banner-sub { font-size: 14px; line-height: 24px; }
  .mf-submit { width: 100%; }
}

/* ============ 提交成功页 (设计稿 1166:22102) ============ */
.mf-success-main {
  margin-top: 64px;                  /* fixed header 占位 */
  padding: 235px 0 339px;            /* header 64 → 插画 299 = 235; 文案底 → footer 960 */
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mf-success-ill { width: 360px; max-width: 100%; }
.mf-success-ill svg { display: block; width: 100%; height: auto; }
.mf-success-msg { margin-top: 24px; text-align: center; }
.mf-success-title {
  margin: 0;
  font-size: 20px;
  font-weight: 666;
  line-height: 30px;
  color: #2E3033;
}
.mf-success-sub {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 513;
  line-height: 20px;
  color: #2E3033;
  opacity: .85;
}
.mf-success-row { margin-top: 32px; }
.mf-success-row .faq-empty-btn { min-width: 124px; height: 48px; }

@media (max-width: 767px) {
  .mf-success-main { padding: 140px 0 120px; }
  .mf-success-ill { width: 260px; }
}

/* ---------- 提交错误提示 (PHP 验证失败时显示) ---------- */
.mf-error {
  max-width: 932px;
  max-width: calc(100% - 48px);
  margin: 0 auto 16px;
  padding: 12px 16px;
  border: 1px solid #F5C2C7;
  border-radius: 6px;
  background: #FFF5F5;
  color: #B02A37;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

/* ============ 移动端 banner 图 (后台可上传; 留空回退 PC 图) ============ */
.mf-banner-img--m { display: none; }

@media (max-width: 767px) {
  .mf-banner-img--pc { display: none; }
  .mf-banner-img--m { display: block; }
}

/* 移动端: 隐藏 banner 遮罩 (客户要求) */
@media (max-width: 767px) {
  .mf-banner-mask { display: none; }
}
