/* ============================================================
   dan-ai — свой курсор (только мышь, только desktop)
   Тонкий нейтральный круг + точка цвета режима.
   Нативный курсор скрывается только когда класс has-cursor на <html>.
   ============================================================ */

html.has-cursor,
html.has-cursor a,
html.has-cursor button,
html.has-cursor [role='button'] {
  cursor: none;
}

/* в тексте и полях ввода — обычный системный курсор */
html.has-cursor input,
html.has-cursor textarea,
html.has-cursor [contenteditable] {
  cursor: text;
}

.dc {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

html.has-cursor .dc.is-on { opacity: 1; }

/* над текстом и полями ввода свой курсор прячется — работает системный */
.dc.is-text { opacity: 0 !important; }

.dc__ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1px solid rgba(41, 41, 41, 0.38);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: width 0.18s ease, height 0.18s ease, margin 0.18s ease, border-color 0.18s ease;
}

.dc__dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--accent-orange);
  transition: background-color 0.6s ease, transform 0.18s ease;
}

/* подпись живёт отдельно от точки и круга — всегда по центру или рядом, не двигается с точкой */
.dc__label {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* ---------- вариант B: круг — знак, подпись рядом как metadata ---------- */
.dc--b .dc__label {
  font-size: 0.7rem;
  transform: translate(20px, 14px);
  padding: 0.18rem 0.4rem;
  border-radius: 3px;
  background: rgba(242, 237, 206, 0.85);
}

.dc--b .dc__label::before { content: '→ '; color: var(--accent-orange); }

.dc--b.is-link .dc__ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-color: rgba(41, 41, 41, 0.3);
}

.dc--b.is-link.has-label .dc__label { opacity: 1; }

/* ссылки AI Mindset — круг в цвете режима */
.dc.is-aim .dc__ring { border-color: rgba(var(--accent-rgb), 0.55); }

/* узел схемы: круг «стыкуется» — центрируется на узле и садится по его размеру */
.dc.is-node .dc__ring {
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-color: var(--accent-orange);
}

.dc.is-node .dc__dot { transform: scale(0); }

/* узел, к которому пристыковался курсор, — тонкая обводка цвета режима */
.flow__node.is-docked .flow__dot {
  border-color: var(--accent-orange) !important;
}

/* узлы схем ловят мышь (для стыковки), но не становятся кнопками */
html.has-cursor .flow__node { cursor: none; }

@media (prefers-reduced-motion: reduce) {
  .dc,
  .dc__ring,
  .dc__dot,
  .dc__label {
    transition: none;
  }
}
