/* Внести ребёнка в список - форма записи. Макет: s6xnu (1440) и ihZt4
   (390).

   Фон секции тёмный - fill #07130F совпадает с --bg-deep, класс
   .hw-sec--deep. Светлая карточка "Бланк" - готовые токены письма
   (--paper-h/--paper-ink/--paper-line/--paper-muted/--paper-ph),
   печать и обводка поля - --paper-red/--paper-line.

   Поля формы и чекбокс устроены как у hw-ticket.css: класс .zfield /
   .zform__consent / .zform__box(-face) - крючок для form.js
   (is-bad через .closest), общий вид из form.css сюда не допускаем -
   перебиваем его своим локально, через .ch-form. Радиус поля "Поле" в
   данных макета 7px, а не общий токен --r-field (8px) - значение
   макета, не опечатка. */

.ch-form {
  position: relative;
  overflow: hidden;
}

.ch-form__glow {
  position: absolute;
  left: 120px;
  top: -280px;
  width: 1200px;
  height: 720px;
  background: radial-gradient(ellipse closest-side, #E9C46A2E 0%, #E9C46A00 100%);
  pointer-events: none;
}

.ch-form__wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 38px;
}

.ch-form__head {
  width: 820px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ch-form__title {
  width: 100%;
  text-align: center;
}

.ch-form__card {
  width: 900px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 46px 48px;
  background: var(--paper-h);
  border-radius: 8px;
}

.ch-form__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Шапка бланка. */
.ch-form__blank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ch-form__blank-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ch-form__brand {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 26px;
  line-height: 36px;   /* по замеру макета, как подпись бланка письма */
  letter-spacing: -.4px;
  color: var(--paper-ink);
}

.ch-form__brand-sub {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 16px;   /* 13 x 1.21 = 15.73 */
  color: var(--paper-muted);
}

.ch-form__seal {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: var(--paper-red);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  line-height: 20px;   /* 15 x 1.36 = 20.4 */
  color: var(--white);
}

.ch-form__line {
  height: 1px;
  background: var(--paper-line);
}

/* Поля. */
.ch-form__row {
  display: flex;
  gap: 16px;
}

.ch-form__row > .ch-form__field {
  flex: 1 1 0;
  min-width: 0;
}

.ch-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* .zfield - только крючок для form.js, общий вид поля form.css сюда не
   допускаем - перебиваем его своим. */
.ch-form .zfield {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  background: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  position: static;
  flex: 1 1 0;
  min-width: 0;
}

.ch-form__field-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  line-height: 13px;   /* 11 x 1.21 = 13.31 */
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.ch-form__field-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  margin: 0;
  border: 0;
  border-radius: 7px;   /* в данных макета 7, а не общий токен --r-field (8) */
  box-shadow: inset 0 0 0 1px var(--paper-line);
  background: var(--white);
  padding: 15px 17px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 18px;   /* 15 x 1.21 = 18.15 */
  color: var(--paper-ink);
}

.ch-form__field-input::placeholder {
  color: var(--paper-ph);
  opacity: 1;
}

.ch-form__field-input--area {
  resize: vertical;
}

.ch-form__field-error {
  display: none;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
  color: var(--magenta-text);
}

.ch-form .zfield.is-bad .ch-form__field-input { box-shadow: 0 0 0 1px var(--magenta) inset; }
.ch-form .zfield.is-bad .ch-form__field-error { display: block; }

/* Форма ожидания (межсезонье). */
.ch-form__wait-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ch-form__wait-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.3;
  color: var(--paper-ink);
}

.ch-form__wait-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper-muted);
}

/* Согласие. */
.ch-form .zform__consent {
  gap: 11px;
  align-items: flex-start;
  padding: 0;
}

.ch-form .zform__box-face {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--paper-line);
  border: 0;
}

.ch-form .zform__box:checked + .zform__box-face {
  background: var(--magenta);
  box-shadow: inset 0 0 0 1px var(--magenta);
}

.ch-form .zform__box-face svg {
  width: 11px;
  height: 11px;
}

.ch-form__consent-text {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 21px;   /* 13 x 1.6 = 20.8 */
  color: var(--paper-muted);
}

.ch-form__consent-text a {
  color: inherit;
  text-decoration: none;
}

.ch-form__consent-text a:hover,
.ch-form__consent-text a:focus-visible { text-decoration: underline; }

.ch-form__consent-error {
  display: none;
  margin-top: -5px;
  margin-bottom: 1px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.4;
  color: var(--magenta-text);
}

.ch-form .zform__consent.is-bad .ch-form__box-face { box-shadow: 0 0 0 1px var(--magenta) inset; }
.ch-form .zform__consent.is-bad + .ch-form__consent-error { display: block; }

/* Кнопка отправки. Бренд-кнопка на всём сайте всегда малиновая
   (var(--magenta)), независимо от палитры праздника. */
.ch-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--magenta);
  padding: 19px 32px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 19px;   /* 16 x 1.21 = 19.36 */
  color: var(--white);
  cursor: pointer;
}

.ch-form__submit:hover { filter: brightness(1.07); }
.ch-form__submit:disabled { opacity: .6; cursor: not-allowed; }

/* Строка ответа формы - в макете её нет, занимает место только когда
   есть что показать (успех/ошибка), на сверку с макетом не влияет. */
.ch-form__msg {
  display: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--magenta-text);
}

.ch-form__bottom {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 22px;   /* 13 x 1.7 = 22.1 */
  color: var(--paper-muted);
}

/* Ловушка для роботов. */
.ch-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

@media (max-width: 860px) {
  .ch-form__card {
    padding: 28px 20px;
  }

  .ch-form__brand { letter-spacing: -.3px; }

  .ch-form__brand-sub {
    font-size: 12px;
    line-height: 15px;   /* 12 x 1.21 = 14.52 */
  }

  .ch-form__seal {
    font-size: 14px;
    line-height: 19px;   /* 14 x 1.36 = 19.04 */
  }

  .ch-form__row {
    flex-direction: column;
    gap: 16px;
  }

  .ch-form__field-input {
    height: 47px;
    font-size: 14px;
    line-height: 17px;   /* 14 x 1.21 = 16.94 */
  }

  /* textarea не умеет сама расти под текст (в отличие от auto-layout
     рамки в макете) - при узкой колонке плейсхолдер "Не ест орехи ·
     записываем двоих · стесняется петь" переносится на две строки.
     Высота - по формуле однострочных полей: 15 паддинг + 2 строки по
     17px + 15 паддинг = 64, это высота "Поле" из дампа на телефоне. */
  .ch-form__field-input--area {
    height: auto;
    min-height: 64px;
    line-height: 17px;   /* 14 x 1.21 */
  }

  .ch-form__consent-text {
    font-size: 12px;
    line-height: 19px;   /* 12 x 1.6 = 19.2 */
  }

  .ch-form__submit {
    font-size: 15px;
    line-height: 18px;   /* 15 x 1.21 = 18.15 */
  }

  .ch-form__bottom {
    font-size: 12px;
    line-height: 20px;   /* 12 x 1.7 = 20.4 */
  }
}
