/**
 * Шаблон мини-ленда: форма → amo, без Telegram.
 * Не публичная страница. Копировать в mpstats_promo_main/<юнит>_<кампания>/.
 * Общий theme.css с сайта не подключать.
 */

@import url("https://fonts.googleapis.com/css2?family=Onest:wght@400;500;700&display=swap");

:root {
  --font: "Onest", system-ui, -apple-system, sans-serif;

  --bg-page: #ffffff;
  --bg-card: #f0f3f8;
  --bg-muted: #f4f4f4;

  --text: #121212;
  --muted: #929292;
  --border: #dedede;
  --error: #e53935;

  --cta: #0dfd59;
  --cta-hover: #0ce450;
  --cta-text: #121212;

  --btn-dark: #121212;
  --btn-dark-hover: #414141;
  --btn-dark-text: #ffffff;

  --btn-light: #ffffff;
  --btn-light-hover: #dfdfdf;
  --btn-light-text: #121212;

  --accent-purple: #905fff;
  --accent-purple-hover: #682dc8;
  --accent-purple-text: #ffffff;

  --accent-green: #17bf50;
  --mint: #c4ffc8;

  --radius-btn: 100px;
  --radius-card: 24px;
  --radius-input: 6px;

  --fs-h1: 64px;
  --fs-h2: 48px;
  --fs-h3: 36px;
  --fs-h4: 28px;
  --fs-title: 24px;
  --fs-body: 18px;
  --fs-small: 16px;
  --fs-caption: 14px;
  --fs-tiny: 12px;

  --lh-tight: 1.15;
  --lh-snug: 1.2;
  --lh-body: 1.3;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;

  --btn-pad: 20px 48px 18px 44px;
  --speed-hover: 0.3s;

  --tg: #24a1de;
  --tg-hover: #1d91c9;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e8eaef;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 48px;
}

.card {
  width: 100%;
  max-width: 620px;
  padding: 40px 36px 36px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
}

.card__title {
  margin: 0 0 22px;
  text-align: center;
  font-family: "Onest", Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  color: #000000;
}

.card__title-line {
  display: block;
}

.card__subtitle {
  margin: 0 0 12px;
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.topics {
  margin: 0 0 22px;
  padding: 0 0 0 1.15em;
}

.topics__item {
  margin: 0 0 8px;
  padding: 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  line-height: 1.4;
  color: var(--text);
}

.card__close {
  margin: 0 0 22px;
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  line-height: 1.4;
  color: var(--text);
}

.form {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.field__label {
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  line-height: var(--lh-body);
}

.field__input {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-caption);
  outline: none;
}

.field__input::placeholder,
.phone__input::placeholder {
  font-size: 14px;
  font-weight: var(--fw-regular);
  color: var(--uc-color-color-KmXego, #929292);
}

.field__input:focus {
  border-color: var(--text);
}

.field__input.is-invalid {
  border-color: var(--error);
}

.field__error {
  margin: 0;
  font-size: 13px;
  color: var(--error);
}

.phone {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #ffffff;
}

.phone:focus-within {
  border-color: var(--text);
}

.phone.is-invalid {
  border-color: var(--error);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.phone__code {
  appearance: none;
  -webkit-appearance: none;
  min-width: 108px;
  height: 100%;
  padding: 0 28px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23929292' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  font: inherit;
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.phone__input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0 22px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--fs-caption);
}

.phone__input:focus,
.phone.is-invalid .phone__input,
.phone.is-invalid .phone__code {
  border-color: transparent;
}

.consent {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.consent__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consent__box {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1px #cfcfcf;
  position: relative;
}

.consent__input:checked + .consent__box {
  background: #121212;
  box-shadow: 0 0 0 1px #121212;
}

.consent__input:checked + .consent__box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent__text {
  font-size: 14px;
  font-weight: var(--fw-regular);
  line-height: 1.3;
  color: var(--uc-color-color-KmXego, #929292);
}

.consent__link {
  color: inherit;
  text-decoration: underline;
}

.tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 10px;
  width: 70%;
  min-height: 52px;
  margin: 8px auto 0;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--cta);
  color: var(--cta-text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: var(--fw-medium);
  line-height: 1.3;
  cursor: pointer;
}

.tg-btn:hover:not(:disabled) {
  background: var(--cta-hover);
}

.tg-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form__thanks {
  margin: 8px auto 0;
  width: 70%;
  text-align: center;
  font-size: 16px;
  font-weight: var(--fw-medium);
  line-height: 1.3;
  color: var(--text);
}

.tg-btn__icon {
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  width: 20px;
  height: 20px;
}

.form__alert {
  margin: 0;
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--error);
}

@media (max-width: 768px) {
  .page {
    padding: 24px 12px 32px;
  }

  .card {
    max-width: 100%;
    padding: 24px 16px 28px;
  }

  .card__title {
    margin-bottom: 18px;
    font-size: 26px;
  }

  .card__close {
    font-size: 16px;
  }

  .phone__code {
    min-width: 92px;
    padding: 0 24px 0 10px;
  }

  .tg-btn {
    width: 100%;
    min-height: 48px;
  }

  .form__thanks {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .card__title {
    font-size: 24px;
  }

  .consent__text {
    font-size: 13px;
  }
}
