/* Geo limits: distance and time-zone limit goals keep territories practical */

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

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

.bbi-gli-akhi { margin-left: auto; }

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

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

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

.bbi-gli-svg .bbi-map__area.is-out {
  stroke: #f0386b;
  stroke-width: 3;
  stroke-dasharray: 6 3;
  filter: drop-shadow(0 2px 5px rgba(240, 56, 107, 0.35));
}

.bbi-gli-zone-line path {
  fill: none;
  stroke: #1e2a4a;
  stroke-opacity: 0.62;
  stroke-width: 6;
  stroke-dasharray: 10 6;
  stroke-linejoin: round;
}

.bbi-gli-ring {
  stroke: #11a7c4;
  stroke-width: 2;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
}

/* Time-zone band labels */
.bbi-gli-tz {
  position: absolute;
  translate: -50% -50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--bbi-shadow-sm);
  font-size: 11px;
  font-weight: 800;
  color: #6b7896;
  white-space: nowrap;
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.bbi-gli-tz svg { width: 11px; height: 11px; }
.bbi-gli-tz.is-span { background: #11a7c4; color: #fff; box-shadow: 0 6px 12px -6px rgba(17, 167, 196, 0.7); }
.bbi-gli-tz.is-over { background: #f0386b; color: #fff; box-shadow: 0 6px 12px -6px rgba(240, 56, 107, 0.7); }

.bbi-gli-ringlabel {
  position: absolute;
  translate: -50% -50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid #11a7c4;
  font-size: 11px;
  font-weight: 800;
  color: #0b7f96;
  white-space: nowrap;
}

.bbi-gli-ringlabel svg { width: 12px; height: 12px; }

/* Rep home pin */
.bbi-gli-home {
  position: absolute;
  z-index: 3;
  width: 10px;
  height: 10px;
  translate: -50% -50%;
  border-radius: 50%;
  background: #1e2a4a;
  box-shadow: 0 0 0 2.5px #fff, 0 2px 5px rgba(30, 42, 74, 0.45);
}

.bbi-gli-home::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid #fff;
  opacity: 0;
  animation: bbi-gli-ping 2s ease-out infinite;
}

@keyframes bbi-gli-ping {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.bbi-gli-pin {
  position: absolute;
  z-index: 4;
  width: 32px;
  height: 32px;
  translate: -50% calc(-100% - 9px);
  padding: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 16px -4px rgba(30, 42, 74, 0.5);
  transform-origin: 50% 130%;
}

.bbi-gli-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 0;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top: 6px solid #fff;
  border-bottom: 0;
}

.bbi-gli-pin .bbi-avatar { display: block; width: 26px; height: 26px; box-shadow: none; }

/* Legend */
.bbi-gli-legend {
  position: absolute;
  z-index: 2;
  padding: 10px 12px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--bbi-shadow-sm);
}

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

.bbi-gli-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.bbi-gli-legend__row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bbi-gli-legend__row .bbi-avatar { width: 26px; height: 26px; box-shadow: 0 0 0 2px #fff; }

.bbi-gli-legend__row b {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--bbi-ink);
}

.bbi-gli-legend__row small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--bbi-muted);
}

/* Result note */
.bbi-gli-note {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--bbi-good-edge);
  box-shadow: var(--bbi-shadow);
}

.bbi-gli-note__ok {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: var(--bbi-grad-good);
  color: #fff;
}

.bbi-gli-note__ok svg { width: 17px; height: 17px; }
.bbi-gli-note b { display: block; font-size: 14px; font-weight: 800; color: var(--bbi-ink); line-height: 1.2; }
.bbi-gli-note small { display: block; font-size: 11px; font-weight: 700; color: var(--bbi-good); }

/* ---- Limit goals ---- */

.bbi-gli-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(17, 167, 196, 0.1);
  font-size: 12px;
  font-weight: 800;
  color: #0b7f96;
}

.bbi-gli-who i { width: 8px; height: 8px; border-radius: 50%; background: #11a7c4; }

.bbi-gli-go {
  margin-left: auto;
  height: 34px;
  padding: 0 16px;
  gap: 7px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.2s var(--bbi-ease);
}

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

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

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

.bbi-gli-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 16px 0 18px;
}

.bbi-gli-limit {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 66px;
  padding: 0 14px 0 12px;
  border-radius: 14px;
  border: 1px solid var(--bbi-line);
  background: var(--bbi-surface-2);
  transition: background-color 0.45s ease, border-color 0.45s ease;
}

.bbi-gli-limit.is-bad { background: #fff5f8; border-color: var(--bbi-bad-edge); }
.bbi-gli-limit.is-good { background: #f2fbf7; border-color: var(--bbi-good-edge); }

.bbi-gli-limit__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #2dcecc, #11a7c4);
}

.bbi-gli-limit__icon svg { width: 19px; height: 19px; }

.bbi-gli-limit__badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
  transition: background-color 0.35s ease;
}

.bbi-gli-limit__badge span { display: none; place-items: center; }
.bbi-gli-limit__badge svg { width: 9px; height: 9px; }
.bbi-gli-limit.is-bad .bbi-gli-limit__badge { background: var(--bbi-bad); }
.bbi-gli-limit.is-bad .bbi-gli-limit__badge .is-x { display: grid; }
.bbi-gli-limit.is-good .bbi-gli-limit__badge { background: var(--bbi-good); }
.bbi-gli-limit.is-good .bbi-gli-limit__badge .is-ok { display: grid; }

.bbi-gli-limit__text { min-width: 0; }

.bbi-gli-limit__text b {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--bbi-ink);
  white-space: nowrap;
}

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

.bbi-gli-limit__val {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.45s ease;
}

.bbi-gli-limit__val b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.bbi-gli-limit__val span { font-size: 13px; font-weight: 800; }
.bbi-gli-limit.is-bad .bbi-gli-limit__val { color: var(--bbi-bad); }
.bbi-gli-limit.is-good .bbi-gli-limit__val { color: var(--bbi-good); }

@media (prefers-reduced-motion: reduce) {
  :root[data-reduced-motion="honor"] .bbi-gli-home::after { animation: none; }
}
