/* 华信检测 · 全站转化组件（移动底栏 / 内嵌估价 / 留资弹窗）
   与 style.css 共用变量，独立文件便于单独发版与回滚 */

.ux-bar { display: none; }

@media (max-width: 768px) {
  /* 移动端隐藏右侧浮动栏，改用底部固定条 */
  .side-toolbar { display: none !important; }
  body.ux-has-bar { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }

  .ux-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
    display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 18px rgba(16, 38, 61, .10);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .ux-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; height: 60px; font-size: 11.5px; font-weight: 600; color: var(--ink);
    text-decoration: none; position: relative;
  }
  .ux-bar a:active { background: #f4f7fb; }
  .ux-bar a .ic { font-size: 19px; line-height: 1; }
  .ux-bar a.ux-main { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
  .ux-bar a.ux-main .ic { font-size: 21px; }
  .ux-bar a + a::before {
    content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line);
  }
}

/* ---------- 内嵌估价卡 ---------- */
.ux-quote {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px 56px;
}
.ux-quote-in {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 10px 34px rgba(16, 38, 61, .08); overflow: hidden;
}
.ux-q-head {
  background: linear-gradient(135deg, #0b5cab, #0a6fb5 60%, #00a3a3 140%);
  color: #fff; padding: 20px 24px;
}
.ux-q-head b { display: block; font-size: 19px; margin-bottom: 4px; }
.ux-q-head span { font-size: 13.5px; color: #d8e9f8; }
.ux-q-body { padding: 20px 24px 24px; }
.ux-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ux-step {
  flex: 1 1 150px; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fbfcfe;
}
.ux-step em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; letter-spacing: .5px; }
.ux-step select, .ux-step input {
  width: 100%; border: 0; background: transparent; font-size: 14.5px; font-weight: 600;
  color: var(--ink); font-family: inherit; cursor: pointer; outline: none;
}
.ux-step select { appearance: none; -webkit-appearance: none; padding-right: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%235a6b7d'/></svg>");
  background-repeat: no-repeat; background-position: right 2px center; }
.ux-q-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ux-btn {
  appearance: none; border: 0; cursor: pointer; font-family: inherit;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
  padding: 11px 24px; border-radius: 8px;
}
.ux-btn:hover { background: var(--primary-dark); }
.ux-btn.ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.ux-btn.ghost:hover { background: #f2f7fd; }
.ux-btn:disabled { opacity: .6; cursor: default; }
.ux-hint { font-size: 12.5px; color: var(--muted); }
.ux-err { color: #b42318; font-size: 13px; margin-top: 8px; }

.ux-result { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; display: none; }
.ux-result.on { display: block; }
.ux-band { font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.ux-band b { font-size: 30px; color: #b42318; font-weight: 800; letter-spacing: -.5px; vertical-align: -3px; }
.ux-band b i { font-style: normal; font-size: 19px; }
.ux-lines { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.ux-lines li { background: var(--bg-soft); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; color: var(--muted); }
.ux-note { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.ux-catch {
  margin-top: 14px; background: #f7fafd; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
}
.ux-catch p { font-size: 13.5px; color: var(--ink); margin-bottom: 9px; }
.ux-catch .ux-q-row input[type="tel"] {
  flex: 1 1 190px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-size: 15px; font-family: inherit; color: var(--ink);
}
.ux-catch .ux-q-row input[type="text"] {
  flex: 1 1 120px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-size: 15px; font-family: inherit; color: var(--ink);
}
.ux-done { color: #087443; font-size: 14px; font-weight: 600; }
.ux-done small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* ---------- 报价页结果区附加动作 ---------- */
.ux-qtools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.ux-qtools button {
  flex: 1 1 140px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 9px 12px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.ux-qtools button:hover { border-color: var(--primary); color: var(--primary); }
.ux-qtools button.ok { border-color: #12b76a; color: #087443; }

/* ---------- 自助报价弹窗 ---------- */
.ux-qmodal {
  position: fixed; inset: 0; z-index: 600; background: rgba(10, 24, 42, .62);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ux-qmodal-box {
  position: relative; width: min(1020px, 100%); height: min(780px, 100%);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(6, 20, 36, .35);
}
.ux-qmodal-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.ux-qmodal-close {
  position: absolute; right: 10px; top: 8px; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(10, 24, 42, .55); color: #fff; font-size: 20px; line-height: 1;
}
.ux-qmodal-close:hover { background: rgba(10, 24, 42, .8); }
body.ux-qmodal-on { overflow: hidden; }

@media (max-width: 768px) {
  .ux-qmodal { padding: 0; }
  .ux-qmodal-box { width: 100%; height: 100%; border-radius: 0; }
}

/* ---------- 报价页 embed 净版（弹窗内只留计算器） ---------- */
html.ux-embed .topbar,
html.ux-embed .site-header,
html.ux-embed .site-footer,
html.ux-embed .side-toolbar,
html.ux-embed .ux-bar { display: none !important; }

@media (max-width: 768px) {
  html.ux-embed body.ux-has-bar { padding-bottom: 0; }
}

/* ---------- 遮罩弹层 ---------- */
.ux-mask {
  position: fixed; inset: 0; z-index: 500; background: rgba(10, 24, 42, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ux-mask[hidden] { display: none; }
.ux-dlg {
  background: #fff; border-radius: 14px; width: 100%; max-width: 420px;
  padding: 24px; box-shadow: 0 24px 60px rgba(6, 20, 36, .3); position: relative;
}
.ux-dlg h3 { font-size: 18px; margin-bottom: 6px; }
.ux-dlg p { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.65; }
.ux-dlg .ux-q-row { flex-direction: column; align-items: stretch; }
.ux-dlg input {
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px;
  font-size: 15px; font-family: inherit; width: 100%;
}
.ux-dlg .ux-btn { width: 100%; }
.ux-close {
  position: absolute; right: 12px; top: 10px; border: 0; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: #9aa8b6; padding: 4px 8px;
}
.ux-copy {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-soft); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px;
  font-size: 15px; font-weight: 700; letter-spacing: .4px;
}
.ux-copy button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.ux-copy button.ok { color: #087443; border-color: #12b76a; }

@media (max-width: 768px) {
  .ux-quote { padding: 0 14px 44px; }
  .ux-q-head, .ux-q-body { padding-left: 16px; padding-right: 16px; }
  .ux-band b { font-size: 26px; }
  .ux-step { flex: 1 1 100%; }
}
