/* AAXAX cognition mark — animated thinking icon (web + desktop) */

.aaxax-think-mark {
  --ax-size: 36px;
  position: relative;
  width: var(--ax-size);
  height: var(--ax-size);
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  isolation: isolate;
}

.aaxax-think-mark::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 229, 255, 0.35) 0%,
    rgba(61, 255, 181, 0.12) 42%,
    transparent 70%
  );
  animation: ax-think-halo 2.4s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.aaxax-think-mark .ax-geo,
.aaxax-think-mark img.ax-geo,
.aaxax-think-mark svg.ax-geo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  filter:
    drop-shadow(0 0 6px rgba(0, 229, 255, 0.55))
    drop-shadow(0 0 14px rgba(0, 229, 255, 0.25));
}

/* PNG brand geometry: invert+tint to AAXAX cyan on dark */
.aaxax-think-mark img.ax-geo {
  background: #05070b;
  animation: ax-think-spin 12s linear infinite;
  mix-blend-mode: screen;
  filter:
    brightness(1.15)
    contrast(1.15)
    drop-shadow(0 0 8px rgba(0, 229, 255, 0.65))
    drop-shadow(0 0 18px rgba(61, 255, 181, 0.28));
}

.aaxax-think-mark svg.ax-geo {
  animation: ax-think-spin 14s linear infinite;
}

.aaxax-think-mark svg.ax-geo .ax-petals {
  transform-origin: 50px 50px;
  animation: ax-think-spin-rev 22s linear infinite;
}
.aaxax-think-mark svg.ax-geo .ax-flower {
  transform-origin: 50px 50px;
  animation: ax-think-spin 18s linear infinite;
}
.aaxax-think-mark svg.ax-geo .ax-web {
  transform-origin: 50px 50px;
  animation: ax-think-spin-rev 10s linear infinite;
}
.aaxax-think-mark svg.ax-geo .ax-cross {
  transform-origin: 50px 50px;
  animation: ax-think-pulse-opacity 1.6s ease-in-out infinite;
}
.aaxax-think-mark svg.ax-geo .ax-core {
  transform-origin: 50px 50px;
  animation: ax-think-core 1.4s ease-in-out infinite;
}
.aaxax-think-mark svg.ax-geo .ax-glow {
  transform-origin: 50px 50px;
  animation: ax-think-glow 2.2s ease-in-out infinite;
}

.aaxax-think-mark.is-sm { --ax-size: 22px; }
.aaxax-think-mark.is-md { --ax-size: 32px; }
.aaxax-think-mark.is-lg { --ax-size: 44px; }

/* Done / sealed — stop motion */
.aaxax-think-mark.is-done,
.agent-activity-done .aaxax-think-mark,
.agent-activity-done .cursor-process-spinner.aaxax-think-mark {
  animation: none;
}
.aaxax-think-mark.is-done::before,
.agent-activity-done .aaxax-think-mark::before {
  animation: none;
  opacity: 0.35;
}
.aaxax-think-mark.is-done .ax-geo,
.agent-activity-done .aaxax-think-mark .ax-geo,
.agent-activity-done .aaxax-think-mark img.ax-geo,
.agent-activity-done .aaxax-think-mark svg.ax-geo,
.agent-activity-done .aaxax-think-mark svg.ax-geo .ax-petals,
.agent-activity-done .aaxax-think-mark svg.ax-geo .ax-flower,
.agent-activity-done .aaxax-think-mark svg.ax-geo .ax-web,
.agent-activity-done .aaxax-think-mark svg.ax-geo .ax-cross,
.agent-activity-done .aaxax-think-mark svg.ax-geo .ax-core,
.agent-activity-done .aaxax-think-mark svg.ax-geo .ax-glow {
  animation: none !important;
  filter: drop-shadow(0 0 4px rgba(61, 255, 181, 0.35));
}

@keyframes ax-think-spin {
  to { transform: rotate(360deg); }
}
@keyframes ax-think-spin-rev {
  to { transform: rotate(-360deg); }
}
@keyframes ax-think-halo {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.12); opacity: 1; }
}
@keyframes ax-think-core {
  0%, 100% { transform: scale(0.92); opacity: 0.85; }
  50% { transform: scale(1.18); opacity: 1; }
}
@keyframes ax-think-glow {
  0%, 100% { opacity: 0.22; transform: scale(0.96); }
  50% { opacity: 0.5; transform: scale(1.08); }
}
@keyframes ax-think-pulse-opacity {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Public chat think row */
.think-pulse {
  display: flex;
  align-items: center;
  gap: 12px;
}
.think-pulse .aaxax-think-mark {
  --ax-size: 40px;
}
.think-pulse .think-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

/* Desktop activity head: replace tiny spinner */
.cursor-process-head .aaxax-think-mark,
.cursor-process-spinner.aaxax-think-mark {
  width: var(--ax-size, 28px);
  height: var(--ax-size, 28px);
  border: 0;
  background: transparent;
  animation: none; /* spin lives on .ax-geo */
}
.cursor-process-head .aaxax-think-mark {
  --ax-size: 28px;
}

/* Inline body thinking dots → brand mark */
.body.thinking.aaxax-thinking-body {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}
.body.thinking.aaxax-thinking-body > i {
  display: none;
}
.think-inline-label {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.78rem;
  color: var(--cyan, #00e5ff);
  letter-spacing: 0.04em;
  opacity: 0.9;
  animation: ax-think-pulse-opacity 1.4s ease-in-out infinite;
}

/* Generation head in public chat */
.gen-head .aaxax-think-mark {
  --ax-size: 28px;
}
