/* Territory Map Builder: share link, read-only page, PNG and PDF */

.bbi-mbs-ed .bbi-card__head { padding: 12px 12px 0 16px; height: 50px; }

.bbi-mbs-export,
.bbi-mbs-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 800;
}

.bbi-mbs-export svg,
.bbi-mbs-share svg { width: 13px; height: 13px; }

.bbi-mbs-export {
  margin-left: auto;
  border: 1px solid #e3e7f3;
  color: var(--bbi-ink);
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.bbi-mbs-export.is-on { border-color: var(--bbi-indigo); background: rgba(94, 114, 228, 0.1); color: #4a5bd0; }

.bbi-mbs-share {
  background: var(--bbi-grad-cta);
  color: #fff;
  box-shadow: 0 8px 16px -8px rgba(255, 2, 108, 0.6);
  transition: box-shadow 0.3s ease;
}

.bbi-mbs-share.is-on { box-shadow: 0 0 0 4px rgba(255, 2, 108, 0.16), 0 8px 16px -8px rgba(255, 2, 108, 0.6); }

.bbi-mbs-canvas { left: 12px; top: 54px; width: 412px; height: 168px; }
.bbi-mbs-canvas .bbi-map__area,
.bbi-mbs-seen__map .bbi-map__area,
.bbi-mbs-thumb .bbi-map__area { stroke-width: 0.6; }

.bbi-mbs-label { display: flex; align-items: center; gap: 8px; height: 22px; margin: 184px 16px 6px; }
.bbi-mbs-live { height: 20px; padding: 0 8px; font-size: 10.5px; letter-spacing: 0.04em; }

.bbi-mbs-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bbi-good);
  box-shadow: 0 0 0 3px rgba(26, 174, 111, 0.2);
}

.bbi-mbs-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  margin: 0 12px;
  padding: 0 5px 0 13px;
  border-radius: 12px;
  border: 1.5px dashed #dfe3f1;
  background: var(--bbi-surface-2);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.bbi-mbs-link.is-ready { border-style: solid; border-color: rgba(94, 114, 228, 0.35); background: #fff; }

.bbi-mbs-link__url {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bbi-ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bbi-mbs-link__ph { font-weight: 600; color: var(--bbi-faint); }
.bbi-mbs-spin { display: inline-block; vertical-align: -3px; width: 16px; height: 16px; border-color: rgba(94, 114, 228, 0.25); border-top-color: var(--bbi-indigo); }

.bbi-mbs-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--bbi-grad-brand);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 16px -8px rgba(94, 114, 228, 0.6);
}

.bbi-mbs-copy svg { width: 14px; height: 14px; }
.bbi-mbs-link:not(.is-ready) .bbi-mbs-copy { background: var(--bbi-faint); box-shadow: none; }
.bbi-mbs-copy.is-done { background: var(--bbi-good-bg); color: var(--bbi-good); box-shadow: none; }

.bbi-mbs-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 16px 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-mbs-note svg { width: 13px; height: 13px; flex: none; }

/* The shared page */
.bbi-mbs-seen { overflow: hidden; }

.bbi-mbs-seen__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--bbi-line);
  background: #fcfcff;
}

.bbi-mbs-seen__bar i { width: 9px; height: 9px; flex: none; border-radius: 50%; }
.bbi-mbs-seen__bar i:nth-child(1) { background: #ff8fb3; }
.bbi-mbs-seen__bar i:nth-child(2) { background: #ffc078; }
.bbi-mbs-seen__bar i:nth-child(3) { background: #8fe3b8; }

.bbi-mbs-seen__url {
  flex: 1;
  min-width: 0;
  margin-left: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bbi-surface-2);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 24px;
  color: var(--bbi-muted);
}

.bbi-mbs-seen__title { display: flex; align-items: center; padding: 11px 12px 9px; }
.bbi-mbs-seen__title b { font-size: 15px; font-weight: 800; color: var(--bbi-ink); }
.bbi-mbs-seen__title .bbi-tag { margin-left: auto; }

.bbi-mbs-seen__map {
  width: 244px;
  height: 112px;
  margin: 0 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef3fb, #e8eef8);
  overflow: hidden;
}

.bbi-mbs-seen__map .bbi-map__area { transition: fill 0.35s ease; }

.bbi-mbs-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
  padding: 11px 14px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-mbs-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bbi-mbs-legend i { width: 9px; height: 9px; flex: none; border-radius: 3px; }

.bbi-mbs-nologin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  margin: 12px 12px 0;
  border-radius: 9px;
  background: var(--bbi-good-bg);
  font-size: 12.5px;
  font-weight: 800;
  color: #12925c;
}

.bbi-mbs-nologin svg { width: 14px; height: 14px; }

/* Downloads */
.bbi-mbs-out .bbi-card__head { padding: 14px 18px 12px; }
.bbi-mbs-files { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }

.bbi-mbs-file {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 92px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1.5px solid var(--bbi-line);
  background: #fff;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.bbi-mbs-file.is-done { border-color: var(--bbi-good-edge); background: #f7fdfa; }

.bbi-mbs-thumb {
  position: relative;
  width: 100px;
  height: 60px;
  flex: none;
  padding: 10px 4px;
  border-radius: 8px;
  border: 1px solid #e3e7f3;
  background: linear-gradient(180deg, #eef3fb, #e8eef8);
  box-shadow: var(--bbi-shadow-sm);
}

/* The PDF is a page with the map on it. */
.bbi-mbs-file--pdf .bbi-mbs-thumb { width: 50px; height: 64px; margin: 0 25px; padding: 20px 4px 26px; background: #fff; }

.bbi-mbs-thumb em {
  position: absolute;
  right: -7px;
  bottom: -6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bbi-indigo);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.bbi-mbs-file--pdf .bbi-mbs-thumb em { background: #f0386b; }

.bbi-mbs-file__meta { flex: 1; min-width: 0; }
.bbi-mbs-file__meta b { display: block; font-size: 14px; font-weight: 800; line-height: 1.25; color: var(--bbi-ink); white-space: nowrap; }
.bbi-mbs-file__meta small { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--bbi-muted); white-space: nowrap; }
.bbi-mbs-file__meta .bbi-bar { height: 7px; }
.bbi-mbs-file__meta .bbi-bar__fill { transition: width 0.7s ease, background 0.3s ease; }

.bbi-mbs-file__state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  min-width: 88px;
  justify-content: flex-end;
  font-size: 12px;
  font-weight: 800;
  color: var(--bbi-muted);
  font-variant-numeric: tabular-nums;
}

.bbi-mbs-file__state svg { width: 12px; height: 12px; }
.bbi-mbs-file.is-done .bbi-mbs-file__state { color: var(--bbi-good); }
