/* Bundle: chat-widget - generated from site.css */
/* ===================== FREE: CHAT ===================== */
.free-chat {
  padding: 56px;
}
.free-chat__screen {
  margin: 0 auto;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(20, 24, 26, .06);
  box-shadow: 0 24px 56px -36px rgba(20, 24, 26, .22);
  overflow: hidden;
}
.free-chat__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: start;
}
.free-chat__info {
  display: flex;
  flex-direction: column;
  padding: 40px;
  background: linear-gradient(180deg, #fff 0%, #f8faf8 100%);
}
.free-chat__info h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  max-width: 520px;
}
.free-chat__lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 500px;
  margin-bottom: 22px;
}
.free-chat__benefits {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.free-chat__benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
.free-chat__benefit-ico {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-700);
  display: grid;
  place-items: center;
}
.free-chat__benefit-ico [data-lucide] { width: 20px; height: 20px; }
.free-chat__visual {
  position: relative;
  margin: 24px -40px -40px;
  min-height: 280px;
}
/* Колонки у .free-chat__layout выровнены по верху (align-items: start), и на ширинах, где
   правая панель выше левой колонки, под фото оставался белый хвост в 25–40 px: кадр упирался
   в свою min-height, а карточку тянула панель. Левую колонку растягиваем на всю высоту строки,
   а кадр забирает остаток — низ фото всегда совпадает с нижней границей карточки. */
.free-chat__info { align-self: stretch; }
.free-chat__visual { flex: 1 1 auto; }
/* Только фоновое фото блока — прямой ребёнок. Раньше правило ловило и аватарки в кружках
   внутри блока: min-height: 280px растягивал их, и в кружок 38px попадала узкая полоска лица. */
.free-chat__visual > picture,
.free-chat__visual > picture > img,
.free-chat__visual > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center;
}
.free-chat__social {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(31, 107, 54, .12);
  box-shadow: 0 12px 28px -18px rgba(20, 24, 26, .28);
}
.free-chat__social-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
}
.free-chat__social-text strong {
  color: var(--ink);
  font-weight: 800;
}
.free-chat__social-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-700);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.free-chat__social-ico [data-lucide] { width: 18px; height: 18px; }
.free-chat__avatars {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.free-chat__avatars .av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px -4px rgba(20, 24, 26, .25);
}
.free-chat__avatars .av + .av { margin-left: -10px; }
.free-chat__avatars .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.free-chat__panel {
  padding: 0;
  border-left: 1px solid rgba(20, 24, 26, .06);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: min(760px, calc(100vh - 120px));
  background: #fff;
}
.free-chat__panel-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  max-height: min(640px, calc(100vh - 220px));
  padding: 28px 28px 20px;
}
.free-chat__footer {
  flex-shrink: 0;
  padding: 20px 28px 28px;
  border-top: 1px solid rgba(20, 24, 26, .06);
  background: #fff;
}
.free-chat__panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.free-chat__panel-ico {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  box-shadow: 0 10px 24px -16px rgba(31, 107, 54, .55);
}
.free-chat__panel-ico [data-lucide],
.free-chat__panel-ico svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  color: #fff;
  stroke: #fff;
  fill: none;
  stroke-width: 2.1;
  margin: 0;
  display: block;
  flex: 0 0 auto;
  transform: translate(-50%, -50%);
}
.free-chat__panel-head strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ink);
}
.free-chat__panel-head span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.free-chat__assistants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.free-chat__assistant {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  text-align: left;
  font: inherit;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.free-chat__assistant:hover {
  border-color: rgba(31, 107, 54, .22);
}
.free-chat__assistant.is-active {
  border-color: var(--green-600);
  background: var(--green-50);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(31, 107, 54, .08);
}
.free-chat__assistant-ico {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f4f6f5;
  color: var(--green-700);
  display: grid;
  place-items: center;
}
.free-chat__assistant.is-active .free-chat__assistant-ico {
  background: #fff;
}
.free-chat__assistant-ico [data-lucide] { width: 18px; height: 18px; }
.free-chat__section { margin-bottom: 16px; }
.free-chat__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.free-chat__section-title [data-lucide] {
  width: 16px;
  height: 16px;
  color: var(--green-700);
}
.free-chat__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.free-chat__tag {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8faf8;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.free-chat__tag:hover {
  border-color: rgba(31, 107, 54, .24);
  background: var(--green-50);
}
.free-chat__tag .green {
  color: var(--green-700);
  font-weight: 600;
}
.free-chat__thread {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 8px;
}
.free-chat__msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}
.free-chat__msg.is-user {
  justify-content: flex-end;
}
.free-chat__msg.is-bot {
  justify-content: flex-start;
}
.free-chat__bot-ava {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.free-chat__bot-ava [data-lucide] { width: 18px; height: 18px; }
.free-chat__msg-body {
  max-width: min(92%, 420px);
  min-width: 0;
}
.free-chat__msg.is-user .free-chat__msg-body {
  margin-left: auto;
}
.free-chat__bubble {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  word-break: break-word;
}
.free-chat__bubble .green {
  color: var(--green-700);
  font-weight: 600;
}
.free-chat__msg.is-user .free-chat__bubble {
  background: #e8f3ea;
  border: 1px solid rgba(31, 107, 54, .12);
  border-bottom-right-radius: 6px;
  color: var(--ink);
}
.free-chat__msg.is-bot .free-chat__bubble {
  background: #f3f5f4;
  border: 1px solid rgba(20, 24, 26, .06);
  border-bottom-left-radius: 6px;
}
.free-chat__bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 52px;
  min-height: 40px;
}
.free-chat__bubble--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: free-chat-typing 1.1s infinite ease-in-out;
}
.free-chat__bubble--typing span:nth-child(2) { animation-delay: .15s; }
.free-chat__bubble--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes free-chat-typing {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.free-chat__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.free-chat__msg.is-bot .free-chat__meta {
  justify-content: flex-start;
}
.free-chat__read {
  display: inline-flex;
  color: var(--green-600);
}
.free-chat__read [data-lucide] {
  width: 14px;
  height: 14px;
}
.free-chat__contact-inline {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f8faf8;
  border: 1px solid rgba(31, 107, 54, .12);
}
.free-chat__contact-inline p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-3);
}
.free-chat__tag .green {
  color: var(--green-700);
  font-weight: 600;
}
.free-chat__thread {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 8px;
}
.free-chat__msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}
.free-chat__msg.is-user {
  justify-content: flex-end;
}
.free-chat__msg.is-bot {
  justify-content: flex-start;
}
.free-chat__bot-ava {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.free-chat__bot-ava [data-lucide] { width: 18px; height: 18px; }
.free-chat__msg-body {
  max-width: min(92%, 420px);
  min-width: 0;
}
.free-chat__msg.is-user .free-chat__msg-body {
  margin-left: auto;
}
.free-chat__bubble {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  word-break: break-word;
}
.free-chat__bubble .green {
  color: var(--green-700);
  font-weight: 600;
}
.free-chat__msg.is-user .free-chat__bubble {
  background: #e8f3ea;
  border: 1px solid rgba(31, 107, 54, .12);
  border-bottom-right-radius: 6px;
  color: var(--ink);
}
.free-chat__msg.is-bot .free-chat__bubble {
  background: #f3f5f4;
  border: 1px solid rgba(20, 24, 26, .06);
  border-bottom-left-radius: 6px;
}
.free-chat__bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 52px;
  min-height: 40px;
}
.free-chat__bubble--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: free-chat-typing 1.1s infinite ease-in-out;
}
.free-chat__bubble--typing span:nth-child(2) { animation-delay: .15s; }
.free-chat__bubble--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes free-chat-typing {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.free-chat__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.free-chat__msg.is-bot .free-chat__meta {
  justify-content: flex-start;
}
.free-chat__read {
  display: inline-flex;
  color: var(--green-600);
}
.free-chat__read [data-lucide] {
  width: 14px;
  height: 14px;
}
.free-chat__contact-inline {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f8faf8;
  border: 1px solid rgba(31, 107, 54, .12);
}
.free-chat__contact-inline p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-3);
}
.free-chat__how-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0 0 12px;
}
.free-chat__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.free-chat__step-arrow { display: none; }
.free-chat__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-3);
}
.free-chat__step b { color: var(--ink); font-weight: 700; }
.free-chat__step-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green-700);
  display: grid;
  place-items: center;
}
.free-chat__step-ico [data-lucide] { width: 16px; height: 16px; }
.free-chat__input-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
}
.free-chat__attach,
.free-chat__send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font: inherit;
}
.free-chat__attach {
  background: transparent;
  color: var(--muted);
}
.free-chat__attach:disabled { opacity: .45; cursor: default; }
.free-chat__attach [data-lucide] { width: 18px; height: 18px; }
.free-chat__input {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.free-chat__input::placeholder { color: var(--muted); }
.free-chat__send {
  background: var(--green-700);
  color: #fff;
}
.free-chat__send:hover:not(:disabled) { background: var(--green-800, #1a5c38); }
.free-chat__send:disabled { opacity: .55; cursor: default; }
.free-chat__send [data-lucide] { width: 18px; height: 18px; }
/* Имя и телефон — друг под другом (в одну строку было тесно), перед кнопкой «Передать специалисту» — отступ (2026-10-22) */
.free-chat__contact-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.free-chat__contact-fields input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.free-chat__contact-fields input:focus {
  border-color: var(--green-600);
  outline: none;
}
.free-chat__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--green-700);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.free-chat__submit:hover:not(:disabled) { background: var(--green-800, #1a5c38); }
.free-chat__submit:disabled { opacity: .7; cursor: default; }
.free-chat__error {
  margin-top: 8px;
  font-size: 13px;
  color: #c0392b;
}
.free-chat__privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.free-chat__privacy [data-lucide] {
  width: 14px;
  height: 14px;
  color: var(--green-700);
  flex-shrink: 0;
}
.free-chat__assistant-ico {
  position: relative;
}
.free-chat__assistant-unread {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e53935;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(229, 57, 53, .35);
}

/* ===================== CHAT FAB (global) ===================== */
.free-chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
}
.free-chat-fab__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 26, .32);
  z-index: 1199;
}
.free-chat-fab__toggle {
  position: relative;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 36px -12px rgba(31, 107, 54, .65);
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.free-chat-fab__toggle:hover {
  background: var(--green-800, #1a5c38);
  transform: translateY(-2px);
}
.free-chat-fab__toggle [data-lucide] { width: 24px; height: 24px; }
.free-chat-fab__toggle-unread {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e53935;
  border: 2px solid #fff;
}
.free-chat-fab__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(420px, calc(100vw - 32px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(20, 24, 26, .08);
  border-radius: 20px;
  box-shadow: 0 24px 60px -24px rgba(20, 24, 26, .35);
  overflow: hidden;
}
.free-chat-fab__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line-2);
}
.free-chat-fab__head strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 2px;
}
.free-chat-fab__head span {
  font-size: 12.5px;
  color: var(--muted);
}
.free-chat-fab__close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--page);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.free-chat-fab__close [data-lucide] { width: 18px; height: 18px; }
.free-chat-fab__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 8px;
}
.free-chat-fab__assistants {
  margin-bottom: 12px;
}
.free-chat-fab__assistants .free-chat__assistant {
  font-size: 12.5px;
  padding: 10px 12px;
}
.free-chat-fab__thread {
  max-height: none;
  margin-bottom: 8px;
}
.free-chat-fab__footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line-2);
  background: #fff;
}
.free-chat-fab__footer .free-chat__input-row {
  margin: 0;
}

/* Ответ нейросети: ссылки на страницы сайта и **жирный** (freeChatRenderAi в site.js) */
.free-chat__bubble a {
  color: var(--green-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.free-chat__bubble strong {
  color: var(--ink);
  font-weight: 600;
}

/* Телефон. При выделении бандла из site.css эти правила не перенесли — блок чата на всех страницах, кроме /besplatno
   (там их подключает besplatno.css), оставался на телефоне в две колонки: заголовок рвался по слогам, панель чата
   сжималась до ~130 px. Найдено снимками 390 px, 2026-10-19. */


/* Кнопка под ответом: вопрос не по теме этого помощника — перейти к нужному (метка [[перейти:id]], site.js) */
.free-chat__handoff {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1.5px solid var(--green-600);
  border-radius: 12px;
  background: #fff;
  color: var(--green-700);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s;
}
.free-chat__handoff:hover { background: var(--green-50); }
