.scanner-crosshair-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.scanner-crosshair-target {
  position: fixed;
  box-sizing: border-box;
  min-width: 28px;
  min-height: 28px;
  border: 3px solid rgba(226, 232, 240, .82);
  border-radius: 8px;
  background: rgba(15, 23, 42, .12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .62);
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.scanner-crosshair-target.selected {
  border-color: #ffd54f;
  background: rgba(255, 213, 79, .11);
  box-shadow: 0 0 0 2px rgba(54, 43, 3, .85), 0 0 16px rgba(255, 213, 79, .65);
}

.scanner-crosshair-target.locked {
  border: 4px solid #42ff9b;
  background: rgba(66, 255, 155, .14);
  box-shadow: 0 0 0 2px rgba(4, 38, 25, .9), 0 0 20px rgba(66, 255, 155, .82);
}

.scanner-crosshair-target.selected::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  max-width: 72vw;
  overflow: hidden;
  padding: 5px 10px;
  transform: translateX(-50%);
  border: 1px solid #f2ca45;
  border-radius: 7px;
  background: rgba(20, 28, 35, .94);
  color: #fff3bd;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scanner-crosshair-target.locked::after {
  border-color: #54f6ae;
  color: #a0ffd3;
}

.scanner-fixed-crosshair {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .94);
  border-radius: 50%;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .9));
}

.scanner-fixed-crosshair::before,
.scanner-fixed-crosshair::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .72);
}

.scanner-fixed-crosshair::before { width: 92px; height: 2px; }
.scanner-fixed-crosshair::after { width: 2px; height: 92px; }

.scanner-fixed-crosshair.locked {
  border-width: 4px;
  border-color: #42ff9b;
  box-shadow: 0 0 0 3px rgba(4, 38, 25, .8), 0 0 20px rgba(66, 255, 155, .75);
}

.scanner-fixed-crosshair.locked::before,
.scanner-fixed-crosshair.locked::after { background: #42ff9b; }

.scanner-focus-ring {
  position: fixed;
  z-index: 4;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%) scale(1.2);
  border: 2px solid #ffd54f;
  border-radius: 50%;
  opacity: 0;
  box-sizing: border-box;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .9));
  transition: opacity .12s ease, transform .18s ease, border-color .12s ease;
}

.scanner-focus-ring::before,
.scanner-focus-ring::after {
  content: '';
  position: absolute;
  background: currentColor;
}

.scanner-focus-ring::before { left: 50%; top: -7px; bottom: -7px; width: 2px; transform: translateX(-50%); }
.scanner-focus-ring::after { top: 50%; left: -7px; right: -7px; height: 2px; transform: translateY(-50%); }

.scanner-focus-ring.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); color: #ffd54f; }
.scanner-focus-ring.focused { border-color: #42ff9b; color: #42ff9b; }
.scanner-focus-ring.fallback { border-color: #ffd54f; color: #ffd54f; }
.scanner-focus-ring.unsupported { border-color: #cbd5e1; color: #cbd5e1; opacity: .72; }

@media (prefers-reduced-motion: reduce) {
  .scanner-crosshair-target, .scanner-focus-ring { transition: none; }
}
