/* Logic suggestions from imported territories */

.bbi-ls-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}

.bbi-ls-head__text b { display: block; font-size: 15px; font-weight: 800; color: var(--bbi-ink); }
.bbi-ls-head__text small { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--bbi-muted); }
.bbi-ls-head__text small span { font-weight: 800; color: var(--bbi-ink); }

.bbi-ls-sib {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  margin-left: auto;
  padding: 0 12px 0 10px;
  border-radius: 10px;
  background: rgba(94, 114, 228, 0.1);
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-indigo);
  white-space: nowrap;
}

.bbi-ls-sib svg { width: 15px; height: 15px; }

/* Territory rows */
.bbi-ls-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 22px;
  overflow: hidden;
  transition: border-color 0.4s ease, background-color 0.4s ease;
}

.bbi-ls-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--bbi-ls-color);
}

.bbi-ls-row.is-added { border-color: var(--bbi-good-edge); background: #fbfefc; }

.bbi-ls-terr {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 170px;
  flex: none;
}

.bbi-ls-terr .bbi-avatar { width: 34px; height: 34px; }

.bbi-ls-terr b {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 800;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-ls-terr small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bbi-muted);
  white-space: nowrap;
}

/* Suggestion */
.bbi-ls-sug {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 92px;
}

.bbi-ls-empty {
  position: absolute;
  inset: 8px 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1.5px dashed #dfe3f1;
  font-size: 13px;
  font-weight: 700;
  color: #a3aec4;
  transition: opacity 0.3s ease;
}

.bbi-ls-rule,
.bbi-ls-meters { opacity: 0; transition: opacity 0.3s ease; }
.bbi-ls-sug.is-on .bbi-ls-empty { opacity: 0; }
.bbi-ls-sug.is-on .bbi-ls-rule,
.bbi-ls-sug.is-on .bbi-ls-meters { opacity: 1; }

.bbi-ls-rule {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 6px;
  border-radius: 11px;
  background: #fbfbff;
  border: 1px solid rgba(94, 114, 228, 0.18);
  transition: opacity 0.3s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.bbi-ls-row.is-added .bbi-ls-rule { background: #f2fbf6; border-color: var(--bbi-good-edge); }

.bbi-ls-spark { display: grid; place-items: center; width: 20px; color: var(--bbi-purple); }
.bbi-ls-spark svg { width: 15px; height: 15px; }
.bbi-ls-row.is-added .bbi-ls-spark { color: var(--bbi-good); }

.bbi-ls-field {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--bbi-line);
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-ls-op {
  margin: 0 2px;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-purple);
  white-space: nowrap;
}

.bbi-ls-val {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  background: rgba(94, 114, 228, 0.1);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--bbi-indigo);
  white-space: nowrap;
}

.bbi-ls-val--more { background: none; padding: 0 2px; color: var(--bbi-muted); }

.bbi-ls-meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
  padding: 0 4px;
}

.bbi-ls-meter > span:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-ls-meter b {
  font-size: 14px;
  font-weight: 800;
  color: var(--bbi-indigo);
  font-variant-numeric: tabular-nums;
}

.bbi-ls-meter--good b { color: var(--bbi-good); }
.bbi-ls-meter .bbi-bar { display: block; height: 8px; margin-top: 6px; }
.bbi-ls-meter .bbi-bar__fill { transition: width 0.8s var(--bbi-ease); }

/* Action */
.bbi-ls-btn {
  flex: none;
  justify-content: center;
  width: 124px;
  height: 40px;
  padding: 0 12px;
  gap: 7px;
  font-size: 13px;
  transition: transform 0.2s var(--bbi-ease), box-shadow 0.2s ease, background 0.3s ease, color 0.3s ease;
}

.bbi-ls-btn svg { width: 15px; height: 15px; }
.bbi-ls-btn .bbi-spinner { width: 14px; height: 14px; }

.bbi-ls-btn.is-busy {
  background-image: linear-gradient(100deg, #5e72e4 0%, #825ee4 40%, #b7a5f5 50%, #825ee4 60%, #5e72e4 100%);
  background-size: 250% 100%;
  animation: bbi-shimmer 1.2s linear infinite;
}

.bbi-ls-btn.is-add {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(94, 114, 228, 0.45);
  color: var(--bbi-indigo);
}

.bbi-ls-btn.is-added { background: var(--bbi-grad-good); box-shadow: 0 12px 24px -10px rgba(26, 174, 111, 0.5); }
