/* Multi-territory accounts: one account, two territories, overlay roles, pushed to ETM and custom fields */

/* ---------- Account card ---------- */

.bbi-mt-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(94, 114, 228, 0.1);
  color: var(--bbi-indigo) !important;
}

.bbi-mt-count svg { width: 12px; height: 12px; }

.bbi-mt-terr {
  position: relative;
  margin: 0 14px;
  padding: 10px 10px 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--bbi-line);
  background: #fff;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.bbi-mt-terr::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -1px;
  width: 4px;
  border-radius: 0 4px 4px 0;
}

.bbi-mt-terr + .bbi-mt-terr { margin-top: 22px; }
.bbi-mt-terr--ee::before { background: var(--bbi-indigo); }
.bbi-mt-terr--hc::before { background: #fc7c3c; }
.bbi-mt-terr--ee { margin-top: 10px; background: linear-gradient(180deg, #f8f9ff, #fff 60%); }

.bbi-mt-terr.is-hot,
.bbi-mt-sup.is-hot,
.bbi-mt-owner.is-hot {
  border-color: #8fd3ef;
  box-shadow: 0 0 0 4px rgba(17, 167, 196, 0.16);
}

.bbi-mt-owner,
.bbi-mt-sup {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.bbi-mt-owner { height: 62px; padding: 0 2px; }
.bbi-mt-owner .bbi-avatar { width: 42px; height: 42px; }

.bbi-mt-who { min-width: 0; flex: 1; }
.bbi-mt-who b { display: block; font-size: 15px; font-weight: 800; color: var(--bbi-ink); line-height: 1.25; white-space: nowrap; }
.bbi-mt-who small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); white-space: nowrap; }

.bbi-mt-ownertag {
  position: absolute;
  top: -12px;
  right: 12px;
  height: 24px;
  padding: 0 9px;
  border: 2px solid #fff;
  font-size: 11px;
}
.bbi-mt-ownertag svg { width: 10px; height: 10px; }

.bbi-mt-suplabel {
  margin: 8px 0 8px 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-mt-sup {
  height: 54px;
  padding: 0 8px;
  background: var(--bbi-surface-2);
}

.bbi-mt-sup + .bbi-mt-sup { margin-top: 8px; }
.bbi-mt-sup .bbi-avatar { width: 32px; height: 32px; box-shadow: 0 0 0 2px #fff; }
.bbi-mt-sup .bbi-mt-who b { font-size: 14px; }
.bbi-mt-sup .bbi-tag { height: 24px; padding: 0 9px; }

.bbi-mt-overlay { background: #f1ebff; color: #6b46d6; }
.bbi-mt-book { background: #e3f6fa; color: #0d8aa3; }

.bbi-mt-note {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bbi-surface-2);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--bbi-ink);
}

/* ---------- Destinations ---------- */

.bbi-mt-dest .bbi-card__head { padding-bottom: 4px; }

.bbi-mt-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 18px;
}

.bbi-mt-opt__text b { display: block; font-size: 14px; font-weight: 800; color: var(--bbi-ink); line-height: 1.3; }
.bbi-mt-opt__text small { display: block; font-size: 12px; font-weight: 600; color: var(--bbi-muted); }

.bbi-mt-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  background: var(--bbi-grad-brand);
  transition: filter 0.3s ease;
}

.bbi-mt-switch.is-off { filter: grayscale(1) brightness(1.45); }

.bbi-mt-switch i {
  position: absolute;
  top: 3px;
  left: 19px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.3s var(--bbi-spring);
}

.bbi-mt-switch.is-off i { left: 3px; }

.bbi-mt-maps { padding: 2px 18px 0 68px; }

.bbi-mt-map {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 29px;
}

.bbi-mt-role {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.bbi-mt-role--se { background: #f1ebff; color: #6b46d6; }
.bbi-mt-role--bdr { background: #e3f6fa; color: #0d8aa3; }

.bbi-mt-arrow { display: grid; place-items: center; color: var(--bbi-faint); }
.bbi-mt-arrow svg { width: 14px; height: 14px; }

.bbi-mt-field {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: #eef8fe;
  color: #0b6fa8;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Review ---------- */

.bbi-mt-review .bbi-card__head { padding-bottom: 6px; }

.bbi-mt-go {
  margin-left: auto;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.bbi-mt-go svg { width: 15px; height: 15px; }
.bbi-mt-go.is-success { background: var(--bbi-grad-good); box-shadow: 0 12px 24px -10px rgba(26, 174, 111, 0.55); }

.bbi-mt-go.is-busy {
  background-image: linear-gradient(100deg, var(--bbi-indigo) 0%, var(--bbi-purple) 40%, #b7a4f5 50%, var(--bbi-purple) 60%, var(--bbi-indigo) 100%);
  background-size: 250% 100%;
}

.bbi-mt-idle {
  position: absolute;
  top: 94px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: var(--bbi-muted);
}

.bbi-mt-idle svg { width: 36px; height: 36px; color: var(--bbi-faint); }
.bbi-mt-idle.bbi-hide { display: none; }

.bbi-mt-writes { padding: 0 16px; }

.bbi-mt-group {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 22px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #0b8bd8;
}

.bbi-mt-group svg { width: 13px; height: 13px; }
.bbi-mt-group--cf { margin-top: 4px; }

.bbi-mt-write {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0 6px;
}

.bbi-mt-write + .bbi-mt-write { border-top: 1px solid var(--bbi-line); }

.bbi-mt-write__label {
  width: 104px;
  flex: none;
  padding-top: 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-mt-write__val { min-width: 0; flex: 1; }
.bbi-mt-vals { display: flex; align-items: center; gap: 6px; height: 26px; }

.bbi-mt-write code {
  display: block;
  margin-top: 2px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--bbi-muted);
}

.bbi-mt-terrchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px 0 7px;
  border-radius: 8px;
  border: 1px solid var(--bbi-line);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-mt-terrchip i { width: 9px; height: 9px; border-radius: 3px; }
.bbi-mt-terrchip--ee i { background: var(--bbi-indigo); }
.bbi-mt-terrchip--hc i { background: #fc7c3c; }

.bbi-mt-stack { display: flex; padding-left: 4px; }
.bbi-mt-stack .bbi-avatar { width: 26px; height: 26px; margin-left: -6px; box-shadow: 0 0 0 2px #fff; }

.bbi-mt-vals em {
  margin-left: 4px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-mt-fw {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
}

.bbi-mt-fw .bbi-mt-field { width: 172px; }

.bbi-mt-fw__rep {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  white-space: nowrap;
}

.bbi-mt-fw__rep .bbi-avatar { width: 24px; height: 24px; box-shadow: none; }
.bbi-mt-fw__rep b { font-weight: 800; color: var(--bbi-ink); }
