/* ============================================================
   新试卷网 · 内容登录墙样式（2026-10-26）
   未登录时，[data-gate] 内容只显示约 1/3，其余渐变遮罩 + 登录引导；
   已登录（window.XSJ_AUTH.getState().user）则完整显示。
   依赖 assets/gate.js 运行时切换 .gated / 插入 .gate-cta。
   ============================================================ */

.gated {
  position: relative;
  overflow: hidden !important;
}

/* 底部渐变：把剩余 2/3 淡出到背景色，暗示「后面还有」 */
.gated::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0) 0%, #f8fafc 78%);
  pointer-events: none;
}

/* 未登录时禁用 gated 容器内的 iframe 交互/滚动，防止内部滚动绕过遮罩 */
.gated iframe {
  pointer-events: none;
}

/* 登录引导卡片（gate.js 动态插入在 gated 元素之后） */
.gate-cta {
  margin: 0;
  padding: 28px 22px 32px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
  border: 1px solid #dbe6ff;
  border-top: none;
  border-radius: 0 0 12px 12px;
  text-align: center;
}
.gate-cta-lock {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 10px;
}
.gate-cta-t {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.gate-cta-d {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 16px;
}
.gate-cta-btn {
  display: inline-block;
  padding: 11px 30px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #1b3b8f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.gate-cta-btn:hover {
  background: #16307a;
}

/* 深色顶栏页面（预览壳）内，渐变落点随页面底色调到接近白 */
.gate-dark-bg .gated::after {
  background: linear-gradient(to bottom, rgba(238, 241, 246, 0) 0%, #eef1f6 78%);
}

/* 打印时绝不遮罩：未登录用户按 Ctrl+P 也应打出完整内容（遮罩只限制屏幕预览） */
@media print {
  .gated {
    max-height: none !important;
    overflow: visible !important;
  }
  .gated::after {
    display: none !important;
  }
  .gate-cta {
    display: none !important;
  }
}
