/* ===== css/modules/session-status.css — 编码模式会话行状态 slot（Q2，INTERACT-SPEC §2.11） =====
 * 加载顺序：styles.css → menus.css → states.css → contextmenu.css → 本文件
 * 所有选择器只命中编码模式（seg:changed 后）才存在的 .sb-code-session 及其子节点，
 * 或 session-status.js 惰性注入的 .ss-* 节点 —— 初始视图像素基线零命中。
 * 每条规则后括注宿主证据（docs/HOST-EVIDENCE-2.md 章节 / ref 截图）。
 */

/* --- 行：32px / px-2 py-1.5 / gap-2 / rounded-6（§4.3 行带 32、main L116619 class） --- */
.sb-code-session {
  display: flex; align-items: center;
  height: 32px; padding: 6px 8px; gap: 8px;
  border-radius: 6px;
}
.sb-code-session:hover { background: rgba(0,0,0,.06); }             /* hover:bg-foreground/[0.06]（main L116621） */

/* --- 选中行：--sidebar-selection-bg → --color-gray-a4 = #00000017（§2.2 token 表、§4.3「开发3」） --- */
.sb-code-session.ss-current,
.sb-code-session.ss-current:hover,
.sb-code-session.sb-code-session-current,
.sb-code-session.sb-code-session-current:hover { background: #00000017; }

/* --- 行首 14px 状态 slot（main L116629 "relative flex shrink-0 h-3.5 w-3.5"，色 text-muted-foreground） --- */
.sb-code-session-status {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; flex: none; margin: 0;
  color: #0000007d;                                                  /* --muted-foreground → --color-gray-a11（§2.2） */
  line-height: 0;
}
.sb-code-session-status .ss-icon {
  width: 14px; height: 14px; display: block;                         /* size-3.5（§2.2 ConversationStatusIcon） */
  fill: none; stroke: currentColor; stroke-width: 1.75;              /* 外环 strokeWidth 1.75（§2.2）；E2 瘦身实测：渲染 ≈1.0px@1x ≈ 宿主 aiwork-03 实拍加权带宽 0.96px@1x */
  stroke-linecap: round; stroke-linejoin: round;
}
/* E2 图标瘦身（GAP-REVIEW §3 E2；ref/aiwork-03-latest.png @2x + sidebar 放大图 PIL 实测）：
 * 宿主 CircleCheck 内笔画（勾）加权带宽 0.75-1.0px@1x（视觉含抗锯齿 4-6px@3x 口径），
 * 复刻原 1.75（渲染 1.02px）时勾墨迹比宿主多 ~27% → 内笔画单独减细。
 * .ss-tick 由 session-status.js 挂在 unread 的勾 path / errored 的感叹 line 上；
 * pending 的 8 段 path 是 CircleDashed 外环虚线本身，不在此列（保持 1.75）。 */
.sb-code-session-status .ss-icon .ss-tick { stroke-width: 1.5; }     /* 渲染 ≈0.88px@1x，落入宿主勾实测带 */
.sb-code-session-status[data-ss="unread"]  { color: #00834d; }      /* CircleCheck  --color-green-a11（§2.2；实拍 ref/host-doneicon-6x.png） */
.sb-code-session-status[data-ss="pending"] { color: #c65b00; }      /* CircleDashed --color-orange-a11（§2.2） */
.sb-code-session-status[data-ss="errored"] { color: #c00900cf; }    /* CircleAlert  --color-red-a11（§2.2） */
.sb-code-session-status[data-ss="none"]    { color: #0000007d; }

/* --- 名称：min-w-0 flex-1 truncate 14px（main L116664/116685） --- */
.sb-code-session-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--type-body-size);
 line-height: var(--type-body-line); }

/* --- 右侧相对时间：h-5 min-w-7 justify-end font-caption medium，色 --color-gray-text-light=#0004，
 *     hover 淡出 group-hover:opacity-0（§3.3，main L116761） --- */
.sb-code-session-time {
  display: inline-flex; align-items: center; justify-content: flex-end;
  height: 20px; min-width: 28px; flex: none; margin: 0;
  font-size: var(--type-caption-size); font-weight: 500; 
  color: #0004;
  transition: opacity .15s ease;
 line-height: var(--type-caption-line); }
/* E2 hover 互斥（GAP-REVIEW §3 E2/Q29，宿主 §3.3）：行 hover/focus-within → 相对时间淡出
 * （transition-opacity group-hover:opacity-0），trail 槽位让给「…」按钮。
 * 本域只做时间淡出 + 让位标记（session-status.js 写 data-ss-yields="cm-more"）；
 * 「…」按钮显隐由 context-menu 域 .cm-more（hover opacity 0→1，contextmenu.css）接管。 */
.sb-code-session:hover .sb-code-session-time,
.sb-code-session:focus-within .sb-code-session-time { opacity: 0; }

/* --- 6 点 loader：宿主 .glass-session-dot-loader 原样（§2.4 CSS 全文；实拍 ref/host-dotloader-6x.png） --- */
.ss-dot-loader {
  display: inline-grid;
  grid-template-columns: repeat(2, 2px);
  grid-template-rows: repeat(3, 2px);
  column-gap: 2px; row-gap: 2px;
  place-content: center;
  width: 14px; height: 14px;
  color: currentColor;
  pointer-events: none;
}
.ss-dot-loader__dot {
  display: block; width: 2px; height: 2px; border-radius: 50%;
  background-color: currentColor;
  opacity: 0; transform: translateY(-4px);
  animation: ss-dot-cycle 1820ms infinite;
  animation-timing-function: steps(6, jump-none);
}
.ss-dot-loader__dot:nth-child(1) { animation-delay: 520ms; }
.ss-dot-loader__dot:nth-child(2) { animation-delay: 650ms; }
.ss-dot-loader__dot:nth-child(3) { animation-delay: 260ms; }
.ss-dot-loader__dot:nth-child(4) { animation-delay: 390ms; }
.ss-dot-loader__dot:nth-child(5) { animation-name: ss-dot-cycle-long; }
.ss-dot-loader__dot:nth-child(6) { animation-name: ss-dot-cycle-short; animation-delay: 130ms; }
@keyframes ss-dot-cycle {
  0%            { opacity: 0; transform: translateY(-4px); }
  9.34%, 57.14% { opacity: 1; transform: translateY(0); }
  66.48%, 100%  { opacity: 0; transform: translateY(7px); }
}
@keyframes ss-dot-cycle-long {
  0%            { opacity: 0; transform: translateY(-4px); }
  9.34%, 64.29% { opacity: 1; transform: translateY(0); }
  73.63%, 100%  { opacity: 0; transform: translateY(7px); }
}
@keyframes ss-dot-cycle-short {
  0%            { opacity: 0; transform: translateY(-4px); }
  9.34%, 50%    { opacity: 1; transform: translateY(0); }
  59.34%, 100%  { opacity: 0; transform: translateY(7px); }
}
@media (prefers-reduced-motion: reduce) {
  .ss-dot-loader__dot { animation: none; opacity: 1; transform: translateY(0); }
}
/* 办公模式容器同款：loader 外层 opacity .7（§2.4 .work-surface-sidebar__row-session-loader） */
.sb-code-session-status[data-ss="working"] { opacity: .7; }
