/* GeoAware: territories built from where accounts actually are */

.bbi-ga-map .bbi-card__head { height: 40px; padding: 8px 10px 0 16px; box-sizing: border-box; }

.bbi-ga-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(94, 114, 228, 0.09);
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-indigo);
  white-space: nowrap;
}

.bbi-ga-chip:first-of-type { margin-left: 6px; }
.bbi-ga-chip svg { width: 13px; height: 13px; }
.bbi-ga-chip b { font-weight: 800; color: var(--bbi-good); }

.bbi-ga-switch {
  position: relative;
  width: 22px;
  height: 13px;
  flex: none;
  border-radius: 999px;
  background: var(--bbi-indigo);
}

.bbi-ga-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
}

.bbi-ga-go {
  justify-content: center;
  width: 140px;
  height: 32px;
  margin-left: auto;
  padding: 0 12px;
  gap: 7px;
  font-size: 13px;
}

.bbi-ga-go svg { width: 15px; height: 15px; }

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

.bbi-ga-go.is-success { background: var(--bbi-grad-good); box-shadow: 0 12px 22px -10px rgba(26, 174, 111, 0.6); }

/* ---------- Basemap ---------- */

.bbi-ga-svg { position: absolute; }
.bbi-ga-box .bbi-map__area { fill: #e1e6ef; }

.bbi-ga-dot {
  stroke: #fff;
  stroke-width: 1.9;
  opacity: 0.58;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 0.3s ease, opacity 0.35s ease;
}

.bbi-ga-dot.is-set { opacity: 1; }

.bbi-ga-halo {
  fill-opacity: 0.12;
  stroke-opacity: 0.45;
  stroke-width: 2.2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill-opacity 0.4s ease, stroke-opacity 0.4s ease, stroke-width 0.3s ease;
}

.bbi-ga-halo.is-on { opacity: 1; }
.bbi-ga-halo.is-focus { fill-opacity: 0.2; stroke-opacity: 0.95; stroke-width: 3; stroke-dasharray: 7 5; }

.bbi-ga-spoke {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.35s ease, stroke-width 0.3s ease;
}

.bbi-ga-spoke.is-on { opacity: 0.4; }
.bbi-ga-spoke.is-focus { opacity: 0.95; stroke-width: 3.4; }

.bbi-ga-ring { fill: none; stroke-width: 3; opacity: 0; }

/* Rep home pin: avatar in a colored ring on a short tail; the tip marks home. */
.bbi-ga-pin {
  --ga-color: var(--bbi-indigo);
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
}

.bbi-ga-pin::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -2px;
  width: 10px;
  height: 4px;
  border-radius: 50%;
  background: rgba(30, 42, 74, 0.28);
}

.bbi-ga-pin__tail {
  position: absolute;
  left: -6px;
  top: -14px;
  width: 12px;
  height: 14px;
  background: var(--ga-color);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.bbi-ga-pin__head {
  position: absolute;
  left: -15px;
  top: -46px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2.5px var(--ga-color), 0 0 0 4.5px #fff, 0 6px 12px rgba(30, 42, 74, 0.35);
}

.bbi-ga-pin__head svg { display: block; width: 100%; height: 100%; }

.bbi-ga-label {
  --ga-color: var(--bbi-indigo);
  position: absolute;
  z-index: 3;
  width: 0;
  height: 0;
}

.bbi-ga-label span {
  position: absolute;
  left: 0;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--ga-color);
  box-shadow: 0 4px 10px -4px rgba(30, 42, 74, 0.45);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  transform: translateX(-50%);
}

.bbi-ga-label--top span { bottom: 4px; }
.bbi-ga-label--bottom span { top: 4px; }
.bbi-ga-label--right span { left: 5px; top: 0; transform: translateY(-50%); }

/* ---------- Rep grid ---------- */

.bbi-ga-reps { padding: 9px 14px; box-sizing: border-box; }

.bbi-ga-grid {
  display: grid;
  grid-template-columns: 150px repeat(5, 1fr);
  grid-template-rows: 30px 24px 24px;
  gap: 5px 8px;
  align-items: center;
}

.bbi-ga-corner {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-ga-rep {
  --ga-color: var(--bbi-indigo);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 6px;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.bbi-ga-rep .bbi-avatar { width: 24px; height: 24px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ga-color); }
.bbi-ga-rep b { display: block; font-size: 13px; font-weight: 800; line-height: 1.15; color: var(--bbi-ink); }
.bbi-ga-rep small { display: block; font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--bbi-muted); white-space: nowrap; }
.bbi-ga-rep.is-hot { background: var(--bbi-surface-2); background: color-mix(in srgb, var(--ga-color) 13%, #fff); }

.bbi-ga-rowlabel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-ga-rowlabel svg { width: 14px; height: 14px; flex: none; }

.bbi-ga-cell {
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}
