:root {
  --ua-bg: #f5f7fb;
  --ua-surface: #ffffff;
  --ua-text: #151a24;
  --ua-muted: #5e6575;
  --ua-primary: #1f4dff;
  --ua-primary-hover: #183ed0;
  --ua-border: #e1e6f0;
  --ua-danger: #d7263d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}


@font-face {
    font-family: ChangAnunitype;
    src: local(ChangAnunitype),url(/assets/templates/fonts/ChangAnunitype-Regular-2209fbb4.woff2) format("woff2"),url(/assets/templates/fonts/ChangAnunitype-Regular-7d087d10.woff) format("woff"),url(/assets/templates/fonts/ChangAnunitype-Regular-56ca18f2.ttf) format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: ChangAnunitype;
    src: local(ChangAnunitype),local("ChangAnunitype Bold"),url(/assets/templates/fonts/ChangAnunitype-Bold-bf723064.woff2) format("woff2"),url(/assets/templates/fonts/ChangAnunitype-Bold-ed5c796e.woff) format("woff"),url(/assets/templates/fonts/ChangAnunitype-Bold-3c68c418.ttf) format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", system-ui, sans-serif;
  color: var(--ua-text);
  background: var(--ua-bg);
}

body.ua-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body.ua-page > main {
  flex: 1 0 auto;
}

.ua-container {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.ua-header {
  background: #fff;
  border-bottom: 1px solid var(--ua-border);
}

.ua-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ua-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ua-logo {
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ua-text);
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.ua-brand__title {
  margin: 0;
  font-size: 13px;
  color: var(--ua-muted);
}

.ua-contacts {
  text-align: right;
}

.ua-contacts__phone {
  color: var(--ua-primary);
  font-weight: 700;
  text-decoration: none;
}

.ua-contacts__address {
  margin: 4px 0 0;
  color: var(--ua-muted);
  font-size: 12px;
}

.ua-hero {
  padding: 28px 0 20px;
}

.ua-chat,
.ua-advantages__item {
  background: var(--ua-surface);
  border: 1px solid var(--ua-border);
  border-radius: 16px;
}

.ua-hero__card {
  --ua-hero-bg-mobile: none;
  --ua-hero-bg-desktop: none;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  min-height: 400px;
}

.ua-hero__card-bg {
  position: absolute;
  inset: 0;
  background-color: #1a2233;
  background-image: var(--ua-hero-bg-mobile);
  background-size: cover;
  background-position: center;
}

@media (min-width: 921px) {
  .ua-hero__card-bg {
    background-image: var(--ua-hero-bg-desktop);
  }

  .ua-hero__bottom {
    grid-template-columns: 1fr;
  }

  .ua-hero__promo-btn {
    display: none;
  }
}

.ua-hero__card-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(15, 20, 32, 0.88) 0%,
    rgba(15, 20, 32, 0.45) 28%,
    rgba(15, 20, 32, 0.05) 50%,
    rgba(15, 20, 32, 0.45) 72%,
    rgba(15, 20, 32, 0.9) 100%
  );
}

.ua-hero__card-content {
  position: relative;
  z-index: 1;
  padding: 28px 28px 24px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.ua-hero__title {
  margin: 0 0 12px;
  font-size: 38px;
  line-height: 1.08;
  max-width: 720px;
  color: #fff;
}

.ua-hero__text {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.5;
  max-width: 560px;
}

.ua-hero__cta {
  margin-bottom: 24px;
}

.ua-hero__bottom {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 340px);
  gap: 16px;
  align-items: stretch;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ua-hero__timer-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.ua-hero__card .ua-counter__item {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ua-hero__card .ua-counter__item span {
  color: #fff;
}

.ua-hero__card .ua-counter__item small {
  color: rgba(255, 255, 255, 0.75);
}

.ua-hero__promo-btn,
.ua-side-promo__btn {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 16px 18px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  background-color: #0a2a9e;
  background-image: linear-gradient(135deg, rgba(31, 77, 255, 0.92) 0%, rgba(10, 42, 158, 0.95) 100%);
  background-size: cover;
  background-position: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ua-hero__promo-btn {
  min-height: 120px;
}

.ua-hero__promo-btn:hover,
.ua-side-promo__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(31, 77, 255, 0.28);
}

.ua-hero__promo-btn-text,
.ua-side-promo__btn-text {
  display: block;
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.ua-hero__promo-btn-text {
  max-width: 220px;
  font-size: 15px;
}

.ua-side-promo__btn {
  width: 100%;
  height: 100%;
  padding: 22px 24px;
}

.ua-side-promo__btn-text {
  max-width: 280px;
  font-size: 18px;
}

.ua-btn {
  border: none;
  border-radius: 10px;
  min-height: 44px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ua-btn--primary {
  color: #fff;
  background: var(--ua-primary);
}

.ua-btn--primary:hover {
  background: var(--ua-primary-hover);
}

.ua-btn--ghost {
  color: var(--ua-text);
  background: #eef1f6;
}

.ua-counter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ua-counter__item {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: #f0f3fb;
}

.ua-counter__item span {
  display: block;
  font-size: 22px;
  font-weight: 700;
}

.ua-counter__item small {
  font-size: 11px;
  color: var(--ua-muted);
}

.ua-advantages {
  padding: 8px 0 24px;
}

.ua-advantages__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ua-advantages__item {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-weight: 600;
}

.ua-chat-section {
  padding-bottom: 34px;
}

.ua-chat-wrap {
  width: min(760px, 100%);
}

.ua-chat__header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 25;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: min(760px, calc(100% - 32px));
  padding: 12px 16px;
  background: var(--ua-surface);
  border: 1px solid var(--ua-border);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 10px 28px rgba(21, 26, 36, 0.1);
  transform: translate(-50%, -120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s, top 0.15s ease;
}

.ua-chat__header.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ua-manager {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ua-manager__avatar {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #eef1f8;
}

.ua-manager__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.ua-manager__online {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ua-surface);
  border-radius: 50%;
  background: #22c55e;
}

.ua-manager__name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
}

.ua-manager__role {
  margin: 0;
  color: var(--ua-muted);
  font-size: 12px;
}

.ua-chat__phone {
  flex-shrink: 0;
  color: var(--ua-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.ua-chat__messages {
  position: relative;
  min-height: 160px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ua-chat__messages--has-content {
  padding-left: 68px;
}

.ua-chat__avatar {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef1f8;
  z-index: 1;
}

.ua-chat__avatar[hidden] {
  display: none !important;
}

.ua-chat__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ua-chat__anchor {
  height: 1px;
  flex-shrink: 0;
  scroll-margin-bottom: 24px;
}

.ua-chat-msg {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 12px;
  line-height: 1.35;
}

.ua-chat-msg--bot {
  align-self: flex-start;
  background: #eef1f8;
}

.ua-chat-msg--user {
  align-self: flex-end;
  background: #dde8ff;
}

.ua-chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 4px;
  font-size: 13px;
  color: var(--ua-muted);
}

.ua-chat-typing[hidden] {
  display: none !important;
}

.ua-chat-typing__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ua-muted);
  animation: ua-blink 1.2s infinite;
}

.ua-chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.ua-chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ua-blink {
  0%, 80%, 100% { opacity: 0.2; }
  40%            { opacity: 1; }
}

/* ─── пузыри сообщений ─── */
@keyframes ua-msg-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ua-chat-row--enter {
  animation: ua-msg-in 0.38s ease forwards;
}

.ua-chat-row {
  display: flex;
  padding: 2px 0;
}
.ua-chat-row--bot  { justify-content: flex-start; }
.ua-chat-row--user { justify-content: flex-end; }

.ua-chat-bubble {
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.ua-chat-bubble--bot {
  background: #f0f2f7;
  color: var(--ua-text);
  border-bottom-left-radius: 4px;
}
.ua-chat-bubble--user {
  max-width: 82%;
  background: var(--ua-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ua-chat-bubble--has-actions {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px 14px;
  background: #f0f2f7;
  border-bottom-left-radius: 4px;
}
.ua-chat-bubble--last {
  width: 100%;
  padding: 0;
  background: transparent;
}
.ua-bubble-text {
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  line-height: 1.5;
}
.ua-chat-bubble--has-actions .ua-bubble-text {
  margin-bottom: 12px;
}
.ua-chat-bubble--last > .ua-bubble-text {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f0f2f7;
  border-radius: 16px 16px 16px 4px;
}

/* ─── варианты выбора ─── */
.ua-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 2px;
}
.ua-choices--multi {
  flex-direction: column;
  align-items: flex-start;
}
.ua-choices__apply {
  margin-top: 10px;
  align-self: flex-start;
}

.ua-choice {
  padding: 9px 14px;
  border: 1px solid var(--ua-primary);
  color: var(--ua-primary);
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition: background .15s, color .15s;
}
.ua-choice:hover:not(:disabled) {
  background: var(--ua-primary);
  color: #fff;
}
.ua-choice--active { background: var(--ua-primary); color: #fff; }
.ua-choice--check  { display: flex; align-items: center; gap: 8px; border-radius: 10px; }
.ua-choice--check input { width: 16px; height: 16px; cursor: pointer; }
.ua-choice:disabled { opacity: .5; cursor: default; }

/* ─── карточки моделей (внутри пузыря менеджера) ─── */
.ua-models {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ua-model {
  position: relative;
  flex: 1 1 128px;
  max-width: calc(50% - 4px);
  padding: 8px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.ua-model:hover { border-color: var(--ua-primary); }
.ua-model--active {
  border-color: var(--ua-primary);
  box-shadow: 0 0 0 3px rgba(31, 77, 255, .15);
}
.ua-model__img {
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1f8;
}
.ua-model__img img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  display: block;
}
.ua-model__name  { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.ua-model__price { margin: 0; font-size: 12px; color: var(--ua-muted); }
.ua-model__sticker {
  position: absolute;
  top: 6px; left: 6px;
  background: var(--ua-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ─── форма и счётчик в последнем сообщении ─── */
.ua-chat-lead {
  border: 1px solid var(--ua-border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.ua-lead-form {
  padding: 14px;
}
.ua-lead-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.ua-lead-form input[type=tel] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ua-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  margin-bottom: 10px;
}
.ua-lead-form .ua-btn {
  width: 100%;
}
#ua-lead-success,
#ua-lead-fail {
  padding: 16px;
  text-align: center;
  font-size: 14px;
}
#ua-lead-success p { color: #18874b; font-weight: 600; margin: 0; }
#ua-lead-fail   p { margin: 0 0 10px; }

/* ─── счётчик внутри чата ─── */
.ua-lead-timer {
  background: #f0f2f7;
  border-top: 1px solid var(--ua-border);
  padding: 12px 16px;
  text-align: center;
}
.ua-lead-timer__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ua-muted);
}
.ua-lead-clock {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.ua-lead-clock__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ua-lead-clock__item span {
  font-size: 24px;
  font-weight: 700;
  color: var(--ua-primary);
  min-width: 44px;
  text-align: center;
  background: #fff;
  border-radius: 8px;
  padding: 4px 2px;
}
.ua-lead-clock__item small {
  font-size: 10px;
  color: var(--ua-muted);
  margin-top: 4px;
}

.ua-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: #111724;
  color: #b6bece;
  padding: 18px 0;
  font-size: 13px;
}

.ua-cookies {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: #fff;
  border-top: 1px solid var(--ua-border);
  box-shadow: 0 -8px 28px rgba(21, 26, 36, 0.1);
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
}

.ua-cookies.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.ua-cookies__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.ua-cookies__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ua-muted);
}

.ua-cookies__more {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: inherit;
  color: var(--ua-primary);
  text-decoration: underline;
  cursor: pointer;
}

.ua-cookies__more:hover {
  color: var(--ua-primary-hover);
}

.ua-cookies__details[hidden] {
  display: none !important;
}

.ua-cookies__details:not([hidden]) {
  display: inline;
}

.ua-cookies__accept {
  flex-shrink: 0;
  min-width: 120px;
}

.ua-popup {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ua-popup.is-open {
  display: flex;
}

.ua-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 32, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ua-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  margin: 0;
  background: #fff;
  border-radius: 16px;
  overflow: auto;
  box-shadow: 0 24px 48px rgba(15, 20, 32, 0.22);
}

.ua-popup__close {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 2;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
}

.ua-popup__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 48px 16px 18px;
  background: #1a2233;
  color: #fff;
}

.ua-popup__head-avatar {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.ua-popup__head-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #2a3548;
}

.ua-popup__online {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #1a2233;
  border-radius: 50%;
  background: #22c55e;
}

.ua-popup__head-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.ua-popup__head-role {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
}

.ua-popup__body {
  padding: 18px;
}

.ua-popup__msg {
  margin-bottom: 16px;
}

.ua-popup__msg p {
  margin: 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ua-text);
  background: #f0f2f7;
  border-radius: 16px 16px 16px 4px;
}

.ua-popup__form {
  display: grid;
  gap: 10px;
}

.ua-popup__form input[type="tel"],
.ua-lead-form input[type="tel"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ua-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.ua-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ua-form-consent {
  margin-top: 4px;
}

.ua-form-consent__label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ua-muted);
  cursor: pointer;
}

.ua-form-consent__label input {
  margin-top: 2px;
  flex-shrink: 0;
}

.ua-form-consent__text a {
  color: var(--ua-primary);
  text-decoration: underline;
}

.ua-form-consent__text a:hover {
  color: var(--ua-primary-hover);
}

.ua-popup__status {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ua-muted);
}

.ua-popup__status.is-error {
  color: var(--ua-danger);
}

.ua-popup__status.is-success {
  color: #18874b;
}

@media (max-width: 920px) {
  .ua-cookies__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .ua-cookies__accept {
    width: 100%;
  }

  .ua-hero__bottom {
    grid-template-columns: 1fr;
  }

  .ua-hero__promo-btn {
    min-height: 100px;
  }

  .ua-side-promo {
    display: none;
  }

  .ua-advantages__list {
    grid-template-columns: 1fr;
  }

  .ua-hero__title {
    font-size: 30px;
  }

  .ua-chat-wrap {
    width: 100%;
  }
}

@media (min-width: 921px) {
  .ua-side-promo {
    display: block;
    position: fixed;
    right: max(24px, calc(50% - 570px - 374px));
    bottom: 0;
    z-index: 15;
    width: 350px;
    height: 395px;
  }
}
