/*
СТИЛИ ДЛЯ формы заявки
*/

.form-after-text__text a {
	color: #DB0075;
}

.close-mob,
.close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    z-index: 999;
    opacity: 1;
    background: none;
    border: none;
    cursor: pointer;
}

.close-mob:before,
.close-mob:after,
.close:before,
.close:after {
    position: absolute;
    content: ' ';
    height: 18px;
    width: 2px;
    -webkit-border-radius: 2px;
    border-radius: 2px;
    background-color: #000000;
    top: 0px;
}

.close-mob::before,
.close::before {
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.close-mob:after,
.close:after {
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}



/* Контейнер всей формы внутри модального окна */
.form-container__form-popup .widget-form,
.form-container__form .widget-form {
  display: flex;
  flex-direction: column;
  padding: 30px 40px 40px 40px;
  border-radius: 32px;
  background: #fff7fb;
}

.form-container__form-popup .form-title {
  font-family: 'DrukWideCyr';
  font-weight: 700;
  font-size: 32px;
  line-height: 130%;
}

.form-container__form-popup .form-subtitle {
  font-size: 14px;
  line-height: 1.4;
  color: #6b6b6b;
}

#popup-messia-form-3325 > div > form > div.form-field-wrapper.text-field-wrapper {
  margin-top: 40px;
}

/* Базовая сетка полей */
.widget-form .form-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.widget-form .text-field-label,
.widget-form .textarea-field-label,
.widget-form .email-field-label,
.widget-form .phone-field-label,
.widget-form .select-field-label,
.widget-form .checkbox-field-label {
  font-size: 20px;
  line-height: 100%;
  font-weight: 400;
}

.form-field-group.form-field-group--person-age, .widget-form .contact-combo {
  display: flex;
  max-width: 380px;
  width: 100%;
  background: #F9F3F1;
  border-radius: 35px;
  padding: 20px 20px 26px;
  flex-wrap: wrap;
}

/* Группа "Способ связи" + поля контакта */
.widget-form .contact-combo {
  gap: 28px;
}

.widget-form .contact-combo .is-hidden {
  display: none !important;
}

/* Две колонки для блоков справа/слева (как на макете) */
.widget-form .double-column-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.widget-form .double-column-group > .form-field-wrapper {
  flex: 1 1 220px;
}

/* Базовый стиль инпутов и селектов */
.widget-form .text-field,
.widget-form .email-field,
.widget-form .phone-field,
.widget-form .textarea-field,
.widget-form .select-field {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 13px 44px 13px 20px;
  font-size: 20px;
  line-height: 100%;
  background: #f6f2f5;
  color: #111;
}

.widget-form .textarea-field {
  padding: 20px 20px 15px 20px;
}

#popup-messia-form-3325 > div > form > div.form-field-group.form-field-group--contact-person > div.form-field-wrapper.contact-combo > div.form-field-wrapper.text-field-wrapper > input {
  background: #FFFFFF;
}

.widget-form .textarea-field {
  min-height: 83px;
  border-radius: 45px;
  resize: vertical;
  text-align: start;
}

.widget-form .text-field::placeholder,
.widget-form .email-field::placeholder,
.widget-form .phone-field::placeholder,
.widget-form .textarea-field::placeholder {
  color: #b4acb8;
}

.widget-form .text-field:focus,
.widget-form .email-field:focus,
.widget-form .phone-field:focus,
.widget-form .textarea-field:focus,
.widget-form .select-field:focus {
  outline: none;
  box-shadow: 0 0 0 2px #ff68b5;
}

.widget-form .select-field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px 16px;
}

/* Чекбокс и текст соглашения */
.widget-form .checkbox-field-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}

.widget-form .checkbox-field-wrapper .checkbox-field {
  margin-top: 4px;
}

.widget-form .checkbox-field-label a {
  color: #ff1b8a;
  text-decoration: none;
}

.widget-form .checkbox-field-label a:hover {
  text-decoration: underline;
}

/* reCAPTCHA блок и нижняя часть */
.widget-form .g-recaptcha {
  margin-top: 8px;
}

/* Кнопка отправки */
.widget-form .submit-field-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.widget-form .btn_red.btn-submit {
  max-width: 335px;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  background: #DB0075;
  border: none;
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 27, 138, 0.4);
  height: 54px;
  cursor: pointer;
}

.widget-form .btn_red.btn-submit:hover {
  background: #e5147a;
}

.widget-form .btn_red.btn-submit:focus {
  outline: none;
  box-shadow: 0 0 0 2px #ff9fd4;
}

/* Ошибки полей */
.widget-form input.error,
.widget-form textarea.error {
  box-shadow: 0 0 0 2px #ff4b4b;
}

#popup-messia-form-3325 > div > form > div.form-field-group.form-field-group--contact-person > div.form-field-wrapper.contact-combo {
  margin: 0;
}

#popup-messia-form-3325 > div > form > div.form-field-wrapper.text-field-wrapper > label {
  display: none;
}

.form-field-group.form-field-group--contact-person {
  display: flex;
  margin-top: 20px;
}

.form-field-group.form-field-group--person-age {
  margin-left: 20px;
}

#popup-messia-form-3325 > div > form > div.form-field-group.form-field-group--contact-person > div.form-field-wrapper.contact-combo > div.form-field-wrapper.text-field-wrapper > label {
  display: none;
}

[data-form-id="3325"] .select-field,
[data-form-id="3325"] .text-field {
  height: 52px;
}

.telegram-hint {
    font-size: 15px;
    color: #B7B7B7;
}

[data-form-id="3325"] .select-field {
  background-color: #FFFFFF;
  border: 1px solid #686868;
  font-weight: 700;
  height: auto;
  min-height: 52px;
  line-height: normal;
}

[data-form-id="3325"] .select-field-label {
  font-size: 20px;
  font-weight: 400;
}

/* Внешний вид вариантов выпадающего списка только для формы 3325 */
[data-form-id="3325"] .select-field option {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: #111111;
  background-color: #ffffff;
}

/* Попытка единого стиля ховера/выбранного варианта (реализация зависит от браузера) */
[data-form-id="3325"] .select-field option:hover,
[data-form-id="3325"] .select-field option:checked {
  background-color: #fff7fb;
  color: #111111;
}

/* ===== КАСТОМНЫЙ SELECT ТОЛЬКО ДЛЯ ФОРМЫ 3325 ===== */

/* Прячем нативный select визуально, но оставляем в DOM и в потоке для формы */
[data-form-id="3325"] .custom-select__native {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

/* Контейнер кастомного селекта */
[data-form-id="3325"] .custom-select {
  position: relative;
  width: 100%;
}

/* Кнопка-триггер (верхняя часть селекта) */
[data-form-id="3325"] .custom-select__trigger {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #686868;
  background-color: #FFFFFF;
  min-height: 52px;
  padding: 13px 44px 13px 20px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: #111111;
  text-align: left;
  cursor: pointer;

  /* Стрелочка справа, как у обычного select */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 16px 16px;
}

/* Ховер/фокус для триггера */
[data-form-id="3325"] .custom-select__trigger:hover {
  border-color: #ff68b5;
}

[data-form-id="3325"] .custom-select__trigger:focus {
  outline: none;
  box-shadow: 0 0 0 1px #DB0075;
}

/* Состояние открытого селекта — визуально "слипаем" с меню */
[data-form-id="3325"] .custom-select.is-open .custom-select__trigger {
  border-radius: 30px 30px 0 0;
}

/* Меню (выпадающая часть) */
[data-form-id="3325"] .custom-select__menu {
  margin-top: -1px;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background-color: #ffffff;
  border-radius: 0 0 25px 25px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #686868;
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  display: none;
}

/* Показываем меню, когда есть класс .is-open */
[data-form-id="3325"] .custom-select.is-open .custom-select__menu {
  display: block;
  border-color: #DB0075;
}

/* Пункты меню */
[data-form-id="3325"] .custom-select__option {
  padding: 10px 18px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: #111111;
  cursor: pointer;
  white-space: nowrap;
}

[data-form-id="3325"] .custom-select__option:hover {
  background-color: #fff7fb;
}

/* Выбранный пункт */
[data-form-id="3325"] .custom-select__option.is-selected {
  background-color: #ffe0f2;
  font-weight: 600;
}

[data-form-id="3325"] .form-after-text {
    margin-top: 2px;
}

[data-form-id="3325"] .form-field-wrapper.textarea-field-wrapper > label {
  margin-top: 20px;
}

[data-form-id="3325"] .form-after-text__checkbox-label {
  margin-left: 8px;
}

[data-form-id="3325"] .form-field-group.form-field-group--submit-captcha {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

[data-form-id="3325"] .form-after-text__text {
    margin-left: 6px;
}

[data-form-id="3325"] .form-field-wrapper.textarea-field-wrapper {
    gap: 12px;
}

#popup-messia-form-3325 > div > form > div.form-field-group.form-field-group--contact-person > div.form-field-wrapper.contact-combo > div.form-field-wrapper.select-field-wrapper > div > div > div:nth-child(1) {
    padding: 0;
}

/* Счётчик символов под textarea (поле "Запрос") */
.textarea-counter {
  align-self: flex-end;
  margin-top: -10px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b6b6b;
}

.textarea-counter--warning {
  color: #DB0075;
  font-weight: 500;
}

/* Чекбокс согласия в блоке form-after-text */
.form-after-text__label {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-wrap: wrap;
  font-size: 17px;
}

.form-after-text__checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #DB0075;
  background: #FFFFFF;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
}

.form-after-text__checkbox::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 4.5px;
  top: 1.5px;
  left: 2px;
  border: 3px solid transparent;
  border-left-color: #ffffff;
  border-bottom-color: #ffffff;
  transform: rotate(-45deg);
}

.form-after-text__checkbox:checked {
  background: #DB0075;
  border-color: #DB0075;
}

.form-after-text__error {
  margin-top: 6px;
  font-size: 15px;
  color: #DB0075;
  display: none;
}

.phone-error {
  margin-top: 6px;
  font-size: 13px;
  color: #DB0075;
}

.telegram-error {
  margin-top: 6px;
  font-size: 13px;
  color: #DB0075;
}

.form-container__form-popup .btn-submit:disabled,
.form-container__form .btn-submit:disabled {
  background-color: #D9D9D9;
  border-color: #D9D9D9;
  cursor: default;
}

.form-container__form-popup .form-submit-error,
.form-container__form .form-submit-error {
  margin-top: 12px;
  font-size: 14px;
  color: #DB0075;
}

/* Центрирование и display:flex только для окна успешной отправки */
.form-success-text-popup.modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* Чтобы диалог корректно вёл себя внутри flex-контейнера */
.form-success-text-popup .modal-dialog {
  margin: 0 auto;
  max-height: calc(100vh - 40px);
}

/* Скролл содержимого, если оно не помещается по высоте */
.form-success-text-popup .modal-content {
  max-height: 100%;
  overflow-y: auto;
}

/* Попап формы заявки – фиксируем нормальное поведение модалки и скролл */
.form-container__form-popup.modal {
  /* Не даём контейнеру формы становиться flex-контейнером */
  display: block;
}

.form-container__form-popup.modal.show {
  /* Если форма по высоте больше окна, разрешаем скролл внутри модалки */
  overflow-y: auto;
}

.form-container__form-popup .modal-dialog {
  /* Центрируем диалог и ограничиваем его высоту относительно окна */
  margin: 30px auto;
  max-height: calc(100vh - 40px);
}

.form-container__form-popup .modal-content {
  /* Если содержимое выше диалога — скроллим только его, а не всю страницу */
  max-height: 100%;
  overflow-y: auto;
}

.modal-dialog {
    margin-left: auto;
    margin-right: auto;
}

/* Центрирование модального окна */
.modal-dialog-centered {
    display: flex;
    align-items: center;
}

/* Тело модального окна */
.modal-body {
    position: relative;
    padding: 40px;
    background-color: #FFFDFB;
    max-width: 439px;
    border-radius: 30px;
}

/* Фон модального окна (backdrop) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    background-color: #000000CC;
}

body > div.listing_popup_storage > div > div.form-success-text-popup.modal.fade.show > div > div > div.modal-body > noindex > div.success-text-h2 {
    font-family: 'DrukWideCyr';
    font-weight: 700;
    font-size: 32px;
    line-height: 130%;
}

body > div.listing_popup_storage > div > div.form-success-text-popup.modal.fade.show > div > div > div.modal-body > noindex > div.success-text {
    font-family: 'Montserrat';
    font-weight: 400;
    font-size: 20px;
    line-height: 100%;
    margin-top: 10px;
    color: #1F2D26;
}

.captcha-error {
    color: #DB0075;
}



/* Адаптивность */
@media (max-width: 767px) {
  .form-container__form-popup .widget-form,
  .form-container__form .widget-form {
    padding: 24px 18px 24px 18px;
    border-radius: 24px;
  }

  .widget-form .contact-combo,
  .widget-form .double-column-group {
    flex-direction: column;
  }

  .widget-form .submit-field-wrapper {
    justify-content: stretch;
  }

  .widget-form .btn_red.btn-submit {
    width: 100%;
    text-align: center;
  }

  [data-form-id="3325"] .custom-select__menu {
    max-height: 220px;
  }
}


@media (max-width: 590px) {
  .form-container__form-popup .widget-form, .form-container__form .widget-form {
    align-items: stretch;
    padding: 30px 20px 20px;
  }
  .form-container__form-popup .form-title {
    font-size: 20px;
  }
  .form-field-group.form-field-group--contact-person {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .form-field-group.form-field-group--person-age, .widget-form .contact-combo {
    max-width: none;
  }
  .form-field-group.form-field-group--person-age {
    margin-left: 0;
  }
  #popup-messia-form-3325 > div > form > div.form-field-group.form-field-group--contact-person > div.form-field-wrapper.contact-combo {
    gap: 10px;
  }
  #popup-messia-form-3325 > div > form > div.form-field-wrapper.text-field-wrapper {
    margin-top: 20px;
  }
  .widget-form .text-field, .widget-form .email-field, .widget-form .phone-field, .widget-form .textarea-field, .widget-form .select-field {
    font-size: 16px;
  }
  #popup-messia-form-3325 > div > form > div.form-field-group.form-field-group--contact-person > div.form-field-group.form-field-group--person-age {
    gap: 12px;
  }
  [data-form-id="3325"] .form-field-wrapper.textarea-field-wrapper > label {
    margin-top: 16px;
  }
  .widget-form .text-field-label, .widget-form .textarea-field-label, .widget-form .email-field-label, .widget-form .phone-field-label, .widget-form .select-field-label, .widget-form .checkbox-field-label {
    font-size: 16px;
  }
  .form-after-text__label {
    font-size: 15px;
  }
  [data-form-id="3325"] .form-after-text__text {
    margin-left: 32px;
  }
  [data-form-id="3325"] .form-field-group.form-field-group--submit-captcha {
    flex-direction: column;
    margin-top: 10px;
  }
  .widget-form .g-recaptcha {
    margin-top: 0;
  }
  .widget-form .submit-field-wrapper {
    margin-top: 20px;
  }


  .form-field-group.form-field-group--submit-captcha .g-recaptcha iframe {
    width: 100% !important;
  }
    /* Группа reCAPTCHA + кнопка — в колонку */
  .form-field-group.form-field-group--submit-captcha {
    flex-direction: column;
    align-items: stretch;
  }

  /* Обёртка кнопки на всю ширину */
  .form-field-group.form-field-group--submit-captcha .submit-field-wrapper {
    width: 100%;
  }

  /* Сама кнопка на всю ширину */
  .form-field-group.form-field-group--submit-captcha .btn_red.btn-submit {
    width: 100%;
    max-width: none;    /* ← ключевая строка */
    display: block;     /* на всякий случай, чтобы не было флексовых ограничений */
  }

  [data-form-id="3325"] .custom-select__trigger {
    font-size: 16px;
  }

  .widget-form .btn_red.btn-submit {
    height: 50px;
    font-size: 16px;
  }

  .form-success-text-popup .modal-content {
    position: relative;
  }

  .modal-body {
    max-width: none;
    width: 100%;
    padding: 20px 20px 64px; /* снизу оставляем место под кнопку */
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 30px 30px 0 0;
    height: 346px;
  }
  .form-success-text-popup.modal.show {
    align-items: flex-end;
  }
  body > div.listing_popup_storage > div > div.form-success-text-popup.modal.fade.show > div > div > div.modal-body > img {
    height: 100px;
  }
  body > div.listing_popup_storage > div > div.form-success-text-popup.modal.fade.show > div > div > div.modal-body > noindex > div.success-text-h2 {
    font-size: 20px;
  }
  body > div.listing_popup_storage > div > div.form-success-text-popup.modal.fade.show > div > div > div.modal-body > noindex {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 12px;
  }
  body > div.listing_popup_storage > div > div.form-success-text-popup.modal.fade.show > div > div > div.modal-body > noindex > div.success-text {
    font-size: 16px;
  }
  body > div.listing_popup_storage > div > div.form-success-text-popup.modal.fade.show > div > div > div.modal-body > noindex > div.success-text {
    text-align: center;
  }

  /* Мобильная кнопка закрытия модалки как большая кнопка "Отлично" */
  .form-success-text-popup .close {
    position: absolute;
    left: 50%;
    top: 65%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 335px;
    height: 52px;
    border-radius: 26px; /* radius medium */
    padding: 14px 40px 16px 40px;
    background: #DB0075;
    color: #FFFFFF;
    border: none;
    opacity: 1;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    cursor: pointer;
    margin: 0;
  }

  /* Прячем стандартный крестик и ПОЛНОСТЬЮ переопределяем ::after */
  .form-success-text-popup .close span,
  .form-success-text-popup .close::before {
    display: none !important;
  }

  .form-success-text-popup .close::after {
    content: 'Отлично';
    display: block;
    /* Полный сброс чужих стилей из глобального .close:after */
    position: static !important;
    background-color: transparent !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
  }
}
