/* Auto-framing ("Track") readout — website/js/vmcr-guidance/auto-frame.js createHud().
   Sits over the camera picture: coloured quality dot + one plain-language tip. */
.vmcr-af-hud {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 14;
  max-width: min(78%, 420px);
  padding: 6px 10px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.3;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.vmcr-af-hud--top {
  top: 0.75rem;
  bottom: auto;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(64%, 420px);
  text-align: center;
}

.vmcr-af-hud--top .vmcr-af-hud__row {
  justify-content: center;
}

.vmcr-af-hud[hidden] {
  display: none !important;
}

.vmcr-af-hud__row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  white-space: nowrap;
}

.vmcr-af-hud__shot {
  font-weight: 500;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vmcr-af-hud__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.vmcr-af-hud[data-q="good"] .vmcr-af-hud__dot {
  background: #22c55e;
}

.vmcr-af-hud[data-q="ok"] .vmcr-af-hud__dot {
  background: #facc15;
}

.vmcr-af-hud[data-q="poor"] .vmcr-af-hud__dot {
  background: #ef4444;
}

.vmcr-af-hud[data-q="good"] {
  border-color: rgba(34, 197, 94, 0.55);
}

.vmcr-af-hud[data-q="poor"] {
  border-color: rgba(239, 68, 68, 0.6);
}

.vmcr-af-hud__tip {
  margin-top: 2px;
}

.vmcr-af-hud__tip:empty {
  display: none;
}

/* Director tile (next to "Cam N"): small quality dot for a phone that has Track on. */
.vmcr-af-dot {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: 4px;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.vmcr-af-dot[hidden] {
  display: none !important;
}

.vmcr-af-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
}

.vmcr-af-dot[data-q="good"]::before {
  background: #22c55e;
}

.vmcr-af-dot[data-q="ok"]::before {
  background: #facc15;
}

.vmcr-af-dot[data-q="poor"]::before {
  background: #ef4444;
}

/* Director tile: smoothness meter (camera → sent → shown, frames per second). */
.vmcr-perf-badge {
  position: absolute;
  /* Top-left: the cam's red STOP button sits top-right and covered it. */
  left: 6px;
  top: 6px;
  z-index: 16;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #b9f5cc;
  font: 700 0.74rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Never steal a tile click (a click on the tile can take the cam to LIVE). */
  pointer-events: none;
}
.vmcr-perf-badge[hidden] {
  display: none !important;
}
/* Live cam tiles colour their text dark blue (that also dims the STOP label); the meter must
   stay light on its dark box whatever the tile state. */
.vmcr-preview .vmcr-perf-badge,
.vmcr-preview .vmcr-perf-badge[data-level="ok"] {
  color: #b9f5cc !important;
  -webkit-text-fill-color: #b9f5cc;
  opacity: 1 !important;
  filter: none !important;
}
.vmcr-preview .vmcr-perf-badge[data-level="warn"] {
  color: #ffd27a !important;
  -webkit-text-fill-color: #ffd27a;
}
.vmcr-preview .vmcr-perf-badge[data-level="bad"] {
  color: #ff9c9c !important;
  -webkit-text-fill-color: #ff9c9c;
}

/* Director top bar: the room code chip copies on tap. */
.vmcr-chip.is-copyable {
  cursor: copy;
  user-select: all;
}

/* The STOP label is a <span>, so the same tile-wide grey rule in vmcr-base.css dimmed it on the
   red button; keep it white. */
body.ios-theme.vmcr-page .vmcr-preview .vmcr-preview-stop span {
  color: #fff !important;
}
