/* «Волков.Подмостки» — ИИ-помощник: кнопка-аватар в углу и подсказка.
   Характер: тёплый тёмный «закулисный» блок с оранжевой рампой из логотипа; живые, но короткие движения. */
.ai-dock { position: fixed; right: 20px; bottom: 20px; z-index: 96; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.ai-dock > * { pointer-events: auto; }

/* Аватар: дуги логотипа и глаза; глаза моргают */
.ai-ava { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: radial-gradient(120% 120% at 30% 20%, #ff9a2e 0%, #ef7d00 45%, #b84d00 100%); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.25); }
.ai-ava svg { width: 30px; height: 30px; }
.ai-ava .arc { fill: none; stroke: #0a0a0a; stroke-width: 2.6; stroke-linecap: round; }
.ai-ava .arc2 { opacity: 0.55; }
.ai-ava .eye { fill: #0a0a0a; transform-box: fill-box; transform-origin: center; animation: ai-blink 5.5s infinite; }
@keyframes ai-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }

.ai-fab {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 6px 20px 6px 6px; border-radius: var(--r-pill);
  background: #0f0f11; color: #fff; font: inherit; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); cursor: pointer;
  transition: transform 150ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.ai-fab:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .ai-fab:hover { border-color: rgba(239, 125, 0, 0.55); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(239, 125, 0, 0.12); }
  .ai-fab:hover .ai-ava { animation: ai-wiggle 600ms var(--ease-out); }
}
@keyframes ai-wiggle { 30% { transform: rotate(-10deg); } 60% { transform: rotate(8deg); } 100% { transform: none; } }
/* Точка «на связи» — мягко пульсирует, пока чат не открывали */
.ai-ping { position: absolute; top: 4px; left: 36px; width: 11px; height: 11px; border-radius: 50%; background: #62ff00; border: 2px solid #0f0f11; }
.ai-ping::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #62ff00; animation: ai-ping 2.2s var(--ease-out) infinite; }
@keyframes ai-ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.4); opacity: 0; } }
.ai-dock.is-seen .ai-ping::after { animation: none; opacity: 0; }

/* Подсказка: белая «реплика» с хвостиком к кнопке, вопросы выезжают по очереди */
.ai-teaser {
  position: relative; width: 292px; padding: 16px 16px 14px; border-radius: 22px 22px 6px 22px;
  background: #fff; color: #0a0a0a; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
  opacity: 0; transform: translateY(10px) scale(0.96); transform-origin: bottom right; visibility: hidden;
  transition: opacity 240ms var(--ease-out), transform 320ms var(--ease-spring), visibility 0s linear 240ms;
}
.ai-teaser.is-shown { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.ai-teaser-hi { font-size: 1rem; line-height: 1.35; padding-right: 28px; letter-spacing: -0.01em; }
.ai-teaser-hi b { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2px; }
.ai-teaser-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: rgba(10, 10, 10, 0.45); background: none; border: 0; cursor: pointer; }
.ai-teaser-x:hover { color: #0a0a0a; background: rgba(10, 10, 10, 0.06); }
.ai-chips, .ai-suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ai-chips { margin-top: 12px; }
.ai-chip {
  max-width: 100%; text-align: left; padding: 9px 14px; border-radius: 16px 16px 16px 6px; font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.3;
  background: #f2f2f3; color: #0a0a0a; border: 1px solid transparent; cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.ai-chip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .ai-chip:hover { background: var(--c-orange); color: #0a0a0a; } }
.ai-teaser.is-shown .ai-chip { animation: ai-chip-in 360ms var(--ease-spring) both; animation-delay: calc(140ms + var(--i, 0) * 70ms); }
@keyframes ai-chip-in { from { opacity: 0; transform: translateY(6px); } }
html.ai-lock { overflow: hidden; }
body:has(.cookie-note.is-shown) .ai-dock { bottom: 84px; }
@media (prefers-reduced-motion: reduce) {
  .ai-ava .eye, .ai-ping::after, .ai-teaser.is-shown .ai-chip { animation: none; }
  .ai-teaser { transform: none; }
}
