/* ── CAD / BLUEPRINT X-RAY MODE ─────────────────────────────────────────
   Architectural technical grid, crosshairs, dimension lines & measuring tape.
   ───────────────────────────────────────────────────────────────────────── */

/* ── CAD Mode Button in Header ───────────────────────────────────────── */
.cad-btn {
  font-family: var(--f-mono, ui-monospace, 'Cascadia Mono', 'Roboto Mono', monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--c-text, #111118);
  border: 1px solid var(--c-rule, rgba(17, 17, 24, 0.16));
  border-radius: 50px;
  padding: 6px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.cad-btn:hover {
  border-color: #FF6600;
  color: #FF6600;
  background: rgba(255, 102, 0, 0.06);
}

.cad-btn.is-active {
  background: #FF6600;
  border-color: #FF6600;
  color: #111118;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.3);
}

/* ── Active CAD Mode Grid & Blueprint Aesthetic ──────────────────────── */
html.cad-mode-active {
  --cad-accent: #FF6600;
  --cad-grid-major: rgba(255, 102, 0, 0.14);
  --cad-grid-minor: rgba(255, 102, 0, 0.05);
}

html.cad-mode-active body {
  background-image: 
    linear-gradient(var(--cad-grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--cad-grid-major) 1px, transparent 1px),
    linear-gradient(var(--cad-grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--cad-grid-minor) 1px, transparent 1px) !important;
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px !important;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px !important;
}

/* ── Technical Corner Tick Marks & Dimension Overlays ────────────────── */
html.cad-mode-active .wheel-card,
html.cad-mode-active .proof-shot,
html.cad-mode-active .stage {
  position: relative;
}

html.cad-mode-active .wheel-card::before,
html.cad-mode-active .wheel-card::after {
  content: '+';
  position: absolute;
  font-family: var(--f-mono, monospace);
  font-size: 13px;
  line-height: 1;
  color: #FF6600;
  font-weight: 700;
  z-index: 10;
  pointer-events: none;
}

html.cad-mode-active .wheel-card::before {
  top: 4px;
  left: 5px;
}

html.cad-mode-active .wheel-card::after {
  bottom: 4px;
  right: 5px;
}

/* Dimension indicator tag */
.cad-dim-tag {
  display: none;
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #111118;
  color: #FF6600;
  border: 1px solid #FF6600;
  font-family: var(--f-mono, monospace);
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
}

html.cad-mode-active .cad-dim-tag {
  display: block;
}

/* ── Interactive Measuring Tape Canvas Overlay ───────────────────────── */
#cad-measure-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99998;
  display: none;
}

html.cad-mode-active #cad-measure-canvas {
  display: block;
}

/* ── Floating CAD Mode Status Banner ─────────────────────────────────── */
.cad-floating-hud {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #111118;
  color: #FFFFFF;
  border: 1px solid #FF6600;
  border-radius: 4px;
  padding: 5px 14px;
  font-family: var(--f-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 102, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

html.cad-mode-active .cad-floating-hud {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cad-floating-hud .accent {
  color: #FF6600;
  font-weight: 700;
}
