/* Activity feed: everything on the record, live */

/* ---------- Activity card ---------- */

.bbi-af-feed { display: flex; flex-direction: column; overflow: hidden; }

.bbi-af-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 18px 18px 0;
}

.bbi-af-head__title b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; color: var(--bbi-ink); }
.bbi-af-head__title small { display: block; font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-af-presence {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: var(--bbi-surface-2);
}

.bbi-af-presence b { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.2; color: var(--bbi-ink); }
.bbi-af-presence small { display: block; font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--bbi-muted); }

.bbi-af-stack { display: flex; gap: 4px; }

.bbi-af-here { position: relative; display: block; }
.bbi-af-here .bbi-avatar { display: block; width: 30px; height: 30px; box-shadow: 0 0 0 2px #fff; }

.bbi-af-here i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #2dce89;
}

.bbi-af-here i::after,
.bbi-af-live i::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #2dce89;
  animation: bbi-af-ping 1.8s ease-out infinite;
}

.bbi-af-here:nth-child(2) i::after { animation-delay: 0.6s; }
.bbi-af-here:nth-child(3) i::after { animation-delay: 1.2s; }

@keyframes bbi-af-ping {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

/* Filter chips */
.bbi-af-chips {
  display: flex;
  gap: 6px;
  flex: none;
  margin: 16px 16px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bbi-line);
}

.bbi-af-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--bbi-line);
  background: #fff;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--bbi-muted);
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s var(--bbi-ease);
}

.bbi-af-chip.is-on {
  border-color: transparent;
  background: var(--bbi-grad-brand);
  color: #fff;
  box-shadow: 0 8px 16px -10px rgba(94, 114, 228, 0.7);
}

.bbi-af-chip.is-pressed { transform: scale(0.94); }

/* Entries */
.bbi-af-list { padding: 12px 12px 0; }

.bbi-af-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  margin-bottom: 6px;
  padding: 0 12px 0 8px;
  border-radius: 14px;
  overflow: hidden;
  transition: height 0.45s var(--bbi-ease), margin-bottom 0.45s var(--bbi-ease), opacity 0.3s ease, background-color 0.5s ease;
}

.bbi-af-item.is-out { height: 0; margin-bottom: 0; opacity: 0; }
.bbi-af-item.is-pre { opacity: 0; }
.bbi-af-item.is-live { background: #f3f4ff; box-shadow: inset 0 0 0 1.5px rgba(94, 114, 228, 0.35); }
.bbi-af-item.is-flash { animation: bbi-af-flash 1.4s ease; }

@keyframes bbi-af-flash {
  0% { background: #dfe3ff; }
  100% { background: #f3f4ff; }
}

.bbi-af-face { position: relative; display: block; flex: none; }
.bbi-af-face .bbi-avatar { display: block; width: 36px; height: 36px; box-shadow: 0 0 0 2px #fff; }

.bbi-af-face--sf {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #3fb5f0, #0b8bd8);
  color: #fff;
}

.bbi-af-face--sf svg { width: 19px; height: 19px; }

.bbi-af-badge {
  position: absolute;
  right: -5px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
}

.bbi-af-badge svg { width: 10px; height: 10px; }
.bbi-af-badge--indigo { background: var(--bbi-indigo); }
.bbi-af-badge--purple { background: var(--bbi-purple); }
.bbi-af-badge--pink { background: #ff3d7f; }
.bbi-af-badge--orange { background: var(--bbi-orange); }
.bbi-af-badge--teal { background: #11a7c4; }

.bbi-af-text { flex: 1; min-width: 0; }

.bbi-af-text > span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-af-text b { font-weight: 800; }

.bbi-af-text small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-af-time {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-af-item.is-live .bbi-af-time {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bbi-indigo);
  color: #fff;
  font-weight: 800;
}

/* ---------- Live BoogieBoard ---------- */

.bbi-af-board {
  display: flex;
  flex-direction: column;
  border-top: 5px solid var(--bbi-indigo);
}

.bbi-af-board.is-flash { animation: bbi-af-board-flash 1.4s ease; }

@keyframes bbi-af-board-flash {
  0% { box-shadow: 0 0 0 0 rgba(94, 114, 228, 0.55), var(--bbi-shadow); }
  35% { box-shadow: 0 0 0 10px rgba(94, 114, 228, 0.18), var(--bbi-shadow); }
  100% { box-shadow: 0 0 0 0 rgba(94, 114, 228, 0), var(--bbi-shadow); }
}

.bbi-af-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  margin-left: auto;
  padding: 0 9px;
  align-self: center;
  border-radius: 999px;
  background: var(--bbi-good-bg);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--bbi-good);
}

.bbi-af-live i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2dce89;
}

.bbi-af-board__sub {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bbi-line);
}

.bbi-af-board__sub b { font-size: 18px; font-weight: 800; color: var(--bbi-ink); }

.bbi-af-board__sub small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-af-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 10px 0; }

.bbi-af-row {
  padding: 11px 8px 12px;
  border-radius: 12px;
  transition: background-color 0.6s ease;
}

.bbi-af-row.is-changed { animation: bbi-af-row-flash 1.6s ease; }

@keyframes bbi-af-row-flash {
  0%, 30% { background: rgba(94, 114, 228, 0.14); }
  100% { background: transparent; }
}

.bbi-af-row__top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.bbi-af-row__top .bbi-avatar { width: 24px; height: 24px; box-shadow: 0 0 0 2px #fff; }
.bbi-af-row__top b { font-size: 13px; font-weight: 800; color: var(--bbi-ink); white-space: nowrap; }

.bbi-af-row__n {
  margin-left: auto;
  font-size: 16px;
  font-weight: 800;
  color: var(--bbi-ink);
  font-variant-numeric: tabular-nums;
}

.bbi-af-row__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 18px;
  margin-left: 31px;
}

.bbi-af-row__bar .bbi-bar { flex: 1; height: 8px; }

.bbi-af-row__d {
  display: none;
  flex: none;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bbi-surface-2);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--bbi-muted);
}

.bbi-af-row__d.is-up { background: rgba(94, 114, 228, 0.12); color: var(--bbi-indigo); }
.bbi-af-board.is-landed .bbi-af-row__d { display: block; animation: bbi-pop-in 0.5s var(--bbi-spring) both; }

.bbi-af-stamp {
  position: relative;
  height: 58px;
  margin: auto 12px 12px;
  border-radius: 14px;
  background: var(--bbi-surface-2);
  overflow: hidden;
}

.bbi-af-stamp__idle,
.bbi-af-stamp__hot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  transition: opacity 0.35s ease, transform 0.45s var(--bbi-spring);
}

.bbi-af-stamp__idle {
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--bbi-muted);
}

.bbi-af-stamp__idle svg { width: 14px; height: 14px; }

.bbi-af-stamp__hot { opacity: 0; transform: translateY(12px); }
.bbi-af-stamp__hot .bbi-avatar { width: 34px; height: 34px; box-shadow: 0 0 0 2px #fff; }
.bbi-af-stamp__hot b { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.2; color: var(--bbi-indigo); white-space: nowrap; }
.bbi-af-stamp__hot small { display: block; font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-af-stamp.is-hot { background: #f0f2ff; box-shadow: inset 0 0 0 1.5px rgba(94, 114, 228, 0.3); }
.bbi-af-stamp.is-hot .bbi-af-stamp__idle { opacity: 0; transform: translateY(-12px); }
.bbi-af-stamp.is-hot .bbi-af-stamp__hot { opacity: 1; transform: none; }
