/* Share links: tables, maps and filtered views */

.bbi-shm-x { display: grid; place-items: center; width: 26px; height: 26px; margin-left: 4px; color: var(--bbi-faint); }
.bbi-shm-x svg { width: 16px; height: 16px; }

.bbi-shm-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 18px;
}

.bbi-shm-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 114px;
  padding: 12px 12px 11px;
  border-radius: 14px;
  border: 1.5px solid var(--bbi-line);
  background: #fff;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.bbi-shm-opt b {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--bbi-ink);
}

.bbi-shm-opt small {
  margin-top: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-shm-opt__check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bbi-indigo);
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.35s var(--bbi-spring);
}

.bbi-shm-opt__check svg { width: 11px; height: 11px; }

.bbi-shm-opt.is-on {
  border-color: var(--bbi-indigo);
  background: #f7f8ff;
  box-shadow: 0 0 0 4px rgba(94, 114, 228, 0.12);
}

.bbi-shm-opt.is-on .bbi-shm-opt__check { opacity: 1; transform: none; }

.bbi-shm-label { margin: 18px 18px 8px; }

.bbi-shm-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 18px;
  height: 46px;
  padding: 0 6px 0 14px;
  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-shm-link.is-ready { border-style: solid; border-color: rgba(94, 114, 228, 0.35); background: #fff; }

.bbi-shm-link__icon { width: 16px; height: 16px; flex: none; color: var(--bbi-indigo); }
.bbi-shm-link__icon svg { display: block; width: 100%; height: 100%; }

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

.bbi-shm-link__ph { font-weight: 600; color: var(--bbi-faint); }
.bbi-shm-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-shm-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);
  transition: background-color 0.3s ease;
}

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

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

.bbi-shm-note svg { width: 14px; height: 14px; flex: none; }

/* Shared map preview */
.bbi-shm-prev { overflow: hidden; }

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

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

.bbi-shm-prev__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);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bbi-shm-prev__title {
  display: flex;
  align-items: center;
  padding: 12px 16px 0;
}

.bbi-shm-prev__title b { font-size: 15px; font-weight: 800; color: var(--bbi-ink); }
.bbi-shm-view { margin-left: auto; }

.bbi-shm-prev__map { display: grid; place-items: center; height: 158px; padding: 2px 0 0; }
.bbi-shm-map { width: 232px; height: 154px; }

.bbi-shm-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  padding: 0 28px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-ink);
  white-space: nowrap;
}

.bbi-shm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bbi-shm-legend i { width: 9px; height: 9px; border-radius: 3px; }
.bbi-shm-prev:not(.is-live) .bbi-shm-legend { opacity: 0.35; }

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

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

/* Access log */
.bbi-shm-log__name {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bbi-surface-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-shm-log__count { margin-left: auto; }
.bbi-shm-log__count b { font-weight: 800; font-variant-numeric: tabular-nums; }

.bbi-shm-opens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding: 0 18px;
}

.bbi-shm-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  height: 108px;
  border-radius: 14px;
  border: 1.5px dashed #e3e7f3;
  font-size: 13px;
  font-weight: 700;
  color: var(--bbi-muted);
}

.bbi-shm-empty.is-off { display: none; }

.bbi-shm-open {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 14px 0 8px;
  border-radius: 14px;
  background: var(--bbi-surface-2);
}

.bbi-shm-open .bbi-avatar { width: 34px; height: 34px; box-shadow: 0 0 0 2px #fff; }
.bbi-shm-open b { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--bbi-ink); }
.bbi-shm-open small { display: block; font-size: 12px; font-weight: 700; color: var(--bbi-muted); }

.bbi-shm-open__time {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  text-align: right;
  color: var(--bbi-muted);
}

.bbi-shm-open__time b { font-size: 13px; color: var(--bbi-ink); }
