/* Collaboration: scoped collaborators, mentions to tasks, Slack */

/* Plan tree */
.bbi-cl-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}

.bbi-cl-who .bbi-avatar { width: 40px; height: 40px; }
.bbi-cl-who b { display: block; font-size: 15px; font-weight: 800; color: var(--bbi-ink); }
.bbi-cl-who small { display: block; font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-cl-role {
  height: 26px;
  margin: 8px 18px 0;
}

.bbi-cl-role__tag svg { width: 13px; height: 13px; }

.bbi-cl-tree {
  display: grid;
  gap: 4px;
  margin: 12px 16px 0;
  padding-top: 12px;
  border-top: 1px solid var(--bbi-line);
}

.bbi-cl-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 7px 0 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--bbi-line);
  box-shadow: var(--bbi-shadow-sm);
  font-size: 13.5px;
  color: var(--bbi-ink);
  white-space: nowrap;
  transition: opacity 0.45s ease, background-color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}

.bbi-cl-node b { font-weight: 800; }
.bbi-cl-node--d1 { margin-left: 18px; }
.bbi-cl-node--d2 { margin-left: 36px; }

.bbi-cl-node--d1::before,
.bbi-cl-node--d2::before,
.bbi-cl-node.has-next::after {
  content: '';
  position: absolute;
  left: -12px;
  border-color: #d7ddef;
  border-style: solid;
  border-width: 0;
}

.bbi-cl-node--d1::before,
.bbi-cl-node--d2::before {
  top: -5px;
  height: calc(50% + 5px);
  width: 11px;
  border-left-width: 2px;
  border-bottom-width: 2px;
  border-bottom-left-radius: 7px;
}

.bbi-cl-node.has-next::after {
  top: 50%;
  bottom: -5px;
  border-left-width: 2px;
}

.bbi-cl-node__end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.bbi-cl-node .bbi-avatar { width: 24px; height: 24px; box-shadow: 0 0 0 2px #fff; }

.bbi-cl-lock {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--bbi-line);
  color: var(--bbi-muted);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.35s var(--bbi-spring);
}

.bbi-cl-lock svg { width: 12px; height: 12px; }

.bbi-cl-node.is-dim {
  background: var(--bbi-surface-2);
  border-style: dashed;
  border-color: #dfe3f1;
  box-shadow: none;
  color: #a6b1c7;
}

.bbi-cl-node.is-dim .bbi-cl-lock { opacity: 1; transform: none; }

.bbi-cl-scope {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(94, 114, 228, 0.12);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--bbi-indigo);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.bbi-cl-scope svg { width: 12px; height: 12px; }

.bbi-cl-node.is-on {
  border: 1.5px solid rgba(94, 114, 228, 0.55);
  background: #f7f8ff;
  box-shadow: 0 0 0 4px rgba(94, 114, 228, 0.1);
}

.bbi-cl-node.is-on .bbi-cl-scope { opacity: 1; }

.bbi-cl-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bbi-grad-brand);
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
}

.bbi-cl-badge svg { width: 11px; height: 11px; }

/* Activity */
.bbi-cl-activity {
  position: absolute;
  top: 399px;
  left: 16px;
  right: 16px;
}

.bbi-cl-activity .bbi-eyebrow { margin: 0 0 6px 2px; }
.bbi-cl-feed { display: grid; gap: 5px; }

.bbi-cl-act {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px 0 8px;
  border-radius: 12px;
  background: var(--bbi-surface-2);
}

.bbi-cl-act .bbi-avatar { width: 26px; height: 26px; box-shadow: 0 0 0 2px #fff; }
.bbi-cl-act b { display: block; font-size: 13px; font-weight: 800; line-height: 1.25; color: var(--bbi-ink); }
.bbi-cl-act small { display: block; font-size: 11.5px; font-weight: 700; color: var(--bbi-muted); }
.bbi-cl-act.is-off { display: none; }
.bbi-cl-act--done { background: var(--bbi-good-bg); }
.bbi-cl-act--done small { color: #12925c; }

/* Comment */
.bbi-cl-msg { display: flex; gap: 12px; padding: 0 18px; }
.bbi-cl-msg .bbi-avatar { width: 34px; height: 34px; }
.bbi-cl-msg__main { flex: 1; min-width: 0; }
.bbi-cl-msg__who { display: flex; align-items: baseline; gap: 8px; }
.bbi-cl-msg__who b { font-size: 14px; font-weight: 800; color: var(--bbi-ink); }
.bbi-cl-msg__who small { font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-cl-msg p {
  margin: 4px 0 0;
  min-height: 23px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--bbi-ink);
}

.bbi-cl-at {
  padding: 1px 4px;
  border-radius: 6px;
  background: rgba(94, 114, 228, 0.12);
  font-weight: 800;
  color: var(--bbi-indigo);
}

.bbi-cl-caret {
  display: inline-block;
  width: 2px;
  height: 17px;
  margin-left: 1px;
  vertical-align: -3px;
  background: var(--bbi-indigo);
  animation: bbi-cl-blink 0.9s steps(2, start) infinite;
}

@keyframes bbi-cl-blink { to { visibility: hidden; } }

.bbi-cl-mk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-cl-mk__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  border: 1.5px solid rgba(94, 114, 228, 0.4);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-indigo);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.bbi-cl-box {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 2px solid currentColor;
}

.bbi-cl-box svg { width: 10px; height: 10px; }

.bbi-cl-mk__btn.is-done { border-color: var(--bbi-good-edge); background: var(--bbi-good-bg); color: var(--bbi-good); }
.bbi-cl-mk__btn.is-done .bbi-cl-box { border: 0; background: var(--bbi-good); color: #fff; }

/* Task */
.bbi-cl-task { padding: 16px 18px; }

.bbi-cl-task__top { display: flex; align-items: center; gap: 12px; }

.bbi-cl-task__check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  border: 2px solid var(--bbi-faint);
  color: transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.bbi-cl-task__check svg { width: 13px; height: 13px; }

.bbi-cl-task__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--bbi-ink);
  white-space: nowrap;
  transition: color 0.35s ease;
}

.bbi-cl-task__state { margin-left: auto; }

.bbi-cl-task__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 0 36px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-cl-task__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.bbi-cl-task__meta > span > svg { width: 14px; height: 14px; }
.bbi-cl-task__meta .bbi-avatar { width: 24px; height: 24px; box-shadow: 0 0 0 2px #fff; }
.bbi-cl-task__meta > span:first-child { color: var(--bbi-ink); font-weight: 800; }

.bbi-cl-task.is-done .bbi-cl-task__check { border-color: var(--bbi-good); background: var(--bbi-good); color: #fff; }
.bbi-cl-task.is-done .bbi-cl-task__title { color: var(--bbi-muted); text-decoration: line-through; text-decoration-thickness: 2px; }

/* Slack DM */
.bbi-cl-slack { border-top: 5px solid #3c4566; }

.bbi-cl-dm { display: flex; gap: 12px; padding: 4px 18px 0; }

.bbi-cl-dm__app {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--bbi-grad-brand);
  color: #fff;
}

.bbi-cl-dm__app svg { width: 20px; height: 20px; }
.bbi-cl-dm__main { flex: 1; min-width: 0; }
.bbi-cl-dm__who { display: flex; align-items: center; gap: 6px; }
.bbi-cl-dm__who b { font-size: 14px; font-weight: 800; color: var(--bbi-ink); }

.bbi-cl-dm__who em {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bbi-line);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--bbi-muted);
}

.bbi-cl-dm__who small { font-size: 12px; font-weight: 700; color: var(--bbi-muted); }
.bbi-cl-dm__title { margin-top: 4px; font-size: 15px; font-weight: 800; color: var(--bbi-ink); }

.bbi-cl-dm__body {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bbi-ink);
}

.bbi-cl-dm__ctx { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-cl-dm__btns { display: flex; gap: 8px; margin-top: 14px; }

.bbi-cl-dm__btns > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.2s var(--bbi-ease), background-color 0.3s ease, color 0.3s ease;
}

.bbi-cl-dm__done { background: #1f9d63; color: #fff; box-shadow: 0 8px 16px -8px rgba(26, 174, 111, 0.6); }
.bbi-cl-dm__done svg { width: 14px; height: 14px; }
.bbi-cl-dm__done.is-pressed { transform: scale(0.95); }
.bbi-cl-dm__done.is-done { background: var(--bbi-good-bg); color: var(--bbi-good); box-shadow: none; }
.bbi-cl-dm__view { border: 1.5px solid #dfe3f1; color: var(--bbi-ink); }

.bbi-cl-slide { animation: bbi-cl-slide 0.7s var(--bbi-spring) both; }

@keyframes bbi-cl-slide {
  from { opacity: 0; transform: translateX(60px) rotate(2deg); }
  to { opacity: 1; transform: none; }
}
