/* ═══════════════════════════════════════════════════════════
   Pixel Art Office — Canvas + Overlay Styles
   F7R Station theme — full viewport on landing
   ═══════════════════════════════════════════════════════════ */

/* ── Canvas Container — fills entire hero section ──────────── */

.office-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  cursor: default;
}

.office-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  /* JS will set width/height to fill while maintaining aspect ratio */
}

/* ── Status Bubbles (CSS overlays positioned by JS) ────────── */

.office-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 0.3rem 0.6rem;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s;
}

.bubble::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--border);
}

.bubble .agent-name {
  font-weight: 600;
  color: var(--text);
  display: block;
  text-align: center;
  margin-bottom: 0.1rem;
}

.bubble .agent-action {
  display: block;
  text-align: center;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bubble.working { border-color: var(--accent); box-shadow: 0 0 6px var(--accent-dim); }
.bubble.thinking { border-color: var(--nix); }

/* ── Speech Bubbles (for interactions) ─────────────────────── */

.speech-bubble {
  position: absolute;
  transform: translate(-50%, -130%);
  padding: 0.4rem 0.75rem;
  background: #0a0a0a;
  border: 1px solid var(--accent);
  border-radius: 3px;
  font-size: 0.7rem;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  animation: speechIn 0.3s ease forwards;
  pointer-events: none;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--accent);
}

@keyframes speechIn {
  from { opacity: 0; transform: translate(-50%, -120%); }
  to { opacity: 1; transform: translate(-50%, -130%); }
}

@keyframes speechOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ── Click Highlight ───────────────────────────────────────── */

.office-highlight {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.office-highlight.active {
  opacity: 1;
  animation: highlightPulse 1s ease-in-out infinite;
}

@keyframes highlightPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 170, 85, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(34, 170, 85, 0.1); }
}

/* ── Loading State ─────────────────────────────────────────── */

.office-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 10;
}

.office-loading-text {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  text-shadow: 0 0 4px var(--accent-dim);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Mobile ────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .bubble {
    font-size: 0.55rem;
    padding: 0.2rem 0.4rem;
  }
}
