/* ═══════════════════════════════════════════════════════════
   sync-v2.css · v1.4.135 · 19 号提示词：多端与离线一致性呈现层
   —— 19 号 1.2：**零颜色变量**（离线横幅样式直接复用 02 H10 的 --card/--text），
     只加 2 个尺寸令牌 --s-sync-row-h / --s-sync-gap；全部取色引用既有变量
   —— 待发送行（左 6px --dim 灰点 + 摘要 + 丢弃）；「可能不是最新」用 --dim 弱化
   —— 禁止：在线绿点/离线红点/渐变/玻璃拟态/颜色别名（--dim 就是唯一弱化层级来源）
   ═══════════════════════════════════════════════════════════ */

[data-scope="app"] {
  /* ── 19 号 1.2：仅 2 个尺寸令牌（每个令牌只有一个归宿） ── */
  --s-sync-row-h: 44px;   /* 待发送行 / 设备提示行行高；不用于消息行（04 号既有） */
  --s-sync-gap: 8px;      /* 待发送行之间、提示行与内容之间；不用于区块间距 */
}

/* ── 4.1 离线横幅（顶栏下方，样式同 02 H10：--card 底 + 下 1px --border + --text 字） ── */
.sg-sync-banner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: var(--card);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 13px;
}
.sg-sync-banner-sub {
  color: var(--dim);
  font-size: 12px;
}
/* Esc 不关闭横幅（它不是弹窗）；「丢弃 / 重新载入」可 Tab 达（键盘基线） */

/* ── 5.6 待发送区（输入框上方，插话队列之上；零条数零进度） ── */
.sg-sync-pending-area {
  display: flex;
  flex-direction: column;
  gap: var(--s-sync-gap);
  padding: var(--s-sync-gap) 0;
}
.sg-sync-pending-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--s-sync-row-h);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 0 12px;
}
.sg-sync-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim); /* 左侧灰点：--dim 是唯一弱化层级来源，不另造颜色 */
}
.sg-sync-dot.is-failed {
  outline: 1px solid var(--dim); /* 不可重试失败仍灰阶（不套用发送失败的红色系） */
  outline-offset: 1px;
}
.sg-sync-pending-text {
  flex: none;
  color: var(--dim);
  font-size: 12px;
}
.sg-sync-pending-summary {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* 摘要 2 行截断（5.6） */
  white-space: normal;
  font-size: 13px;
  color: var(--text);
}
.sg-sync-discard {
  flex: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.sg-sync-discard:hover { background: var(--hover); }
.sg-sync-discard:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

/* ── 8.2 事实提示行（--dim 弱化，无图标无色，只陈述发生过的事实） ── */
.sg-sync-hint {
  display: inline-block;
  color: var(--dim);
  font-size: 12px;
}

/* ── 8.5 设备提示行（复用 11 号设备行形态：--card 底 + 1px --border） ── */
.sg-sync-device-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--s-sync-row-h);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
}
.sg-sync-device-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

/* ── 6.4 「重新载入」ghost 按钮（透明底 + 1px --border；用户显式触发） ── */
.sg-sync-reload {
  flex: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.sg-sync-reload:hover { background: var(--hover); }
.sg-sync-reload:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
  .sg-sync-banner, .sg-sync-pending-row, .sg-sync-device-row { transition: none; }
}
