/* Чат «Шинка» — строка вопроса внизу по центру, окно над ней. Цвета — из переменных сайта (style.css). */
.shk { --shk-bg: rgba(27, 30, 36, .96); --shk-line: var(--line-strong, #343842);
  --shk-accent: var(--signal, #2fd3ff); position: fixed; left: 50%; bottom: 16px; z-index: 60;
  transform: translateX(-50%); width: min(680px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px;
  font: 15px/1.5 var(--font, system-ui, sans-serif); color: var(--text, #ecedef); }
.has-shk body { padding-bottom: 84px; }
.shk button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.shk__ava { display: block; flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.shk__ava img { display: block; width: 100%; height: 100%; }

/* Строка вопроса */
.shk__bar { display: flex; align-items: flex-end; gap: 10px; padding: 8px; background: var(--shk-bg);
  border: 1px solid var(--shk-line); border-radius: 26px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  backdrop-filter: blur(12px); transition: border-color .2s; }
.shk__bar:hover, .shk__bar:focus-within { border-color: rgba(255, 255, 255, .28); }
.shk__input { flex: 1; resize: none; min-height: 36px; max-height: 120px; padding: 6px 2px; border: 0;
  background: none; color: inherit; font: inherit; font-size: 16px; line-height: 24px; }
.shk__input:focus { outline: none; }
.shk__input::placeholder { color: var(--muted, #7d828d); }
.shk__act { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08) !important; color: var(--text-2, #b3b7c0) !important; transition: background .15s; }
.shk__act:hover { background: rgba(255, 255, 255, .16) !important; color: var(--text, #ecedef) !important; }
.shk__act--send { background: var(--text, #ecedef) !important; color: #0c0d10 !important; }
.shk__act--send:hover { background: #fff !important; color: #0c0d10 !important; }
.shk__act:disabled { opacity: .4; cursor: default; }

/* Свёрнуто — одна аватарка внизу по центру */
.shk__mini { display: none; align-self: center; padding: 4px; border-radius: 50%; background: var(--shk-bg) !important;
  border: 1px solid var(--shk-line) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: transform .15s; }
.shk__mini .shk__ava { width: 32px; height: 32px; box-shadow: none; background: transparent; }
.shk__mini:hover { transform: translateY(-2px); }
.shk--mini { left: auto; right: 20px; transform: none; width: 56px; }
.shk--mini .shk__bar, .shk--mini .shk__panel { display: none !important; }
.shk--mini .shk__mini { display: grid; place-items: center; }

/* Окно диалога */
.shk__panel { display: none; flex-direction: column; max-height: min(560px, calc(100dvh - 110px));
  background: var(--shk-bg); border: 1px solid var(--shk-line); border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55); backdrop-filter: blur(12px); overflow: hidden; }
.shk--open .shk__panel { display: flex; animation: shk-in .2s var(--ease, ease); }
@keyframes shk-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .shk--open .shk__panel { animation: none; } }
.shk__head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 4px 20px; }
.shk__name { flex: 1; font: 700 18px/1.2 var(--font-head, inherit); }
.shk__x { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-2, #b3b7c0); }
.shk__x:hover { background: rgba(255, 255, 255, .08); color: var(--text, #ecedef); }
.shk__body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 12px;
  overscroll-behavior: contain; scrollbar-width: thin; }
.shk__intro { margin: 0 0 6px; color: var(--text, #ecedef); }
.shk__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.shk__chip { padding: 10px 18px; border: 1px solid rgba(255, 255, 255, .08) !important; border-radius: 999px;
  font-size: 15px !important; text-align: left; background: rgba(255, 255, 255, .05) !important; transition: background .15s; }
.shk__chip:hover { background: rgba(255, 255, 255, .12) !important; }
.shk__msg { max-width: 88%; padding: 9px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.shk__msg--me { align-self: flex-end; background: rgba(255, 255, 255, .12); border-bottom-right-radius: 4px; }
.shk__msg--bot { align-self: flex-start; padding-left: 0; padding-right: 0; max-width: 100%; }
.shk__msg--bot a { color: var(--shk-accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.shk__msg--err { color: var(--amber, #ffb547); }
.shk__dots { display: inline-flex; gap: 4px; }
.shk__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted, #7d828d);
  animation: shk-dot 1s infinite ease-in-out; }
.shk__dots i:nth-child(2) { animation-delay: .15s; }
.shk__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes shk-dot { 50% { opacity: .3; transform: translateY(-3px); } }
.shk__note { padding: 0 20px 12px; font-size: 11px; color: var(--muted, #7d828d); }

@media (max-width: 600px) {
  .shk { bottom: 10px; width: calc(100vw - 20px); }
  .shk--mini { left: auto; right: 20px; transform: none; width: 56px; }
  .shk__panel { max-height: calc(100dvh - 90px); }
  .shk__chip { font-size: 14px !important; padding: 8px 14px; }
}

.shk__mini { box-sizing: border-box; width: 56px; height: 56px; }
.shk__ava img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 600px) { .shk--mini { right: 10px; width: 56px; } }

.shk__mini { padding: 0; line-height: 0; }
.shk__mini .shk__ava img { margin: 0; padding: 0; border: 0; object-position: center; }

/* Approved animated avatar, same dimensions as the static logo. */
.shk__ava { position: relative; }
.shk__ava-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: contain; pointer-events: none; opacity: 0; }
.shk__ava--playing .shk__ava-video { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .shk__ava-video { display: none; } }
