
/* ==========================================
   AI AGENT CURSOR & COMPONENT INSPECTOR
   FILE: css/agent-cursor.css
========================================== */

.ai-inspector {
  position: absolute;
  z-index: 18;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-sizing: border-box;

  border: 1px dashed #e63946;
  background: rgba(230, 57, 70, 0.025);

  box-shadow:
    0 0 0 1px rgba(230, 57, 70, 0.12),
    0 0 24px rgba(230, 57, 70, 0.08);

  will-change: transform, opacity;
}

.ai-inspector::before,
.ai-inspector::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: #e63946;
  border: 1px solid #101010;
}

.ai-inspector::before {
  top: -4px;
  left: -4px;
}

.ai-inspector::after {
  bottom: -4px;
  right: -4px;
}

.ai-inspector-label {
  position: absolute;
  top: -25px;
  left: 0;

  max-width: 230px;
  padding: 5px 9px;

  background: #e63946;
  color: #fff;

  font: 700 9px/1.2 Consolas, monospace;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.ai-build-cursor {
  position: absolute;
  z-index: 19;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  width: 20px;
  height: 24px;
  will-change: transform, opacity;
}

.ai-build-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.65));
}

.ai-build-cursor-tag {
  position: absolute;
  left: 17px;
  top: 19px;
  padding: 5px 8px;

  background: #e63946;
  color: white;

  font: 700 9px Consolas, monospace;
  white-space: nowrap;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .ai-inspector-label {
    font-size: 8px;
    max-width: 160px;
  }

  .ai-build-cursor-tag {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-inspector,
  .ai-build-cursor {
    display: none !important;
  }
}

/* ==========================================
   STEP 8.5 — AI CONSTRUCTION INTERACTIONS
========================================== */

.ai-build-cursor {
  transform-origin: 2px 2px;
}

.ai-cursor-click-ring {
  position: absolute;
  left: -14px;
  top: -14px;
  width: 30px;
  height: 30px;
  border: 1.5px solid #e63946;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.12);
  opacity: 0;
  transform: scale(0.35);
  pointer-events: none;
}

.ai-cursor-click-dot {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  background: #e63946;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.ai-inspector {
  transition: background-color 0.2s ease;
}

.ai-inspector.is-constructing {
  background: rgba(230, 57, 70, 0.055);
}

.ai-inspector.is-constructing::before,
.ai-inspector.is-constructing::after {
  box-shadow: 0 0 10px rgba(230, 57, 70, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .ai-cursor-click-ring,
  .ai-cursor-click-dot {
    display: none;
  }
}

/* ==========================================
   AI CURSOR v1.3 — LIVE TYPING
========================================== */

.ai-inspector {
  transition: none;
}

.ai-inspector-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-build-cursor {
  transform-origin: 2px 2px;
  will-change: transform, opacity;
}

/* Active typing text selection */
.ai-inspector.is-constructing {
  border-color: #e63946;
  background: rgba(230, 57, 70, 0.045);
}

/* Make text selection more subtle */
.ai-inspector:has(+ .ai-build-cursor) {
  box-sizing: border-box;
}

@media (max-width: 768px) {

  .ai-inspector-label {
    font-size: 8px !important;
    padding: 4px 6px !important;
  }

}

/* ==========================================
   AI CURSOR — PORTFOLIO SECTIONS
   Reuses the exact hero cursor appearance.
========================================== */

.section-ai-inspector {
  position: fixed !important;
  top: 0;
  left: 0;
  z-index: 99990 !important;
  pointer-events: none;
  box-sizing: border-box;
}

.section-ai-cursor {
  position: fixed !important;
  top: 0;
  left: 0;
  z-index: 99991 !important;
  pointer-events: none;
  width: 20px;
  height: 24px;
}

.section-ai-inspector .ai-inspector-label {
  position: absolute;
  top: -25px;
  left: 0;
  z-index: 2;
}

.section-ai-cursor .ai-build-cursor-tag {
  left: 17px;
  top: 19px;
}

@media (max-width: 900px) {
  .section-ai-inspector,
  .section-ai-cursor {
    display: none !important;
  }
}
