/* Integrations: everything BoogieBoard connects to */

.bbi-cn-links path {
  stroke: #d5dcef;
  stroke-width: 3;
  transition: stroke 0.4s ease;
}

.bbi-cn-links path.is-live { stroke: #b3bff0; }

/* ---------- Salesforce ---------- */

.bbi-cn-sf { border-top: 5px solid #1b9ee6; }
.bbi-cn-sf .bbi-card__head { padding: 14px 18px 10px; }
.bbi-cn-sf .bbi-card__head .bbi-tag { margin-left: 4px; }
.bbi-cn-sf .bbi-card__head small { display: inline-flex; align-items: center; gap: 6px; }
.bbi-cn-sf .bbi-card__head small svg { width: 13px; height: 13px; }

.bbi-cn-sf__rows {
  display: grid;
  gap: 8px;
  padding: 0 18px;
}

.bbi-cn-sf__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bbi-cn-sf__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 92px;
  flex: none;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-ink);
}

.bbi-cn-sf__label svg { width: 14px; height: 14px; }
.bbi-cn-sf__row--in .bbi-cn-sf__label svg { color: #11a7c4; transform: rotate(90deg); }
.bbi-cn-sf__row--out .bbi-cn-sf__label svg { color: var(--bbi-indigo); transform: rotate(-90deg); }

.bbi-cn-obj {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.bbi-cn-obj--in { background: #e3f6fa; color: #0f8aa3; }
.bbi-cn-obj--out { background: rgba(94, 114, 228, 0.1); color: var(--bbi-indigo); }
.bbi-cn-obj.is-lit-in { background: #11a7c4; color: #fff; box-shadow: 0 6px 14px -6px rgba(17, 167, 196, 0.7); }
.bbi-cn-obj.is-lit-out { background: var(--bbi-indigo); color: #fff; box-shadow: 0 6px 14px -6px rgba(94, 114, 228, 0.7); }

/* ---------- Nodes ---------- */

.bbi-cn-node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 14px;
  border-radius: 16px;
  transition: opacity 0.4s ease, border-color 0.4s ease;
}

.bbi-cn-node .bbi-tile { width: 36px; height: 36px; border-radius: 11px; transition: filter 0.4s ease; }
.bbi-cn-node .bbi-tile svg { width: 19px; height: 19px; }

.bbi-cn-node__text b {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--bbi-ink);
}

.bbi-cn-node__text small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--bbi-muted);
}

.bbi-cn-tint-teal { background: linear-gradient(135deg, #2dcecc, #11a7c4); }
.bbi-cn-tint-green { background: var(--bbi-grad-good); }
.bbi-cn-tint-orange { background: linear-gradient(135deg, #fc8453, #fc5f08); }
.bbi-cn-tint-indigo { background: var(--bbi-grad-brand); }
.bbi-cn-tint-ai { background: linear-gradient(135deg, #825ee4, #ff5fb5); }
.bbi-cn-tint-pink { background: linear-gradient(135deg, #ff5fb5, #ff026c); }
.bbi-cn-tint-navy { background: linear-gradient(135deg, #344767, #1e2a4a); }

.bbi-cn-node.is-idle,
.bbi-cn-sf.is-idle { opacity: 0.6; }
.bbi-cn-node.is-idle .bbi-tile,
.bbi-cn-sf.is-idle .bbi-tile { filter: grayscale(1) opacity(0.55); }
.bbi-cn-node.is-on { border-color: var(--bbi-good-edge); }

/* Connected badge hangs off the top-right corner */
.bbi-cn-badge {
  position: absolute;
  top: -11px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  background: var(--bbi-good-bg);
  border: 1.5px solid var(--bbi-good-edge);
  color: var(--bbi-good);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 0 0 3px #fff;
  transform: scale(0);
  transition: transform 0.45s var(--bbi-spring);
}

.bbi-cn-badge svg { width: 11px; height: 11px; }
.is-on > .bbi-cn-badge { transform: scale(1); }
.bbi-cn-sf .bbi-cn-badge { top: -13px; right: 18px; }

/* ---------- Hub ---------- */

.bbi-cn-hub {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 14px 16px;
  border-radius: 22px;
  border: 1.5px solid rgba(94, 114, 228, 0.22);
  text-align: center;
}

.bbi-cn-hub::before,
.bbi-cn-hub::after {
  content: '';
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: 30px;
  border: 1.5px solid rgba(94, 114, 228, 0.16);
  pointer-events: none;
}

.bbi-cn-hub::after { inset: -22px; border-radius: 40px; border-color: rgba(94, 114, 228, 0.08); }

.bbi-cn-hub__mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--bbi-grad-brand);
  color: #fff;
  box-shadow: 0 14px 26px -10px rgba(94, 114, 228, 0.7);
}

.bbi-cn-hub__mark svg { width: 30px; height: 30px; }

.bbi-cn-hub__word {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--bbi-ink);
}

.bbi-cn-hub__sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--bbi-muted);
}

.bbi-cn-hub__count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bbi-surface-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.bbi-cn-hub__count b { color: var(--bbi-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.bbi-cn-hub__count svg { width: 12px; height: 12px; }
.bbi-cn-hub__count.is-done { background: var(--bbi-good-bg); color: var(--bbi-good); font-weight: 800; }

/* ---------- Packets ---------- */

.bbi-cn-packet {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff, 0 6px 12px -4px rgba(30, 42, 74, 0.4);
  pointer-events: none;
}

/* Salesforce lane labels */
.bbi-cn-lane {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 48px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bbi-cn-lane svg { width: 12px; height: 12px; }
.bbi-cn-lane--in { justify-content: flex-end; color: #0f8aa3; }
.bbi-cn-lane--in svg { transform: rotate(90deg); }
.bbi-cn-lane--out { color: var(--bbi-indigo); }
.bbi-cn-lane--out svg { transform: rotate(-90deg); }
