/* ==========================================================================
   components-misc.css — 辅助样式（代码块 / 提示标签 / 断点适配 /
   卡片操作区 / 剪贴板回退 / 门禁覆盖层 / 脉冲强调层）
   加载顺序：components-overlays.css 之后、animations.css 之前（必须保持最后：
             其中的断点与覆盖规则依赖前面各组件的基础样式）
   依赖：base.css 的设计令牌；所有关键属性均带 var() 回退值
   ========================================================================== */

/* 代码块：横向滚动防溢出 */
pre.code {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #e2e6eb;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  background: var(--color-surface-2);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
}
pre.code code {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
}

/* --------------------------------------------------------------------------
   提示标签（如「协议不受支持」）
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid #f0b429;
  border: 1px solid var(--color-warning-border);
  background: #fffbeb;
  background: var(--color-warning-bg);
  color: #8a4b04;
  color: var(--color-warning-text);
  font-size: 0.75rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   断点适配
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .gate__panel {
    padding: 28px;
  }
  .query-panel {
    padding: 22px 24px 24px;
  }
  .card__header,
  .card__body,
  .card__footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .card__row {
    grid-template-columns: 112px 1fr;
  }
}

/* 窄屏：字段表改为上下排列，避免挤压 */
@media (max-width: 640px) {
  .card__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .field-row__actions {
    width: 100%;
    margin-top: 0; /* 换行独占一行时无需标签高度补偿 */
  }
  .field-row__actions .btn {
    flex: 1 1 auto;
  }
}

/* --------------------------------------------------------------------------
   卡片头部操作区（复制全部信息 + 分享菜单）
   -------------------------------------------------------------------------- */
.card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   剪贴板回退用的离屏输入框（clipboard.js 在旧环境创建）
   -------------------------------------------------------------------------- */
.clipboard-helper {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   门禁覆盖层（resources 未同意时使用）：全屏独立滚动
   -------------------------------------------------------------------------- */
.gate-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 0 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  background: #f4f6f8;
  background: var(--color-bg);
}

/* 「最终确认」等强调段落 */
.gate__doc-emphasis {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   脉冲强调层（顶部警示条）：用 ::after 的透明度脉冲代替 box-shadow 动画，
   避免动画阶段触发布局/重绘；可见性由动画层按档位控制（animations.css）。
   -------------------------------------------------------------------------- */
.banner.anim-pulse {
  position: relative;
}
.anim-pulse::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 6px rgba(240, 180, 41, 0.28);
  opacity: 0;
  pointer-events: none;
}
