/* Status group bubble — Claude Code / Codex 执行过程聚合 */

.lian-status-group {
  width: min(760px, 72vw);
  max-width: 100%;
  margin: 4px 0 8px 36px;
  box-sizing: border-box;
}

.lian-sg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(92, 58, 71, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lian-sg-head:hover {
  background: rgba(255, 248, 252, 0.72);
  border-color: rgba(199, 122, 142, 0.22);
}

.lian-sg-chev {
  width: 10px;
  height: 10px;
  color: rgba(92, 58, 71, 0.45);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.lian-status-group.lian-sg-open .lian-sg-chev {
  transform: rotate(90deg);
}

.lian-sg-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(92, 58, 71, 0.62);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lian-sg-meta {
  font-size: 10px;
  color: rgba(92, 58, 71, 0.45);
  flex-shrink: 0;
  white-space: nowrap;
}

.lian-sg-body {
  display: none;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(92, 58, 71, 0.1);
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.lian-status-group.lian-sg-open .lian-sg-body {
  display: block;
}

.lian-sg-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(92, 58, 71, 0.55);
  border-bottom: 1px solid rgba(92, 58, 71, 0.06);
}

.lian-sg-row:last-child {
  border-bottom: none;
}

.lian-sg-row-icon {
  flex-shrink: 0;
  width: 14px;
  text-align: center;
  margin-top: 1px;
}

.lian-sg-row-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lian-status-group.lian-sg-open .lian-sg-row-text {
  white-space: normal;
  word-break: break-word;
}

.lian-sg-row-detail {
  display: none;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(92, 58, 71, 0.42);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
}

.lian-status-group.lian-sg-open .lian-sg-row-detail {
  display: block;
}

.lian-sg-running .lian-sg-title {
  color: rgba(199, 122, 142, 0.85);
}

.lian-sg-error .lian-sg-title {
  color: rgba(184, 92, 92, 0.88);
}

@media (max-width: 520px) {
  .lian-status-group {
    width: calc(100% - 40px);
    margin-left: 32px;
  }
}