/* ============================================================
 * cookie-banner.css  v954 / v904 / v830
 * Cookie 同意横幅样式（独立 CSS 文件，避免被 Chrome 长 inline
 * style normalize 吃掉 display:flex 等关键属性）
 * 极简：纯色 + 细线 + 大留白，禁欲极简风格
 * ============================================================ */

/* Banner：底部固定，全宽，浅灰文字 */
#lx-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000000;     /* 必须 > .dp-fab 的 999990，避免遮挡 */
  padding: 10px 20px;
  background: rgba(15, 20, 32, 0.94);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #b8c2d2;
  line-height: 1.5;
}

/* 文字块：占据主要宽度 */
#lx-cookie-banner > div:first-child {
  flex: 1;
  min-width: 240px;
  line-height: 1.5;
}

/* 标题"关于 Cookie 与隐私"亮色 */
#lx-cookie-banner b {
  color: #e8eef9;
}

/* 链接：品牌色，不要下划线（footer 风格） */
#lx-cookie-banner a {
  color: #5a8ec9;
  text-decoration: none;
}
#lx-cookie-banner a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 投资风险链接：警示红 */
#lx-cookie-banner a[href*="risk-disclosure"] {
  color: #f08080;
}

/* 勾选容器（label）：紧凑、靠右 */
#lx-cookie-banner label {
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  font-size: 12px;
  color: #cfd8e3;
}

/* checkbox 视觉 */
#lx-cookie-banner input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #5a8ec9;
  margin: 0;
}

/* 强调文字 */
#lx-cookie-banner label > span {
  font-size: 12px;
  color: #cfd8e3;
}

/* ===== v1173 移动精简文案：桌面/平板隐藏，移动端见 @media ===== */
.lx-cb-compact { display: none; }
/* ===== v1173 移动端紧凑化 =====
 * 根因：移动竖排（文案 4 行 + 勾选独占一行）→ 124px = 14.7% 视口，
 *       首屏「精选赚钱股票」被视觉挤压，观感压迫。
 * 修复：① 单行两列（文案 flex:1 + 勾选靠右）② 移动端专属精简文案
 *       ③ 11px / 1.45 / padding 8px + iOS safe-area 适配
 * 合规：3 个法务链接在移动端全部保留且可见（探针 allLinksVisible 断言）。
 */
@media (max-width: 768px) {
  #lx-cookie-banner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    font-size: 11px;
    line-height: 1.45;
  }
  #lx-cookie-banner > div:first-child {
    min-width: 0;
    flex: 1;
    line-height: 1.45;
  }
  #lx-cookie-banner label,
  #lx-cookie-banner label > span {
    font-size: 11px;
    gap: 5px;
  }
  #lx-cookie-banner input[type="checkbox"] {
    width: 15px;
    height: 15px;
  }
  .lx-cb-full { display: none; }
  .lx-cb-compact { display: inline; }
}

/* ===== v954 交互穿透修复 =====
 * 根因：banner z=1000000 fixed 全宽覆盖屏幕底部，拦截了 #ai-avatar-fab
 * dock 面板按钮（移动端全屏入口 5s 点击超时的真根因）。
 * 修复：banner 容器 pointer-events:none 让点击穿透到 dock；
 * 仅自身可交互元素（链接/label/checkbox/按钮）恢复 pointer-events:auto。
 * 视觉零变化；配合 b6-floating.css v954 的 dock 上移避让。 */
#lx-cookie-banner { pointer-events: none; }
#lx-cookie-banner a,
#lx-cookie-banner label,
#lx-cookie-banner input,
#lx-cookie-banner button { pointer-events: auto; }

/* ===== v1068 首屏内容避让：banner 可见时主内容底部预留 banner 高度 =====
 * 根因：banner fixed 贴底（移动竖排 136px / 桌面 56px），首屏精选卡底行被视觉遮挡
 * （pointer-events:none v954 只解决点击穿透，不解决视觉遮挡）。
 * 复用 v958 --lx-banner-h 口径（隐藏/已接受=0），勾选同意后 padding 自动收起。 */
#main-content { padding-bottom: var(--lx-banner-h, 0px); transition: padding-bottom .25s ease; }

/* v1502 F148 cookie：同意 label 伪元素扩点击区（43x20 -> 44，零布局影响） */
html body #lx-cookie-banner label { position: relative !important; }
html body #lx-cookie-banner label::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 100% !important;
  min-width: 44px !important;
  height: 44px !important;
  transform: translate(-50%, -50%) !important;
}
@media (min-width: 901px) {
  html body #lx-cookie-banner label::after {
    min-width: 28px !important;
    height: 28px !important;
  }
}
