/* Geo lock: lock areas on the map, Auto-Balance works around them */

.bbi-gl-map .bbi-card__head,
.bbi-gl-board .bbi-card__head { padding: 14px 16px 0 18px; }

.bbi-gl-status { margin-left: 4px; }

.bbi-gl-go {
  margin-left: auto;
  height: 32px;
  padding: 0 14px;
  gap: 7px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

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

.bbi-gl-go.is-busy {
  background-image: linear-gradient(100deg, #5e72e4 0%, #825ee4 40%, #b9a6f5 50%, #825ee4 60%, #5e72e4 100%);
  background-size: 250% 100%;
}

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

/* Still mode shows the finished state without animating into it */
.bbi-gl-static *,
.bbi-gl-static *::after { transition: none !important; }

/* ---- Map ---- */

.bbi-gl-svg { position: absolute; }

.bbi-gl-svg .bbi-map__area {
  transform-box: fill-box;
  transform-origin: center;
}

.bbi-gl-svg .bbi-map__area.is-picked {
  stroke: #1e2a4a;
  stroke-width: 2.4;
  stroke-dasharray: 5 3;
  filter: brightness(1.1) drop-shadow(0 3px 6px rgba(30, 42, 74, 0.35));
}

.bbi-gl-stripes { pointer-events: none; }

.bbi-gl-stripe {
  stroke: #d97706;
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.bbi-gl-legend {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1;
  width: 172px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--bbi-shadow-sm);
}

.bbi-gl-legend__title {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-gl-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--bbi-ink);
}

.bbi-gl-legend__row i { width: 11px; height: 11px; border-radius: 50%; flex: none; }

.bbi-gl-legend__row small {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--bbi-muted);
  font-variant-numeric: tabular-nums;
}

.bbi-gl-legend__lock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px 0 5px;
  border-radius: 6px;
  background: #fff1db;
  font-size: 11px;
  font-weight: 800;
  color: #d97706;
}

.bbi-gl-legend__lock svg { width: 10px; height: 10px; }

/* Lock badge pinned to a locked area */
.bbi-gl-lock {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 0 2.5px #fff, 0 6px 12px -4px rgba(146, 64, 14, 0.55);
  color: #fff;
}

.bbi-gl-lock svg { width: 14px; height: 14px; }

.bbi-gl-lock::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2.5px solid #f59e0b;
  opacity: 0;
  pointer-events: none;
}

.bbi-gl-lock.is-drop { animation: bbi-gl-drop 0.6s var(--bbi-spring) both; }
.bbi-gl-lock.is-hold { animation: bbi-gl-hold 0.55s var(--bbi-spring); }
.bbi-gl-lock.is-hold::after { animation: bbi-gl-halo 0.8s ease-out; }

@keyframes bbi-gl-drop {
  from { opacity: 0; transform: translateY(-18px) scale(0.5); }
  to { opacity: 1; transform: none; }
}

@keyframes bbi-gl-hold {
  40% { transform: scale(1.22); }
}

@keyframes bbi-gl-halo {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.9); }
}

.bbi-gl-ring {
  position: absolute;
  z-index: 5;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid;
  pointer-events: none;
}

/* Transient "WI → East" note as an area moves */
.bbi-gl-move {
  position: absolute;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--bbi-shadow);
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-ink);
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.bbi-gl-move svg { width: 11px; height: 11px; color: var(--bbi-muted); }
.bbi-gl-move i { width: 9px; height: 9px; border-radius: 50%; }

/* Run result */
.bbi-gl-note {
  position: absolute;
  right: 12px;
  top: 136px;
  z-index: 2;
  width: 172px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--bbi-shadow);
}

.bbi-gl-note__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--bbi-ink);
}

.bbi-gl-note__ok {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--bbi-grad-good);
  color: #fff;
}

.bbi-gl-note__ok svg { width: 13px; height: 13px; }

.bbi-gl-note__row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
  white-space: nowrap;
}

.bbi-gl-note__row b { font-weight: 800; color: var(--bbi-ink); }
.bbi-gl-note__lock { font-weight: 800; color: #d97706; }
.bbi-gl-note__lock svg { width: 12px; height: 12px; }

/* ---- Selection panel ---- */

.bbi-gl-panel { width: 292px; padding: 12px; z-index: 9; }

.bbi-gl-panel__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bbi-line);
}

.bbi-gl-panel__head b { font-size: 14px; font-weight: 800; color: var(--bbi-ink); }
.bbi-gl-panel__head small { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--bbi-muted); }

.bbi-gl-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #1e2a4a;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.bbi-gl-panel__title {
  margin: 10px 0 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bbi-muted);
}

.bbi-gl-assign { display: flex; gap: 6px; }

.bbi-gl-assign__pick {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--bbi-line);
  font-size: 12px;
  font-weight: 600;
  color: #a3acc7;
  white-space: nowrap;
}

.bbi-gl-assign__pick i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px dashed #c5cde3; flex: none; }
.bbi-gl-assign__pick svg { width: 12px; height: 12px; margin-left: auto; }

.bbi-gl-assign__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(94, 114, 228, 0.1);
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-indigo);
  opacity: 0.5;
}

.bbi-gl-assign__btn svg { width: 12px; height: 12px; }

.bbi-gl-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 9px 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bbi-muted);
}

.bbi-gl-check i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #c5cde3; flex: none; }

.bbi-gl-actions { display: flex; gap: 6px; }

.bbi-gl-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--bbi-line);
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-muted);
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--bbi-ease);
}

.bbi-gl-act svg { width: 12px; height: 12px; }
.bbi-gl-act--lock { flex: 1; border-color: #ffd28a; background: #fffaf0; color: #b45309; }
.bbi-gl-act--lock.is-hover { background: #fff1db; border-color: #f5b453; }
.bbi-gl-act--lock.is-pressed { transform: scale(0.95); }
.bbi-gl-act--danger { color: #e5484d; }

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

.bbi-gl-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bbi-surface-2);
  font-size: 11px;
  font-weight: 800;
  color: var(--bbi-muted);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.bbi-gl-live i { width: 7px; height: 7px; border-radius: 50%; background: #c5cde3; }
.bbi-gl-live.is-on { background: #e9f8f1; color: #0d7347; }
.bbi-gl-live.is-on i { background: var(--bbi-good); animation: bbi-gl-blink 1s ease-in-out infinite; }

@keyframes bbi-gl-blink { 50% { opacity: 0.3; } }

.bbi-gl-pill { margin-left: auto; }

.bbi-gl-grid {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  gap: 6px 10px;
  padding: 8px 18px 16px;
}

.bbi-gl-grid .bbi-pivot__head { height: 22px; }
.bbi-gl-grid .bbi-territory { height: 40px; }
.bbi-gl-grid .bbi-territory .bbi-avatar { width: 30px; height: 30px; }
.bbi-gl-grid .bbi-territory__name { font-size: 14px; }
.bbi-gl-grid .bbi-cell { height: 40px; font-size: 15px; }

.bbi-gl-delta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
