/* Informational duplicates of the accessible apartment navigator. Never intercept orbit/touch. */
.unit-badges {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none !important;
  user-select: none;
  contain: layout style;
}
.unit-badges[hidden], .unit-badge[hidden], .unit-badge__leader[hidden] { display: none !important; }
.unit-badge {
  position: absolute;
  inset: 0 auto auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  width: 108px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid rgba(110, 96, 72, .64);
  border-radius: 9px;
  background: rgba(255, 252, 245, .95);
  color: #343632;
  box-shadow: 0 2px 7px rgba(30, 37, 33, .12);
  font-weight: 500;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none !important;
  will-change: transform;
}
.unit-badge__code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .025em;
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
}
.unit-badge__temporary { font-size: 12px; color: #6d6251; }
.unit-badge.is-selected {
  z-index: 1;
  width: 118px;
  height: 36px;
  border: 2px solid #fffaf0;
  background: #145d68;
  color: #fffdf6;
  box-shadow: 0 0 0 2px #145d68, 0 3px 12px rgba(14, 38, 43, .27);
}
.unit-badge.is-selected .unit-badge__code { font-size: 14px; }
.unit-badge.is-selected .unit-badge__temporary { color: #fffdf6; }
@media (prefers-reduced-motion: reduce) { .unit-badge { will-change: auto; } }

/* Keep the existing controls and loading/error message above informational badges. */
#viewer > .viewer-top, #viewer > .viewer-bottom { z-index: 5; }
#viewer > #status { z-index: 6; }

/* A selected tag displaced by the UI safe area remains connected to its real anchor. */
.unit-badge__leader {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  background: #145d68;
  box-shadow: 0 0 0 1px #fffaf0;
  transform-origin: 0 50%;
  pointer-events: none !important;
  z-index: -1;
}
