/* ARCHIVED (2026-07-17) — AR Radar / AR Box styling. Real, working,
   deliberately not shipping — see docs/AR-ARCHIVE.md for the full "what is
   this, where does it live, how do I bring it back" writeup. Every rule in
   this file only ever applies to markup that stays behind
   js/lib/feature-flags.js's AR_FEATURES_ENABLED gate — split into its own
   file (rather than left inline in app.css) so the whole feature's visual
   footprint is one clearly-bounded, easy-to-drop-or-restore unit. Loaded
   from index.html/backend/index.html right after app.css. */

/* AR Radar entry button (js/missions.js's #home-map-ar-btn) — forced
   hidden while the flag is off (updateArButtonVisibility), so this rule
   never actually paints anything today; kept for when it's flipped back. */
.home-map-ar-btn {
  position: absolute;
  right: var(--space-2);
  bottom: 100%;
  margin-bottom: 6.2rem; /* topmost — stacks above .home-map-drop-tray-btn (2026-07-17: swapped slots with it, backpack now sits closer to the thumb) */
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--card-rgb), 0.86);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.home-map-ar-btn:active { transform: scale(0.92); }

/* AR Radar — a camera feed wants to fill the whole screen edge to edge, not
   sit inside .agent-profile-screen's usual safe-top padding + scroll body,
   so this modifier overrides both. Everything else (fixed inset, dark
   backdrop while the camera stream loads) reuses the parent class as-is. */
.ar-view-screen { padding-top: 0; overflow: hidden; background: #000; }
/* #ar-canvas — three.js WebGLRenderer target for the LocAR.js AR Radar
   (js/missions.js's openArView). The actual camera feed is a separate
   <video> element LocAR creates itself — reparentArWebcamVideo() moves it
   to sit just behind this canvas within #screen-ar-view, inline-styled at
   JS runtime (see that function) rather than by a class here, since it's
   an element this app doesn't own the markup for. */
.ar-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ar-view-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 0.7rem) 1.1rem 0.7rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}
.ar-view-back-btn, .ar-view-label { color: var(--white); }
.ar-status-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + 1.4rem);
  z-index: 2;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--white);
  padding: 0 1.5rem;
}
/* ---------- Place AR Box (js/admin.js's capture flow, HQ-only) ---------- */
.ar-anchor-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain, not cover, unlike the live video feed and the ghost overlay
     above — HQ needs to see and tap the WHOLE captured frame accurately,
     not a cropped one, since tapX/tapY are read back as fractions of
     exactly what's shown here. */
  object-fit: contain;
  background: #000;
  z-index: 1;
  cursor: crosshair;
}
.ar-anchor-tap-marker {
  position: absolute;
  z-index: 3;
  width: 1.6rem;
  height: 1.6rem;
  transform: translate(-50%, -50%);
  border: 2px solid var(--red);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}
.ar-anchor-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--safe-bottom) + 7rem);
  z-index: 2;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--white);
  padding: 0 1.5rem;
}
.ar-anchor-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem calc(1rem + var(--safe-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}
.ar-anchor-details {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  max-width: 22rem;
}
.ar-anchor-details input { width: 100%; }
