/* Галка согласия, ошибки полей и панель cookie (proposal 0025). Цвета — из темы сайта:
   акцент — как у основной кнопки, ошибка — как у прежней подсветки .redput. */
:root {
  --ism-accent: #0b71bb;
  --ism-accent-text: #fff;
  --ism-error: #EB5757;
  --ism-border: #bdbdbd;
}

/* Галка согласия: квадрат крупный, скруглённый, отмеченный — фирменным цветом. Сам input
   скрыт визуально, но остаётся в форме и доступен с клавиатуры. */
.form__check {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
  text-align: left;
}

/* Селектор из двух классов — сильнее общих правил сайта вида input[type='checkbox'] {display: none}:
   скрытый так input не получает фокус, и ошибка галки осталась бы без фокуса. */
.form__check .form__check-input {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.form__check-box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border: 1.5px solid var(--ism-border);
  border-radius: 6px;
  background: #fff;
  color: transparent;
  transition: background-color .15s ease, border-color .15s ease;
}

.form__check-box svg {
  width: 12px;
  height: 10px;
}

.form__check-input:checked + .form__check-box {
  border-color: var(--ism-accent);
  background: var(--ism-accent);
  color: var(--ism-accent-text);
}

.form__check-input:focus-visible + .form__check-box {
  outline: 2px solid var(--ism-accent);
  outline-offset: 2px;
}

.form__check-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
}

/* Ссылки переносятся по словам и подчёркнуты обычным text-decoration. */
.form__check-text .form__check-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.form__check-text .form__check-link:hover {
  color: var(--ism-accent);
}

/* Ошибки — под своим полем, цветом ошибки темы. */
.form__error-msg {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  color: var(--ism-error);
}

.form__error-msg:empty {
  display: none;
}

.input-block--error input[type="tel"],
.input-block--error input[type="text"],
.input-block--error input[type="email"] {
  border-color: var(--ism-error) !important;
}

.input-block--error .form__check-box {
  border-color: var(--ism-error);
}

.form__summary {
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  color: var(--ism-error);
}

.form__summary:empty {
  display: none;
}

/* Панель согласия на cookie: снизу поверх страницы, висит, пока согласия нет. */
.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  pointer-events: none;
}

.cookie[hidden] {
  display: none;
}

.cookie__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 960px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  color: #222;
  pointer-events: auto;
}

.cookie__text {
  flex: 1 1 auto;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  color: #222;
}

.cookie__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.cookie__text a:hover {
  color: var(--ism-accent);
}

.cookie__button {
  flex: 0 0 auto;
  padding: 12px 28px;
  border: 0;
  border-radius: 0;
  background: var(--ism-accent);
  color: var(--ism-accent-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (min-width: 768px) {
  .cookie__inner {
    flex-direction: row;
    align-items: center;
    padding: 16px 24px;
  }

  .cookie__text {
    margin: 0 24px 0 0;
  }
}

/* esteo: подпись галки как у прежних .label__check; на тёмном фоне (.checkbox-light) — светлая. */
.input-block .form__check {
  font-weight: 300;
  color: #0e1214;
}

.checkbox-light .form__check {
  color: #fff;
}

.checkbox-light .form__check-box {
  border-color: #fff;
  background: transparent;
}

/* Сводка — на всю ширину сетки формы. */
.form-elements .form__summary {
  grid-column-start: 1;
  grid-column-end: -1;
}
