/* Робокот Ват на странице кейса. Цвета Вата и брендбука, без теней на самом Вате. */

/* ---------- Кнопка в углу и окно ---------- */
.vc-dock { position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: var(--body); }
.vc-launch { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0; background: var(--depth); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(17, 28, 35, .22); }
.vc-launch-ava { width: 48px; height: 48px; display: block; } /* от 48 px по брендбуку обычный рисунок: глаза небольшие, есть усы и рот */
.vc-launch:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.vc-panel { width: min(380px, calc(100vw - 40px)); max-height: min(560px, calc(100vh - 140px)); display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 56px rgba(17, 28, 35, .18); }
.vc-head { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; background: var(--depth); color: var(--depth-text); }
.vc-head-ava { width: 44px; height: 44px; flex: none; }
.vc-head-name { display: block; font: 500 17px/1.2 var(--head); }
.vc-head-sub { display: block; font-size: 12px; line-height: 1.4; color: var(--depth-muted); }
.vc-close { margin-left: auto; width: 44px; height: 44px; border: 0; background: none; color: var(--depth-text); font-size: 24px; cursor: pointer; }
.vc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; min-height: 120px; }
.vc-msg { max-width: 90%; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--white); border: 1px solid var(--line);
  font-size: 15px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.vc-msg.is-user { align-self: flex-end; background: var(--mist); border-color: var(--mist); border-radius: 14px 4px 14px 14px; }
.vc-msg-btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; padding: 0 16px; border-radius: 2px; background: var(--depth);
  color: var(--depth-text) !important; text-decoration: none; font: 500 15px/1 var(--body); white-space: nowrap; }
.vc-cases { display: grid; gap: 8px; margin-top: 10px; white-space: normal; }
.vc-cases a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink) !important; text-decoration: none; font-size: 14px; line-height: 1.4; }
.vc-cases a:hover { border-color: var(--ink); }
.vc-actions { display: grid; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--white); }
.vc-actions button { min-height: 44px; padding: 8px 14px; text-align: left; border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  color: var(--ink); font: 500 14px/1.35 var(--body); cursor: pointer; }
.vc-actions button:hover { border-color: var(--ink); }
@media (max-width: 760px) {
  .vc-dock { right: 16px; bottom: 16px; }
  .vc-panel { max-height: calc(100vh - 120px); }
}

/* ---------- Подсказка «Покорми Вата»: на компьютере ровно напротив клубка, на телефоне под описанием ---------- */
.vc-hero-note { display: inline-flex; align-items: center; gap: 8px; margin: 24px 0 0; padding: 4px 12px 4px 4px; border-radius: 44px;
  background: var(--depth); color: var(--depth-text); font-size: 13px; line-height: 1.3; }
.vc-hero-note b { font-weight: 500; }
.vc-hero-ava { width: 26px; height: 26px; flex: none; display: block; }
.vc-hero-note.is-by-ball { position: absolute; left: 60px; margin: 0; z-index: 2; white-space: nowrap; }

/* ---------- Ват выглядывает из-за окна «Что умеет бот»: окно на месте, Ват выезжает из-за верхнего края ---------- */
.vc-peek-host { position: relative; min-width: 0; }
.vc-peek-host > .kc-marked { position: relative; z-index: 1; }
/* глава тёмная, поэтому белый Ват виден без плашки */
.vc-peek { position: absolute; z-index: 0; right: 12%; top: 0; width: 120px; height: 120px; padding: 0; border: 0; cursor: pointer;
  background: none; transform: translateY(8px); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.vc-peek-cat { display: block; width: 100%; height: 100%; pointer-events: none; }
.vc-peek.is-ears { transform: translateY(-66px); }   /* сразу виден лоб, уши и глаза */
.vc-peek.is-eyes { transform: translateY(-92px); }   /* почти вся голова, рот и подбородок за окном */
.vc-peek:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .vc-peek { transition: none; } }
@media (max-width: 760px) { .vc-peek { width: 90px; height: 90px; right: 10%; } .vc-peek.is-ears { transform: translateY(-50px); } .vc-peek.is-eyes { transform: translateY(-69px); } }

/* кружок Вата на тёмном фоне становится белым, Ват в нём серо-стальной, чтобы читался */
.vc-launch { transition: background-color .25s; }
.vc-launch.is-on-dark { background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.vc-launch .vc-launch-ava + .vc-launch-ava, .vc-launch.is-on-dark .vc-launch-ava:first-child { display: none; }
.vc-launch.is-on-dark .vc-launch-ava + .vc-launch-ava { display: block; }

/* ответы Вата: абзацы с пустой строкой между ними, выравнивание по ширине */
.vc-msg.is-vat { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.vc-log:empty { display: none; }

/* ---------- Кабель: клубок вверху слева, провод и вилка ползут вниз ---------- */
.vc-cable { position: fixed; inset: 0; z-index: 40; pointer-events: none; transition: opacity .3s; }
.vc-wire { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.vc-ball { position: absolute; left: 18px; top: 84px; width: 32px; height: 32px; transition: transform .2s linear; }
.vc-plug { position: absolute; left: 0; top: 0; width: 18px; height: 30px; }
.vc-plug svg { display: block; width: 100%; height: 100%; }
.vc-cable.is-gone { opacity: 0; }
@media (max-width: 950px) { .vc-cable { display: none; } }

/* ---------- Финал: Ват слева, к хвосту подключается кабель, вокруг мигают молнии ---------- */
.kc-final-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: center; }
.vc-final { position: relative; width: 260px; }
.vc-final-cat { width: 260px; height: 260px; }
.vc-final-cat .vat-tail { animation: none; } /* хвост не качается, чтобы вилка сидела ровно */
.vc-final-cat .vv-tail { animation: none; }
.vc-final-say span { display: block; }
.vc-final-say { min-height: 3em; margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--depth-text); text-align: center; }
.vc-final-bolts { position: absolute; left: 0; top: 0; width: 260px; height: 260px; pointer-events: none; }
.vc-bolt { position: absolute; width: 30px; height: 42px; opacity: 0; }
.vc-bolt svg { display: block; width: 100%; height: 100%; }
.vc-bolt-0 { left: 6%;  top: 8%;  transform: rotate(-18deg); }
.vc-bolt-1 { left: 44%; top: -4%; }
.vc-bolt-2 { left: 82%; top: 10%; transform: rotate(16deg); }
.vc-bolt-3 { left: 90%; top: 46%; transform: rotate(24deg); }
.vc-bolt-4 { left: 76%; top: 82%; transform: rotate(-10deg); }
.vc-bolt-5 { left: 2%;  top: 70%; transform: rotate(14deg); }
.vc-bolt-6 { left: 24%; top: 34%; transform: rotate(-26deg) scale(.8); }
.vc-final.is-charging .vc-bolt { animation: vc-flash .45s steps(2, jump-none) infinite; }
.vc-final.is-charging .vc-bolt:nth-child(2n) { animation-delay: .22s; }
.vc-final.is-charging .vc-bolt:nth-child(3n) { animation-duration: .6s; }
.vc-final.is-charged .vc-bolt { opacity: 0; transition: opacity .6s; }
@keyframes vc-flash { 0% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vc-final.is-charging .vc-bolt { animation: none; opacity: 1; } }
@media (max-width: 950px) {
  .kc-final-grid { grid-template-columns: 1fr; gap: 24px; }
  .vc-final, .vc-final-cat, .vc-final-bolts { width: 180px; }
  .vc-final-cat, .vc-final-bolts { height: 180px; }
}

/* скрытые элементы Вата не показываем, даже если у них задан display */
.vc-dock [hidden], .vc-panel[hidden] { display: none !important; }
@media (max-width: 760px) { .kc-final { padding-bottom: calc(var(--space-section) + 72px); } }

/* Кружок Вата изредка мягко пульсирует: напоминает, что его можно нажать.
   Цикл 10 секунд, сам «вдох» занимает около секунды; пока окно открыто или включено «меньше движения», не пульсирует */
.vc-launch::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(17, 28, 35, .28); animation: vc-ring 10s 4s infinite ease-out; }
.vc-launch.is-on-dark::after { box-shadow: 0 0 0 0 rgba(238, 242, 243, .4); animation-name: vc-ring-light; }
.vc-launch { animation: vc-breath 10s 4s infinite ease-in-out; }
.vc-launch[aria-expanded="true"], .vc-launch[aria-expanded="true"]::after { animation: none; }
@keyframes vc-breath { 0%, 11%, 100% { transform: scale(1); } 5.5% { transform: scale(1.06); } }
@keyframes vc-ring { 0% { box-shadow: 0 0 0 0 rgba(17, 28, 35, .28); } 12% { box-shadow: 0 0 0 14px rgba(17, 28, 35, 0); } 100% { box-shadow: 0 0 0 14px rgba(17, 28, 35, 0); } }
@keyframes vc-ring-light { 0% { box-shadow: 0 0 0 0 rgba(238, 242, 243, .4); } 12% { box-shadow: 0 0 0 14px rgba(238, 242, 243, 0); } 100% { box-shadow: 0 0 0 14px rgba(238, 242, 243, 0); } }
@media (prefers-reduced-motion: reduce) { .vc-launch, .vc-launch::after { animation: none; } }
.vc-peek.is-left { right: auto; left: 12%; }
.vc-peek.is-run { animation: vc-run 1.25s cubic-bezier(.3,.6,.3,1) both; }
.vc-peek.is-left.is-run { animation-name: vc-run-left; }
.vc-peek.is-run .vc-peek-cat { animation: vc-hop .26s infinite ease-in-out; }
@keyframes vc-run { from { transform: translate(180px, -58px); } to { transform: translate(0, -58px); } }
@keyframes vc-run-left { from { transform: translate(-180px, -58px); } to { transform: translate(0, -58px); } }
@keyframes vc-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.vc-peek-say { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px); white-space: nowrap; padding: 7px 11px; border-radius: 12px 12px 12px 4px; background: var(--paper, #f6f7f7); color: var(--ink, #20282c); font-size: 13px; line-height: 1.3; box-shadow: 0 10px 26px -12px rgba(17, 28, 35, .55); opacity: 0; transition: opacity .3s; pointer-events: none; }
.vc-peek.is-say .vc-peek-say { opacity: 1; }
@media (max-width: 760px) { .vc-peek.is-left { left: 10%; } .vc-peek-say { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .vc-peek.is-run, .vc-peek.is-run .vc-peek-cat { animation: none; } }
