/* 表单大师 form_master - 前台样式（简洁白底 / 移动端优先） */
* { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
.fm-body {
	background: #f4f5f7;
	color: #1f2329;
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}
.fm-body *, .fm-body *:before, .fm-body *:after { box-sizing: border-box; }

.fm-page { max-width: 640px; margin: 0 auto; padding: 16px 14px 40px; }

.fm-head { padding: 10px 2px 16px; }
.fm-title { margin: 0 0 8px; font-size: 21px; font-weight: 700; line-height: 1.35; word-break: break-all; }
.fm-desc { font-size: 13.5px; color: #6b7280; white-space: pre-wrap; word-break: break-all; }
.fm-desc:empty { display: none; }

.fm-form { background: #fff; border-radius: 14px; padding: 4px 16px 0; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.fm-item { padding: 14px 0; border-bottom: 1px solid #f0f1f3; }
.fm-item:last-of-type { border-bottom: 0; }
.fm-label { font-size: 14.5px; font-weight: 600; margin-bottom: 9px; color: #1f2329; }
.fm-req { color: #e5484d; font-style: normal; margin-left: 3px; }
.fm-tips { font-size: 12.5px; color: #8a9099; margin-top: 7px; line-height: 1.5; }

.fm-input {
	display: block; width: 100%; min-height: 44px; padding: 10px 12px;
	font-size: 16px; font-family: inherit; color: #1f2329;
	background: #fafbfc; border: 1px solid #e3e5e8; border-radius: 9px;
	-webkit-appearance: none; appearance: none; outline: none;
}
.fm-input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea.fm-input { min-height: 96px; resize: vertical; line-height: 1.6; }
select.fm-input {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%238a9099' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.fm-input::placeholder { color: #b3b8bf; }

.fm-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-opt {
	display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
	padding: 9px 14px; min-height: 40px;
	border: 1px solid #e3e5e8; background: #fafbfc; border-radius: 9px;
	font-size: 14.5px; color: #374151; line-height: 1.3;
}
.fm-opt input { display: none; }
.fm-opt span { word-break: break-all; }
.fm-opt.on { border-color: #2563eb; background: #eef3fe; color: #1d4ed8; font-weight: 600; }

.fm-rating { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fm-star {
	width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
	border: 1px solid #e3e5e8; background: #fafbfc; border-radius: 9px;
	font-size: 21px; color: #d6dae0; cursor: pointer; line-height: 1;
}
.fm-star input { display: none; }
.fm-star.on { border-color: #f5a524; background: #fff8ec; color: #f5a524; }
.fm-rating-tip { font-size: 12.5px; color: #8a9099; font-style: normal; margin-left: 4px; }

.fm-file { display: block; width: 100%; font-size: 13.5px; color: #6b7280; }
.fm-file::file-selector-button {
	margin-right: 10px; padding: 9px 14px; font-size: 13.5px; font-family: inherit;
	border: 1px solid #e3e5e8; background: #fafbfc; border-radius: 9px; color: #374151; cursor: pointer;
}
.fm-uptip { font-size: 12px; color: #9aa0a6; margin-top: 6px; }
.fm-preview { margin-top: 9px; }
.fm-preview img { max-width: 130px; max-height: 130px; border-radius: 9px; border: 1px solid #e3e5e8; }

.fm-addr-sel { display: flex; gap: 8px; }
.fm-addr-sel .fm-input { flex: 1 1 0; min-width: 0; }
.fm-addr-detail { margin-top: 8px; }

/* 一键获取当前位置 */
.fm-loc { margin-bottom: 10px; }
.fm-locbtn {
	display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
	min-height: 40px; padding: 9px 16px; font-size: 14.5px; font-family: inherit;
	color: #0b5cad; background: #eef3fe; border: 1px solid #c9d9f8; border-radius: 9px;
}
.fm-locbtn:active { background: #e0ebfd; }
.fm-locbtn[disabled] { opacity: .6; cursor: default; }
.fm-locmsg { display: block; font-size: 12.5px; margin-top: 7px; line-height: 1.6; }
.fm-locmsg-ok { color: #1d7a4a; }
.fm-locmsg-bad { color: #e5484d; }

/* 锁定态：下拉是只读的，视觉上要让人看出来不能点 */
.fm-addr-locked .fm-addr-sel .fm-input {
	background: #f2f4f7; color: #6b7280; border-style: dashed; cursor: not-allowed;
}
.fm-addr-locked .fm-addr-sel { position: relative; }

.fm-sec { padding: 20px 0 6px; }
.fm-sec span {
	display: block; font-size: 15px; font-weight: 700; color: #1f2329;
	padding-left: 10px; border-left: 3px solid #2563eb; line-height: 1.4;
}
.fm-sec i { display: block; font-size: 12.5px; color: #8a9099; font-style: normal; margin-top: 5px; padding-left: 13px; }

.fm-submit-bar { padding: 18px 0 22px; }
.fm-submit {
	display: block; width: 100%; min-height: 48px; padding: 12px 16px;
	font-size: 16.5px; font-family: inherit; font-weight: 600; color: #fff;
	background: #2563eb; border: 0; border-radius: 10px; cursor: pointer;
}
.fm-submit:active { background: #1d4ed8; }
.fm-submit[disabled] { background: #a9bde8; cursor: not-allowed; }
.fm-globalerr { display: none; padding: 0 0 18px; font-size: 13.5px; color: #e5484d; text-align: center; }
.fm-globalerr.show { display: block; }

.fm-err { display: none; font-size: 12.5px; color: #e5484d; margin-top: 7px; }
.fm-err.show { display: block; }
.fm-item.haserr .fm-input, .fm-item.haserr .fm-opt { border-color: #e5484d; }
.fm-preview-note .fm-pn {
	margin-top: 10px; background: #fff8e6; border: 1px solid #f0dca8;
	color: #7a5b12; font-size: 12.5px; padding: 8px 12px; border-radius: 8px; text-align: center;
}

.fm-foot { text-align: center; font-size: 12px; color: #b3b8bf; padding: 22px 0 0; word-break: break-all; }

.fm-notice { background: #fff; border-radius: 14px; padding: 38px 20px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.fm-notice-icon { font-size: 40px; line-height: 1; margin-bottom: 14px; }
.fm-notice-msg { font-size: 15px; color: #4b5563; line-height: 1.7; word-break: break-all; }
.fm-pwform { margin-top: 20px; display: flex; gap: 8px; }
.fm-pwform .fm-input { flex: 1; }
.fm-pwform button {
	padding: 0 20px; font-size: 15px; font-family: inherit; color: #fff;
	background: #2563eb; border: 0; border-radius: 9px; cursor: pointer; white-space: nowrap;
}

.fm-mask {
	position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 9999;
	background: rgba(17,24,39,.45); display: none; align-items: center; justify-content: center; padding: 24px;
}
.fm-mask.show { display: flex; }
.fm-dialog {
	background: #fff; border-radius: 16px; width: 100%; max-width: 330px;
	padding: 26px 22px 20px; text-align: center;
}
.fm-ok {
	width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
	background: #e8f6f3; color: #0d7a6b; font-size: 28px; line-height: 54px; text-align: center;
}
.fm-dialog-title { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; }
.fm-dialog-msg { font-size: 14.5px; color: #4b5563; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.fm-dialog-btns { margin-top: 20px; }
.fm-btn { width: 100%; min-height: 44px; font-size: 15.5px; font-family: inherit; border-radius: 10px; cursor: pointer; border: 0; }
.fm-btn-primary { background: #2563eb; color: #fff; font-weight: 600; }
.fm-btn-primary:active { background: #1d4ed8; }

@media (max-width: 360px) {
	.fm-addr-sel { flex-wrap: wrap; }
	.fm-addr-sel .fm-input { flex: 1 1 46%; }
}

/* ---------- 订单信息（支付结果页） ---------- */
.fm-order { background: #fff; border-radius: 14px; padding: 16px 18px; margin-top: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.fm-order h2 { font-size: 15px; margin: 0 0 10px; color: #111827; }
.fm-order-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f3f5; font-size: 14px; }
.fm-order-row:last-child { border-bottom: 0; }
.fm-order-row .k { color: #6b7280; flex: 0 0 auto; }
.fm-order-row .v { color: #111827; text-align: right; word-break: break-all; }
.fm-order-row.total .v { color: #d92d20; font-weight: 700; font-size: 16.5px; }
.fm-notice .fm-btn { margin-top: 18px; }

/* ---------- 付款提示（收款表单必须有，功能性提示） ---------- */
.fm-paywarn {
	margin-top: 8px; padding: 9px 12px; font-size: 12.5px; line-height: 1.5;
	background: #fff8e6; border: 1px solid #ffe0a3; border-radius: 9px; color: #8a5a00;
}

/* ---------- 展示型元素（不收集数据，只做分段与说明） ---------- */
.fm-div { margin: 22px 0 10px; border-top: 1px solid #e3e6ea; height: 0; }
.fm-div span {
	position: relative; top: -11px; background: #fff; padding: 0 12px;
	color: #8a939c; font-size: 13px;
}
.fm-tblock {
	margin: 6px 0 16px; padding: 12px 14px;
	background: #f7f9fc; border: 1px solid #e6ecf2; border-radius: 8px;
	color: #4a5560; font-size: 14.5px; line-height: 1.75;
}
.fm-tblock-t { font-weight: bold; color: #22303c; margin-bottom: 6px; }
.fm-tblock-i { margin-top: 8px; color: #8a939c; font-size: 12.5px; }
.fm-img { margin: 8px 0 16px; text-align: center; }
.fm-img img { max-width: 100%; border-radius: 8px; display: block; margin: 0 auto; }
.fm-imgc { margin-top: 6px; color: #8a939c; font-size: 12.5px; }

/* ---------- 提交成功后锁定（防重复提交） ---------- */
.fm-done-tip { margin-top: 10px; text-align: center; font-size: 13px; color: #0d7a6b; }

/* ---------- 收款项目 ---------- */
.fm-vg { margin-top: 2px; }
.fm-vg-list { display: flex; flex-direction: column; gap: 8px; }
.fm-vg-opt { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #e3e6ea;
	background: #fff; border-radius: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fm-vg-opt input[type="radio"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.fm-vg-nm { flex: 1 1 auto; font-size: 15px; color: #1f2430; line-height: 1.45; }
.fm-vg-pr { flex: 0 0 auto; font-size: 15px; font-weight: bold; color: #d92d20; }
.fm-vg-opt.on { border-color: #d92d20; background: #fff7f6; box-shadow: 0 0 0 2px rgba(217,45,32,.08); }
.fm-vg-qty { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.fm-vg-qty .fm-glab { font-size: 14px; color: #6b7280; }
.fm-vg-qty .fm-gminus, .fm-vg-qty .fm-gplus { width: 38px; height: 38px; font-size: 19px; line-height: 1;
	border: 1px solid #d7dbe0; background: #fafbfc; border-radius: 8px; color: #333; cursor: pointer; }
.fm-vg-qty .fm-gnum { width: 74px; text-align: center; flex: 0 0 auto; }
.fm-vg-sum { margin-top: 10px; font-size: 14px; color: #6b7280; }
.fm-vg-sum b { color: #d92d20; font-size: 18px; }
