/* ═══════════════════════════════════════════════════════════════════════
   Chat section wrapper (вокруг виджета на странице) — светлая тема
   ═══════════════════════════════════════════════════════════════════════ */
#cx-ai-landing .cx-chat-card {
  background: #fff;
  border: 1px solid var(--cx-border-light);
  border-radius: var(--cx-r-2xl);
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
#cx-ai-landing .cx-chat-top { margin-bottom: 18px; }
#cx-ai-landing .cx-chat-top h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  margin-bottom: 6px;
}
#cx-ai-landing .cx-consent {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  cursor: pointer;
  align-items: flex-start;
}
#cx-ai-landing .cx-consent input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--cx-accent);
}
#cx-ai-landing .cx-consent-text {
  font-size: 13px;
  color: var(--cx-text-muted);
  line-height: 1.5;
}
#cx-ai-landing .cx-consent-text a {
  color: var(--cx-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cx-ai-landing .cx-consent-text a:hover { color: var(--cx-accent-3); }
#cx-ai-landing .cx-consent-error {
  display: none;
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(244, 63, 94, .08);
  border: 1px solid rgba(244, 63, 94, .25);
  border-radius: 10px;
  font-size: 13px;
  color: #c0392b;
}
#cx-ai-landing .cx-consent-error.is-visible { display: block; }

#cx-ai-landing .cx-chat-launch {
  display: block;
  padding: 32px 20px;
  text-align: center;
  background: var(--cx-bg-soft);
  border: 1px dashed var(--cx-border-light-h);
  border-radius: var(--cx-r-xl);
}
#cx-ai-landing .cx-chat-launch.is-hidden { display: none; }
#cx-ai-landing .cx-chat-launch-inner strong {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--cx-text);
  margin-bottom: 6px;
}
#cx-ai-landing .cx-chat-launch-inner p {
  color: var(--cx-text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}
#cx-ai-landing .cx-chat-frame-wrap { display: none; }
#cx-ai-landing .cx-chat-frame-wrap.is-open { display: block; }

/* ═══════════════════════════════════════════════════════════════════════
   Chat widget — Dark Premium
   ═══════════════════════════════════════════════════════════════════════ */

#cx-ai-landing #cx-chat-widget {
  --chat-bg: #ffffff;
  --chat-bg2: #f4f7fb;
  --chat-primary: #6366F1;
  --chat-text: #0F172A;
  --chat-muted: #64748B;
  --chat-border: #e2e8f4;
  --chat-bot-bg: #f0f4fb;
  --chat-user-bg: linear-gradient(135deg, #6366F1, #818CF8);
  --chat-user-text: #fff;

  background: var(--chat-bg);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, .08);
  border: 1px solid var(--chat-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 640px;
  height: 640px;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  color: var(--chat-text);
}

/* Шапка */
#cx-ai-landing .cx-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #050914, #0d2a73);
  color: #fff;
  flex-shrink: 0;
}
/* Кнопка «Закрыть» на десктопе скрыта (показывается только в mobile.css) */
#cx-ai-landing .cx-chat-close-mobile { display: none; }
#cx-ai-landing .cx-chat-header__avatar {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,.10);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 4px;
  overflow: hidden;
}
#cx-ai-landing .cx-chat-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#cx-ai-landing .cx-chat-header__avatar svg {
  width: 22px; height: 22px;
  fill: #71bcff;
}
#cx-ai-landing .cx-chat-header__info { flex: 1; min-width: 0; }
#cx-ai-landing .cx-chat-header__title {
  font-weight: 700; font-size: 15px; line-height: 1.2; color: #fff;
}
#cx-ai-landing .cx-chat-header__sub {
  font-size: 12px; color: rgba(255,255,255,.65); margin-top: 2px;
}
#cx-ai-landing .cx-chat-header__status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #6dffc5;
}
#cx-ai-landing .cx-chat-header__status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6dffc5;
  animation: cxBlink 2s ease-in-out infinite;
}
@keyframes cxBlink {
  0%,100% { opacity: 1; } 50% { opacity: .35; }
}

/* Форма регистрации */
#cx-ai-landing #cx-reg-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
  background: var(--chat-bg2);
}
#cx-ai-landing .cx-reg-title {
  font-size: 18px; font-weight: 700; margin-bottom: 6px;
  color: var(--chat-text);
}
#cx-ai-landing .cx-reg-sub {
  font-size: 13px; color: var(--chat-muted); margin-bottom: 22px;
}
#cx-ai-landing .cx-reg-field {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 14px;
}
#cx-ai-landing .cx-reg-field label {
  font-size: 12px; font-weight: 600;
  color: var(--chat-muted); text-transform: uppercase; letter-spacing: .05em;
}
#cx-ai-landing .cx-reg-field input {
  padding: 11px 14px;
  border: 1.5px solid var(--chat-border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--chat-text);
  background: #fff;
  transition: border-color .2s;
  outline: none;
}
#cx-ai-landing .cx-reg-field input:focus { border-color: var(--chat-primary); }
#cx-ai-landing .cx-reg-field input::placeholder { color: #94A3B8; }
#cx-ai-landing .cx-reg-error {
  color: #d03030; font-size: 13px;
  margin-bottom: 10px; min-height: 18px;
}
#cx-ai-landing .cx-reg-submit {
  margin-top: 4px;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #6366F1, #818CF8);
  color: #fff;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 8px 20px rgba(99,102,241,.30);
  font-family: inherit;
}
#cx-ai-landing .cx-reg-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(99,102,241,.45);
}

/* Интерфейс чата */
#cx-ai-landing #cx-chat-interface {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Бар пользователя */
#cx-ai-landing .cx-chat-user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--chat-bg2);
  border-bottom: 1px solid var(--chat-border);
  font-size: 13px;
  color: var(--chat-muted);
  flex-shrink: 0;
}
#cx-ai-landing .cx-chat-user-bar svg {
  width: 14px; height: 14px;
  fill: var(--chat-muted);
  flex-shrink: 0;
}
#cx-ai-landing #cx-chat-username { font-weight: 600; color: var(--chat-text); }

/* Лента сообщений */
#cx-ai-landing #cx-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  background: #fff;
}
#cx-ai-landing #cx-chat-messages::-webkit-scrollbar { width: 5px; }
#cx-ai-landing #cx-chat-messages::-webkit-scrollbar-track { background: transparent; }
#cx-ai-landing #cx-chat-messages::-webkit-scrollbar-thumb { background: var(--chat-border); border-radius: 4px; }
#cx-ai-landing #cx-chat-messages.cx-drag-over {
  outline: 2px dashed var(--chat-primary);
  outline-offset: -4px;
}

/* Сообщение */
#cx-ai-landing .cx-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 85%;
  margin: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  transition: none !important;
  overflow: visible !important;
}
#cx-ai-landing .cx-msg:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
#cx-ai-landing .cx-msg--user { align-self: flex-end; flex-direction: row-reverse; }
#cx-ai-landing .cx-msg--bot  { align-self: flex-start; }
#cx-ai-landing .cx-msg__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--chat-bot-bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin: 0;
  overflow: hidden;
}
#cx-ai-landing .cx-msg__avatar svg {
  width: 16px; height: 16px;
  fill: #2672df;
  stroke: none;
}
#cx-ai-landing .cx-msg__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
#cx-ai-landing .cx-msg__bubble {
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.55;
  word-break: break-word;
}
#cx-ai-landing .cx-msg--bot  .cx-msg__bubble {
  background: var(--chat-bot-bg);
  border-bottom-left-radius: 6px;
  color: var(--chat-text);
}
#cx-ai-landing .cx-msg--user .cx-msg__bubble {
  background: var(--chat-user-bg);
  color: var(--chat-user-text);
  border-bottom-right-radius: 6px;
}
#cx-ai-landing .cx-msg__bubble p { margin: 0; }
#cx-ai-landing .cx-msg__bubble p + p { margin-top: 6px; }

/* Файл-чип */
#cx-ai-landing .cx-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.35);
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  transition: background .2s;
  max-width: 220px;
  overflow: hidden;
}
#cx-ai-landing .cx-msg--bot .cx-file-chip {
  background: rgba(38,114,223,.08);
  border-color: rgba(38,114,223,.2);
  color: #2672df;
}
#cx-ai-landing .cx-file-chip:hover { background: rgba(255,255,255,.4); }
#cx-ai-landing .cx-msg--bot .cx-file-chip:hover { background: rgba(38,114,223,.14); }
#cx-ai-landing .cx-file-chip svg {
  width: 15px; height: 15px;
  fill: currentColor; stroke: none;
  flex-shrink: 0;
}
#cx-ai-landing .cx-file-chip span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Typing indicator */
#cx-ai-landing #cx-chat-typing {
  align-self: flex-start;
}
#cx-ai-landing .cx-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--chat-muted);
  animation: cxDot 1.2s ease-in-out infinite;
}
#cx-ai-landing .cx-dot:nth-child(2) { animation-delay: .2s; }
#cx-ai-landing .cx-dot:nth-child(3) { animation-delay: .4s; }
@keyframes cxDot {
  0%,80%,100% { transform: scale(.6); opacity: .4; }
  40%          { transform: scale(1);  opacity: 1;  }
}

/* Панель ввода */
#cx-ai-landing .cx-chat-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--chat-border);
  background: var(--chat-bg);
  flex-shrink: 0;
}
#cx-ai-landing .cx-chat-file-btn {
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--chat-bg2);
  color: var(--chat-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
  flex-shrink: 0;
  font-family: inherit;
}
#cx-ai-landing .cx-chat-file-btn:hover { background: var(--chat-border); color: var(--chat-text); }
#cx-ai-landing .cx-chat-file-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#cx-ai-landing #cx-chat-input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--chat-border);
  border-radius: 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--chat-text);
  background: var(--chat-bg2);
  resize: none;
  outline: none;
  min-height: 38px;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color .2s, background .2s;
  line-height: 1.4;
}
#cx-ai-landing #cx-chat-input:focus {
  border-color: var(--chat-primary);
  background: #fff;
}
#cx-ai-landing #cx-chat-input::placeholder { color: var(--chat-muted); }
#cx-ai-landing #cx-chat-send {
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366F1, #818CF8);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 12px rgba(99,102,241,.35);
  flex-shrink: 0;
  font-family: inherit;
}
#cx-ai-landing #cx-chat-send:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(99,102,241,.50); }
#cx-ai-landing #cx-chat-send svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* Уведомление */
.cx-notice {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: #1a2540;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* ────────────────────────────────────────────────────────────────────── */
/* Inline-пункты выбора под сообщением бота (приходят из Make)             */
/* Премиальный стиль в фирменной палитре сайта                             */
/* ────────────────────────────────────────────────────────────────────── */
#cx-ai-landing .cx-btn-row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#cx-ai-landing .cx-inline-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid rgba(38,114,223,.16);
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #1a3a8a;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -.005em;
  cursor: pointer;
  text-align: center;
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 1px 2px rgba(8,33,96,.06),
    0 4px 14px rgba(38,114,223,.08);
  transition:
    transform .22s cubic-bezier(.25,.8,.25,1),
    box-shadow .22s ease,
    border-color .22s ease,
    color .22s ease,
    background .35s ease;
}

/* Каждая строка кнопки */
#cx-ai-landing .cx-inline-btn__line {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.35;
}

/* Многострочный вариант — увеличенный паддинг для воздуха */
#cx-ai-landing .cx-inline-btn--multiline {
  padding: 12px 20px;
  min-height: 56px;
}
/* Вторая и последующие строки — чуть приглушённые, как подпись */
#cx-ai-landing .cx-inline-btn--multiline .cx-inline-btn__line:not(:first-child) {
  font-size: 12.5px;
  font-weight: 500;
  opacity: .78;
  margin-top: 2px;
}

/* Тонкий блик слева (бежит при hover) */
#cx-ai-landing .cx-inline-btn::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -40%;
  width: 36%;
  height: 300%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(113,188,255,.32) 50%,
    transparent 100%);
  transform: rotate(20deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

#cx-ai-landing .cx-inline-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(38,114,223,.40);
  color: #0d2a73;
  background:
    linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 2px 4px rgba(8,33,96,.08),
    0 12px 28px rgba(38,114,223,.18),
    0 0 0 4px rgba(113,188,255,.10);
}

#cx-ai-landing .cx-inline-btn:hover:not(:disabled)::before {
  animation: cxInlineBtnShine 1s ease;
}

@keyframes cxInlineBtnShine {
  0%   { left: -50%; opacity: 0; }
  20%  { opacity: .9; }
  100% { left: 130%; opacity: 0; }
}

#cx-ai-landing .cx-inline-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    0 1px 0 rgba(255,255,255,.8) inset,
    0 2px 6px rgba(8,33,96,.10);
}

/* Дизейбл - мягкое затухание, без резких контрастов */
#cx-ai-landing .cx-inline-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    0 1px 0 rgba(255,255,255,.5) inset,
    0 1px 2px rgba(8,33,96,.04);
}

/* Выбранный пункт - фирменный синий градиент с glow */
#cx-ai-landing .cx-inline-btn.is-selected {
  opacity: 1;
  cursor: default;
  color: #fff;
  border-color: transparent;
  background:
    linear-gradient(135deg, #1146bf 0%, #2672df 50%, #4a91eb 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.20) inset,
    0 8px 22px rgba(38,114,223,.32),
    0 0 0 4px rgba(113,188,255,.18),
    0 0 24px rgba(113,188,255,.20);
  font-weight: 700;
}

#cx-ai-landing .cx-inline-btn.is-selected::after {
  content: "✓";
  display: inline-block;
  margin-left: 4px;
  font-size: 13px;
  font-weight: 800;
  opacity: .9;
}

/* Пункт-ссылка - тёплый акцентный (оранжевый) */
#cx-ai-landing .cx-inline-btn--link {
  border-color: rgba(255,123,31,.22);
  color: #c25f10;
  background:
    linear-gradient(180deg, #ffffff 0%, #fff5ec 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 1px 2px rgba(255,123,31,.08),
    0 4px 14px rgba(255,123,31,.10);
}

#cx-ai-landing .cx-inline-btn--link:hover:not(:disabled) {
  border-color: rgba(255,123,31,.50);
  color: #fff;
  background:
    linear-gradient(135deg, #ff7b1f 0%, #ff9d4a 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.20) inset,
    0 12px 28px rgba(255,123,31,.30),
    0 0 0 4px rgba(255,157,74,.16);
}

#cx-ai-landing .cx-inline-btn--link:hover:not(:disabled)::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,.40) 50%,
    transparent 100%);
}

#cx-ai-landing .cx-inline-btn--link::after {
  content: "↗";
  display: inline-block;
  margin-left: 4px;
  font-weight: 700;
  transition: transform .25s ease;
}

#cx-ai-landing .cx-inline-btn--link:hover:not(:disabled)::after {
  transform: translate(2px, -2px);
}

/* На мобильных - кнопки растягиваются на полную ширину */
@media (max-width: 760px) {
  #cx-ai-landing .cx-btn-row-inline {
    flex-direction: column;
    gap: 6px;
  }
  #cx-ai-landing .cx-inline-btn {
    width: 100%;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: 14px;
  }
}

/* ────────────────────────────────────────────────────────────────────── */
/* Меню быстрых команд (рядом с кнопкой отправки)                          */
/* Премиальный стиль в фирменной палитре                                   */
/* ────────────────────────────────────────────────────────────────────── */
#cx-ai-landing .cx-chat-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

#cx-ai-landing .cx-chat-menu-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #2672df;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
  border: 1px solid rgba(38,114,223,.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 1px 2px rgba(8,33,96,.06),
    0 4px 12px rgba(38,114,223,.08);
  transition:
    transform .22s cubic-bezier(.25,.8,.25,1),
    background .25s ease,
    color .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;
}

#cx-ai-landing .cx-chat-menu-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  transition: transform .25s ease;
}

/* Вариант кнопки с подписью «Тарифы» — pill вместо круга */
#cx-ai-landing .cx-chat-menu-btn--labeled {
  width: auto;
  height: 38px;
  padding: 0 14px 0 12px;
  gap: 7px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -.005em;
}
#cx-ai-landing .cx-chat-menu-btn--labeled svg {
  width: 17px;
  height: 17px;
}
#cx-ai-landing .cx-chat-menu-btn__label {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}

#cx-ai-landing .cx-chat-menu-btn:hover:not(.is-active) {
  transform: translateY(-2px);
  border-color: rgba(38,114,223,.40);
  background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 8px 18px rgba(38,114,223,.16),
    0 0 0 4px rgba(113,188,255,.10);
}

#cx-ai-landing .cx-chat-menu-btn.is-active {
  color: #fff;
  border-color: transparent;
  background:
    linear-gradient(135deg, #1146bf 0%, #2672df 50%, #4a91eb 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.20) inset,
    0 8px 22px rgba(38,114,223,.32),
    0 0 0 4px rgba(113,188,255,.16);
}

#cx-ai-landing .cx-chat-menu-btn.is-active svg {
  transform: rotate(90deg);
}

/* Поп-ап с пунктами */
#cx-ai-landing .cx-chat-menu-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.96));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(38,114,223,.14);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 24px 50px rgba(8,33,96,.18),
    0 8px 18px rgba(8,33,96,.08);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
  transform-origin: bottom right;
  animation: cxMenuPopOut .15s ease forwards;
}

#cx-ai-landing .cx-chat-menu-popup.is-open {
  display: flex;
  animation: cxMenuPopIn .22s cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes cxMenuPopIn {
  from { opacity: 0; transform: translateY(8px) scale(.92); }
  to   { opacity: 1; transform: translateY(0)   scale(1);   }
}

@keyframes cxMenuPopOut {
  from { opacity: 1; transform: translateY(0)   scale(1);   }
  to   { opacity: 0; transform: translateY(8px) scale(.96); }
}

/* Стрелочка-указатель */
#cx-ai-landing .cx-chat-menu-popup::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 14px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, rgba(247,250,255,.96), rgba(247,250,255,.96));
  border-right: 1px solid rgba(38,114,223,.14);
  border-bottom: 1px solid rgba(38,114,223,.14);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

/* Пункт меню */
#cx-ai-landing .cx-chat-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #1a3a8a;
  transition: background .18s ease, transform .18s ease, color .18s ease;
  width: 100%;
}

#cx-ai-landing .cx-chat-menu-item:hover {
  background: linear-gradient(135deg, rgba(38,114,223,.08), rgba(113,188,255,.10));
  color: #0d2a73;
  transform: translateX(2px);
}

#cx-ai-landing .cx-chat-menu-item:active {
  background: linear-gradient(135deg, rgba(38,114,223,.14), rgba(113,188,255,.16));
}

#cx-ai-landing .cx-chat-menu-item__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(113,188,255,.16), rgba(38,114,223,.10));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .25s ease, transform .25s ease;
}

#cx-ai-landing .cx-chat-menu-item__icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #2672df;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .25s ease;
}

#cx-ai-landing .cx-chat-menu-item:hover .cx-chat-menu-item__icon {
  background: linear-gradient(135deg, #2672df, #4a91eb);
  transform: scale(1.06);
}

#cx-ai-landing .cx-chat-menu-item:hover .cx-chat-menu-item__icon svg {
  stroke: #fff;
}

#cx-ai-landing .cx-chat-menu-item__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

#cx-ai-landing .cx-chat-menu-item__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: inherit;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cx-ai-landing .cx-chat-menu-item__sub {
  font-size: 12px;
  font-weight: 500;
  color: rgba(26, 58, 138, .60);
  line-height: 1.3;
  letter-spacing: -.005em;
}

#cx-ai-landing .cx-chat-menu-item__price {
  font-size: 12.5px;
  font-weight: 700;
  color: #2672df;
  letter-spacing: -.005em;
  line-height: 1.2;
}

#cx-ai-landing .cx-chat-menu-item:hover .cx-chat-menu-item__sub,
#cx-ai-landing .cx-chat-menu-item:hover .cx-chat-menu-item__price {
  color: inherit;
  opacity: .85;
}

/* Заголовок и разделитель в попапе */
#cx-ai-landing .cx-chat-menu-header {
  padding: 4px 12px 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(26, 58, 138, .55);
}

#cx-ai-landing .cx-chat-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(38,114,223,.18), transparent);
  margin: 6px 8px;
}

/* Выделенный пункт «Рекомендуем» (Рецензия + допрос) */
#cx-ai-landing .cx-chat-menu-item--featured {
  background: linear-gradient(135deg, rgba(38,114,223,.06), rgba(113,188,255,.08));
  position: relative;
}

#cx-ai-landing .cx-chat-menu-item--featured {
  /* Контейнер пункта — для позиционирования бейджа на иконке */
  position: relative;
}

#cx-ai-landing .cx-chat-menu-item--featured .cx-chat-menu-item__icon {
  background: linear-gradient(135deg, #2672df, #4a91eb);
  position: relative;
  overflow: visible;
}

/* Бейдж "Хит" — теперь на самой иконке справа сверху, не закрывает текст */
#cx-ai-landing .cx-chat-menu-item--featured .cx-chat-menu-item__icon::after {
  content: "Хит";
  position: absolute;
  top: -7px;
  right: -10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f43f5e, #ff7b8a);
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 63, 94, .45);
  border: 1.5px solid #fff;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
}

#cx-ai-landing .cx-chat-menu-item--featured .cx-chat-menu-item__icon svg {
  stroke: #fff;
}

/* Адаптив */
@media (max-width: 760px) {
  #cx-ai-landing #cx-chat-widget {
    min-height: 540px;
    height: 540px;
  }
  #cx-ai-landing #cx-reg-form { padding: 24px 18px; }
  #cx-ai-landing .cx-msg { max-width: 94%; }
  #cx-ai-landing .cx-chat-menu-popup { min-width: 220px; right: -4px; }
}

/* ──────────────────────────────────────────────────────────────────────── */
/* Модал поддержки                                                            */
/* ──────────────────────────────────────────────────────────────────────── */
.cx-help-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.cx-help-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.cx-help-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.cx-help-modal__window {
  position: relative;
  width: min(96%, 560px);
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 30px;
  overflow: hidden auto;
  padding: 36px 32px 28px;
  box-shadow: 0 22px 60px rgba(0,0,0,.25);
}
.cx-help-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(15,31,63,.06);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #0f1f3f;
  transition: background .2s;
}
.cx-help-modal__close:hover { background: rgba(15,31,63,.12); }
.cx-help-modal__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0f1f3f;
  text-align: center;
  margin-bottom: 8px;
}
.cx-help-modal__sub {
  text-align: center;
  color: #5c6f93;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}
#cx-help-form { display: grid; gap: 12px; }
.cx-help-field { display: flex; flex-direction: column; gap: 4px; }
.cx-help-label {
  font-size: 13px;
  color: #5c6f93;
  margin-bottom: 2px;
}
.cx-help-field input,
.cx-help-field textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #c9c9c9;
  border-radius: 30px;
  font-size: 15px;
  font-family: inherit;
  color: #000;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.cx-help-field textarea {
  resize: vertical;
  min-height: 100px;
  border-radius: 24px;
}
.cx-help-field input:focus,
.cx-help-field textarea:focus { border-color: #ff7b1f; }
.cx-help-field input::placeholder,
.cx-help-field textarea::placeholder { color: #000; opacity: .5; }
.cx-help-error {
  color: #c0392b;
  font-size: 13px;
  min-height: 16px;
  text-align: center;
}

/* Экран успешной отправки */
#cx-help-state-success {
  text-align: center;
  padding: 8px 4px 4px;
}
.cx-help-success-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(31,138,76,.10), rgba(109,255,197,.18));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cxSuccessPop .45s cubic-bezier(.34,1.56,.64,1) both;
}
.cx-help-success-icon svg {
  width: 60px;
  height: 60px;
  fill: none;
  stroke: #1f8a4c;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cx-help-success-icon svg circle {
  stroke-dasharray: 188;
  stroke-dashoffset: 188;
  animation: cxDashCircle .55s ease forwards;
}
.cx-help-success-icon svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: cxDashCheck .35s .5s ease forwards;
}
@keyframes cxSuccessPop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes cxDashCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes cxDashCheck {
  to { stroke-dashoffset: 0; }
}
.cx-help-success-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0f1f3f;
  margin-bottom: 8px;
}
.cx-help-success-sub {
  color: #5c6f93;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 22px;
}
.cx-help-submit {
  width: 100%;
  margin-top: 4px;
  padding: 14px;
  border: 0;
  border-radius: 30px;
  background: #ff7b1f;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 8px 22px rgba(255,123,31,.25);
}
.cx-help-submit:hover:not([disabled]) {
  background: #e96a10;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255,123,31,.35);
}
.cx-help-submit[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

@media (max-width: 560px) {
  .cx-help-modal__window { padding: 28px 20px 22px; border-radius: 22px; }
  .cx-help-modal__title { font-size: 20px; }
}

/* ──────────────────────────────────────────────────────────────────────── */
/* Подсветка чекбокса согласия при попытке открыть чат без галочки           */
/* ──────────────────────────────────────────────────────────────────────── */
.cx-consent-shake {
  animation: cxConsentShake .55s cubic-bezier(.36,.07,.19,.97) both;
  background: rgba(255,123,31,.08);
  border-radius: 12px;
  padding: 6px 8px;
  margin: 8px -8px 0 -8px !important;
}
@keyframes cxConsentShake {
  10%,90%   { transform: translateX(-1px); }
  20%,80%   { transform: translateX(2px); }
  30%,50%,70% { transform: translateX(-4px); }
  40%,60%   { transform: translateX(4px); }
}

/* На очень узких экранах прячем подпись «Тарифы» — оставляем только иконку */
@media (max-width: 420px) {
  #cx-ai-landing .cx-chat-menu-btn--labeled {
    width: 38px;
    padding: 0;
    border-radius: 50%;
  }
  #cx-ai-landing .cx-chat-menu-btn__label {
    display: none;
  }
}

/* ═══════════════════ Прогресс-бар обработки файла ═══════════════════ */
#cx-ai-landing .cx-progress {
  background: linear-gradient(180deg, #f8faff 0%, #eef3fc 100%);
  border-bottom: 1px solid #e2eaf7;
  padding: 14px 18px 12px;
  overflow: hidden;
  animation: cxProgressSlideIn .35s cubic-bezier(.2,.9,.3,1);
  flex-shrink: 0;
}
#cx-ai-landing .cx-progress[hidden] { display: none; }
#cx-ai-landing .cx-progress--out {
  animation: cxProgressSlideOut .35s cubic-bezier(.5,0,.75,0) forwards;
}
@keyframes cxProgressSlideIn {
  from { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
  to   { max-height: 240px; opacity: 1; padding-top: 14px; padding-bottom: 12px; }
}
@keyframes cxProgressSlideOut {
  from { max-height: 240px; opacity: 1; }
  to   { max-height: 0; opacity: 0; padding: 0 18px; }
}

#cx-ai-landing .cx-progress__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
#cx-ai-landing .cx-progress__label {
  font-size: 12.5px; font-weight: 700;
  color: #2a3d63; letter-spacing: .02em;
  text-transform: uppercase;
}
#cx-ai-landing .cx-progress__close {
  width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: rgba(38,114,223,.10); color: #2672df;
  font-size: 12px; line-height: 1; cursor: pointer;
  transition: background .15s, transform .15s;
}
#cx-ai-landing .cx-progress__close:hover {
  background: rgba(38,114,223,.22); transform: scale(1.08);
}

/* Ряд этапов: адаптируется — на десктопе горизонтально, на мобиле scroll-snap */
#cx-ai-landing .cx-progress__steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  position: relative;
}

/* Каждый этап */
#cx-ai-landing .cx-progress__step {
  flex: 1 1 0;
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  position: relative;
  min-width: 0;
  text-align: center;
}

/* Соединитель между этапами — на псевдо-элементе, справа от кружка */
#cx-ai-landing .cx-progress__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 13px;                     /* по центру кружка 28px */
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: #d7e0ef;
  border-radius: 1px;
  overflow: hidden;
  z-index: 0;
}
/* Соединитель когда предыдущий этап завершён — зелёный */
#cx-ai-landing .cx-progress__step.is-done:not(:last-child)::after {
  background: #22c55e;
}
/* Соединитель когда идёт текущий этап — с бегущей полоской */
#cx-ai-landing .cx-progress__step.is-current:not(:last-child)::after {
  background:
    linear-gradient(90deg, #2672df 0%, #6ba7f0 40%, transparent 40%, transparent 100%),
    #d7e0ef;
  background-size: 200% 100%, 100% 100%;
  animation: cxProgressStripe 1.4s linear infinite;
}
@keyframes cxProgressStripe {
  0%   { background-position: -100% 0, 0 0; }
  100% { background-position: 100% 0, 0 0; }
}

/* Кружок этапа */
#cx-ai-landing .cx-progress__dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff;
  border: 2px solid #cbd5e6;
  display: flex; align-items: center; justify-content: center;
  color: #93a3bd; font-size: 12px; font-weight: 700;
  position: relative; z-index: 1;
  transition: background .25s, border-color .25s, color .25s, transform .25s;
}
#cx-ai-landing .cx-progress__num {
  display: inline-block; line-height: 1;
}

/* Пройденный этап — зелёная галка */
#cx-ai-landing .cx-progress__step.is-done .cx-progress__dot {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}
#cx-ai-landing .cx-progress__step.is-done .cx-progress__num::before {
  content: "✓";
}
#cx-ai-landing .cx-progress__step.is-done .cx-progress__num {
  font-size: 14px;
}
#cx-ai-landing .cx-progress__step.is-done .cx-progress__num > * { display: none; }

/* Текущий этап — синий с пульсирующим ореолом */
#cx-ai-landing .cx-progress__step.is-current .cx-progress__dot {
  background: #2672df;
  border-color: #2672df;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(38,114,223,.55);
  animation: cxProgressPulse 1.6s ease-in-out infinite;
}
@keyframes cxProgressPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(38,114,223,.55); }
  50%     { box-shadow: 0 0 0 8px rgba(38,114,223,0); }
}

/* Подпись под кружком */
#cx-ai-landing .cx-progress__name {
  font-size: 11px; line-height: 1.25;
  color: #6b7a95; font-weight: 500;
  padding: 0 4px;
  max-width: 96px;
  transition: color .25s, font-weight .25s;
}
#cx-ai-landing .cx-progress__step.is-current .cx-progress__name {
  color: #1a3a8a; font-weight: 700;
}
#cx-ai-landing .cx-progress__step.is-done .cx-progress__name {
  color: #1b8e3f; font-weight: 600;
}

/* Мобильная адаптация: если тесно — уменьшаем и прячем подписи неактивных этапов */
@media (max-width: 620px) {
  #cx-ai-landing .cx-progress { padding: 12px 12px 10px; }
  #cx-ai-landing .cx-progress__dot { width: 24px; height: 24px; font-size: 11px; }
  #cx-ai-landing .cx-progress__step:not(:last-child)::after {
    top: 11px; left: calc(50% + 15px); right: calc(-50% + 15px);
  }
  #cx-ai-landing .cx-progress__name { font-size: 10px; max-width: 62px; }
  /* На маленьких экранах прячем подписи всех кроме текущего */
  #cx-ai-landing .cx-progress__step:not(.is-current) .cx-progress__name {
    display: none;
  }
  /* Текущий получает подпись ниже, а строка выравнивается по кружкам */
  #cx-ai-landing .cx-progress__step.is-current .cx-progress__name {
    font-size: 11px; max-width: 84px;
  }
}
