/* ============================================================
 * H5 专属补充样式（**唯一需要手写的一份**）
 *
 * 这里只放「小程序组件自带、网页里没有」的机制翻译，不放任何视觉口径：
 *   · <scroll-view scroll-x> → 一个 overflow-x:auto 的 div
 *   · <scroll-view scroll-y> → overflow-y:auto
 *   · <a> 当卡片用           → 去掉下划线/默认蓝色/点击高亮
 *   · <canvas> 的 DPR        → 由 app.js 设置 width/height 属性
 * 视觉样式全部在 app.css（从 app.wxss 生成），别在这里改颜色尺寸。
 * ============================================================ */

/* 品牌区：两行横向滑动的容器（小程序里是 <scroll-view class="brand-scroll" scroll-x>） */
.brand-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* 型号列表：小程序里是 <scroll-view scroll-y>，可见高度由 .mlist 的 max-height 定 */
.mlist {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 当卡片用的链接：外观完全交给 .chip / .mrow / .spec / .tab / .srcchip / .footlink */
a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
a:visited { color: inherit; }

/* 可点元素的指针（桌面浏览器上让「能点」看得出来） */
.chip, .mrow, .spec, .tab, .srcchip, .lgi, .footlink { cursor: pointer; }

/* 走势图画布：位图尺寸由 JS 按 dpr 设，这里只保证不被行内样式撑歪 */
.chartbox canvas { display: block; width: 100%; height: 4rem; }

/* HTML 的 hidden 属性只是 UA 样式，会被 app.css 里 `.mrow { display:flex }` 整条盖掉：
   不补这一行，型号搜索「隐藏不匹配的行」根本不生效（实测打 10 个 hidden，列表可滚高度
   460 → 460 纹丝不动），「没有匹配的型号」提示也会一直挂在列表末尾。
   用属性选择器把特异性抬到 0,2,0，且本文件在 app.css 之后加载。 */
.mrow[hidden] { display: none; }

/* 隐藏滚动条（品牌区 / 型号列表；iOS 上本来就不显示，桌面浏览器会露出灰条） */
.brand-scroll::-webkit-scrollbar,
.mlist::-webkit-scrollbar { width: 0; height: 0; }

/* 搜索结果为空时的提示行 */
.mrow.mrow-none { justify-content: center; color: var(--ink-3); font-size: 0.24rem; }

/* 货源 chip 的容器：小程序里是 wx:for 直接摊在 .srcline 这行 flex 里，
   网页里 JS 需要个父节点临时插内容 —— display:contents 让它「不生成盒子」，
   子项照样参与 .srcline 的 flex 布局（否则一行 chip 会竖着排）。 */
#srcchips { display: contents; }

/* ============================================================
 * 查询额度（2026-11-18）
 * 额度用完时结果页换成提示 + 看广告领额度弹层。样式只在这里，
 * app.css 是自动生成的，别往那边写。
 * ============================================================ */
.qlead {
  margin: 0.18rem 0 0;
  font-size: 0.25rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.qfine {
  margin-top: 0.14rem;
  font-size: 0.21rem;
  line-height: 1.6;
  color: var(--ink-3);
}

/* 不可点的按钮：压暗但不改配色（:active 也一并按住，别让人以为点动了） */
.btn[disabled] {
  opacity: 0.55;
}

.btn[disabled]:active {
  background: var(--brand);
}

/* ---------- 看广告弹层 ----------
 * 类名一律 q 前缀，**不要用 ad 开头**：夸克/UC 等浏览器自带的广告过滤会按名字
 * 隐藏 `.adxxx` / `#adxxx`，用户看到的是「弹层空白、读秒也不见了」（2026-11-18 实测）。 */
.qmask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: flex;
  /* 底部抽屉，**不居中**：广告平台的 In-Page Push 素材是弹在屏幕右上角的
     fixed 通知卡（自带 Ad 标记），居中会把整块屏幕占满、正好压住它们。
     顶部留出 1.5rem 的空带给广告，挡板永远碰不到。 */
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem 0.24rem 0.24rem;
  background: rgba(12, 20, 30, 0.6);
  /* 素材比屏幕高时整块能滚：flex 居中会把超出部分顶到屏幕外，用户就只看到半截 */
  overflow-y: auto;
}

/* 同 .mrow 那个坑：display:flex 会整条盖掉 HTML hidden 的 UA 样式，
   不补这行弹层会一直挂在屏幕上 */
.qmask[hidden] {
  display: none;
}

.qbox {
  width: 100%;
  max-width: 6.8rem;
  max-height: 100%;
  overflow-y: auto;
  background: var(--card);
  border-radius: 0.2rem;
  padding: 0.2rem;
}

.qhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.14rem;
  font-size: 0.24rem;
  color: var(--ink-2);
}

.qclose {
  border: 0;
  background: transparent;
  padding: 0 0.06rem;
  font-size: 0.42rem;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
}

.qslot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.6rem;
  margin-bottom: 0.18rem;
  padding: 0.1rem 0;
  border-radius: 0.14rem;
  background: var(--line-2);
  overflow: hidden;
}

/* 联盟素材尺寸不可控，一律不许多出去（否则手机上一屏塞不下） */
.qslot > * {
  max-width: 100%;
}

/* 沙箱 iframe：广告在自己的源里渲染，这里只负责给它一个好尺寸 */
.qframe {
  display: block;
  width: 100%;
  height: 5rem;
  border: 0;
}

/* 说明块：这一段不显示任何广告素材，只负责把「广告会长在哪儿」讲清楚 ——
   Monetag 的 In-Page Push 根本不会往我们给的容器里渲染，留一个空白灰框
   只会让人以为坏了。 */
.qph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
  padding: 0 0.18rem;
  text-align: center;
}

.qph-t {
  font-size: 0.24rem;
  color: var(--ink-2);
}

.qph-s {
  font-size: 0.22rem;
  line-height: 1.6;
  color: var(--ink-3);
}

/* 检测到广告之后这一块变成绿色提示，用户一眼知道「广告其实出来了」 */
.qph.is-ok .qph-t {
  color: #1a7f37;
}

/* 检测/失败提示行（广告屏蔽、加载不出来时用） */
.qstatus {
  margin: -0.06rem 0 0.16rem;
  padding: 0.14rem 0.16rem;
  border-radius: 0.12rem;
  background: #fff4e5;
  font-size: 0.23rem;
  line-height: 1.6;
  color: #8a5300;
}

.qstatus[hidden] {
  display: none;
}

.qstatus b {
  font-weight: 600;
}

.qstatus a,
.qstatus button.qlink {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0.06rem;
  font: inherit;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}
