/* ========================================
   ФОРМА
======================================== */

.shcb-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shcb-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Сохраняем место под полосу прокрутки */
html {
  scrollbar-gutter: stable;
}

/* ========================================
   ПОДПИСИ
======================================== */

.shcb-form__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.shcb-form__required {
  color: #e53935;
}

/* ========================================
   ПОЛЯ ВВОДА
======================================== */

.shcb-form__control {
  position: relative;
}

.shcb-form__icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #858ba1;
  pointer-events: none;
  transform: translateY(-50%);
}

.shcb-form__icon-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.shcb-form__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px 12px 48px;
  font-size: 16px;
  line-height: 1.5;
  color: #17213b;
  background-color: #f8f8fc;
  border: 1px solid #d9d9df;
  border-radius: 8px;
}

.shcb-form__input:focus {
  border-color: #7155c5;
}

.shcb-form__input:focus-visible {
  outline: 2px solid #7155c5;
  outline-offset: 2px;
}

.shcb-form__input::placeholder {
  color: #687087;
}

/* ========================================
   СОГЛАСИЕ НА ОБРАБОТКУ ДАННЫХ
======================================== */

.shcb-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.shcb-form__checkbox {
  -webkit-appearance: checkbox !important;
  appearance: auto !important;

  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;

  accent-color: #7155c5;
  cursor: pointer;
}

.shcb-form__checkbox:focus-visible {
  outline: 2px solid #7155c5;
  outline-offset: 2px;
}

.shcb-form__consent-text {
  flex: 1;
  min-width: 0;

  font-size: 13px;
  line-height: 1.35;
  color: #687087;
}

.shcb-form__consent-label {
  display: inline;

  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.shcb-form__consent-link {
  display: inline;

  font-size: inherit;
  line-height: inherit;
  color: #7155c5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shcb-form__consent-link:hover {
  color: #6243b3;
}

/* ========================================
   КНОПКА
======================================== */

.shcb-form__button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  background-color: #7155c5;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.shcb-form__button:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.shcb-form__button:hover:not(:disabled) {
  background-color: #6243b3;
}

.shcb-form__button:focus-visible {
  outline: 2px solid #7155c5;
  outline-offset: 3px;
}

/* ========================================
   МОДАЛЬНОЕ ОКНО
======================================== */

.shcb-modal {
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 32px;
  overflow-y: auto;
  color: #17213b;
  background-color: #ffffff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Затемнение за окном */

.shcb-modal::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

/* ========================================
   КНОПКА ЗАКРЫТИЯ
======================================== */

.shcb-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font-family: inherit;
  font-size: 28px;
  line-height: 1;
  color: #687087;
  background-color: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.shcb-modal__close:hover {
  color: #17213b;
  background-color: #f8f8fc;
}

.shcb-modal__close:focus-visible {
  outline: 2px solid #7155c5;
  outline-offset: 2px;
}

/* ========================================
   ЗАГОЛОВОК
======================================== */

.shcb-modal__title {
  margin: 0 40px 24px 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: #17213b;
}

/* ========================================
   АДАПТИВНОСТЬ
======================================== */

@media (max-width: 480px) {
  .shcb-modal {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 24px;
  }
}

/* ========================================
   БЛОКИРОВКА ПРОКРУТКИ СТРАНИЦЫ
======================================== */

body.shcb-modal-open {
  overflow: hidden;
}

/* ========================================
   СООБЩЕНИЯ ФОРМЫ
======================================== */

.shcb-form__message {
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 8px;
}

.shcb-form__message.is-success {
  color: #237a45;
  background-color: #edf8f0;
}

.shcb-form__message.is-error {
  color: #c62828;
  background-color: #fff0f0;
}

/* ========================================
   ЗАЩИТА ОТ БОТОВ
======================================== */

.shcb-form__honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   ЛОКАЛЬНОЕ ИСПРАВЛЕНИЕ СТИЛЕЙ СОГЛАСИЯ
======================================== */

.shcb-form .shcb-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.shcb-form input.shcb-form__checkbox {
  appearance: auto;
  -webkit-appearance: checkbox;

  box-sizing: border-box;
  display: inline-block;

  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;

  margin: 2px 0 0;
  padding: 0;

  border: 1px solid #b8bdca;
  accent-color: #7155c5;

  cursor: pointer;
  vertical-align: top;
}

.shcb-form .shcb-form__consent-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}

.shcb-form .shcb-form__consent-label,
.shcb-form .shcb-form__consent-link {
  display: inline;
  font-size: inherit;
  line-height: inherit;
}

/* ========================================
   ПРЕФИКС ТЕЛЕФОНА
======================================== */

.shcb-form__phone-prefix {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 48px;

  font-size: 16px;
  line-height: 1.5;
  color: #17213b;

  transform: translateY(-50%);
  pointer-events: none;
}

.shcb-form input.shcb-form__input[type="tel"] {
  padding-left: 76px;
}

.shcb-form input[type="tel"]::placeholder {
  color: #9aa2b5;
  opacity: 1;
}