/*=========================================
  SURVEY INTRO STYLES
  Стили для призыва к действию перед формой
=========================================*/


.survey-intro {
  margin: 0;
  padding: 0;
}

.survey-intro__title {
  font-family: "GothamPro", sans-serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  margin: 0 0 20px 0;
}

.survey-intro__text {
  font-family: "GothamPro", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #000;
  margin: 0 0 20px 0;
}

.survey-intro__bonus {
  font-family: "GothamPro", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #000;
  margin: 0;
}

.survey-intro__bonus strong {
  font-weight: 500;
  color: #000;
}

/*=========================================
  SENDSAY FORM STYLES
  Стили для формы Sendsay в стиле темы Gembox
=========================================*/

/* Обертка формы */
form[action*="sendsay.ru"] {
  max-width: 800px;
  margin: 0;
  padding: 40px 0;
  font-family: "GothamPro", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #000;
}

/* Скрываем <br/> теги */
form[action*="sendsay.ru"] br {
  display: none;
}

/* Основные label (группы вопросов) */
form[action*="sendsay.ru"] > label {
  display: block;
  margin-bottom: 30px;
  font-weight: 400;
}

/* Вложенные label (варианты ответов с radio) */
form[action*="sendsay.ru"] label label {
  display: block;
  position: relative;
  padding-left: 40px;
  margin-bottom: 15px;
  margin-top: 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: #000;
}

/* Стилизация заголовков вопросов */
form[action*="sendsay.ru"] > label {
  font-size: 18px;
  font-weight: 500;
}

/* Специальные стили для первого label (Email) */
form[action*="sendsay.ru"] > label:first-of-type {
  font-size: 16px;
  font-weight: 500;
  color: #000;
  margin-bottom: 25px;
}

/* Вложенные label (варианты ответов) имеют обычный размер */
form[action*="sendsay.ru"] > label label {
  font-size: 16px;
  font-weight: 400;
}

/* Первый текстовый узел в label (заголовок вопроса) */
form[action*="sendsay.ru"] > label > *:first-child:not(input):not(label) {
  display: block;
  margin-bottom: 15px;
}

/* Поля ввода текста и email */
form[action*="sendsay.ru"] input[type="text"],
form[action*="sendsay.ru"] input[type="email"],
form[action*="sendsay.ru"] input[type="tel"],
form[action*="sendsay.ru"] input[name="_member_email"] {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  border: 2px solid #efefef;
  background-color: #ffffff;
  font-family: "GothamPro", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  box-sizing: border-box;
  transition: all 0.3s ease;
  margin-top: 10px;
  display: block;
  outline: none;
}

/* Стили для поля email при наведении */
form[action*="sendsay.ru"] input[type="email"]:hover,
form[action*="sendsay.ru"] input[name="_member_email"]:hover {
  border-color: #d1d1d1;
}

form[action*="sendsay.ru"] input[type="text"]:focus,
form[action*="sendsay.ru"] input[type="email"]:focus,
form[action*="sendsay.ru"] input[type="tel"]:focus,
form[action*="sendsay.ru"] input[name="_member_email"]:focus {
  outline: none;
  border-color: #000;
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

form[action*="sendsay.ru"] input[type="text"]::placeholder,
form[action*="sendsay.ru"] input[type="email"]::placeholder,
form[action*="sendsay.ru"] input[type="tel"]::placeholder {
  color: #959595;
}

/* Скрываем стандартные радио-кнопки */
form[action*="sendsay.ru"] input[type="radio"] {
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

/* Кастомная радио-кнопка */
form[action*="sendsay.ru"] label label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border: 1px solid #000;
  border-radius: 50%;
  background-color: transparent;
  transition: all 0.3s ease;
  z-index: 0;
}

/* Внутренний круг при выборе */
form[action*="sendsay.ru"] label label:has(input[type="radio"]:checked):before {
  background-color: #000;
  border-color: #000;
}

form[action*="sendsay.ru"] label label:has(input[type="radio"]:checked):after {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fff;
  z-index: 1;
}

/* Для браузеров с поддержкой :checked в label */
form[action*="sendsay.ru"] label:has(> input[type="radio"]:checked) label:before {
  background-color: #000;
  border-color: #000;
}

form[action*="sendsay.ru"] label:has(> input[type="radio"]:checked) label:after {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fff;
  z-index: 1;
}

/* Hover эффект для радио-кнопок */
form[action*="sendsay.ru"] label label:hover:before {
  border-color: #000;
}

/* Убираем отступ у последнего элемента в группе */
form[action*="sendsay.ru"] label label:last-child {
  margin-bottom: 0;
}

/* Кнопка отправки */
form[action*="sendsay.ru"] input[type="submit"] {
  width: 100%;
  height: 50px;
  padding: 0;
  background-color: #000;
  color: #ffffff;
  font-family: "GothamPro", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  border: 3px solid #000;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: none;
  transition: all 0.3s ease;
  margin-top: 20px;
  box-sizing: border-box;
}

form[action*="sendsay.ru"] input[type="submit"]:hover {
  background-color: #fff;
  color: #000;
  border-color: #000;
}

form[action*="sendsay.ru"] input[type="submit"]:focus {
  outline: none;
}

/* Fallback для браузеров без поддержки :has() - используем JavaScript класс */
form[action*="sendsay.ru"] label label.radio-checked:before {
  background-color: #000;
  border-color: #000;
}

form[action*="sendsay.ru"] label label.radio-checked:after {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fff;
  z-index: 1;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 760px) {

  .survey-intro__title {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .survey-intro__text,
  .survey-intro__bonus {
    font-size: 16px;
    line-height: 1.4;
  }

  form[action*="sendsay.ru"] {
    padding: 30px 0;
    font-size: 14px;
    line-height: 20px;
  }

  form[action*="sendsay.ru"] > label {
    font-size: 16px;
    margin-bottom: 24px;
  }

  form[action*="sendsay.ru"] label label {
    font-size: 14px;
    line-height: 20px;
    padding-left: 35px;
    margin-bottom: 12px;
  }

  form[action*="sendsay.ru"] input[type="text"],
  form[action*="sendsay.ru"] input[type="email"],
  form[action*="sendsay.ru"] input[type="tel"] {
    height: 40px;
    font-size: 14px;
    padding: 0 12px;
  }

  form[action*="sendsay.ru"] label label:before {
    width: 20px;
    height: 20px;
    top: 0;
  }

  form[action*="sendsay.ru"] label label:has(input[type="radio"]:checked):after {
    left: 5px;
    top: 5px;
    width: 10px;
    height: 10px;
  }

  form[action*="sendsay.ru"] label label.radio-checked:after {
    left: 5px;
    top: 5px;
    width: 10px;
    height: 10px;
  }

  form[action*="sendsay.ru"] input[type="submit"] {
    height: 40px;
    font-size: 14px;
    margin-top: 15px;
  }
}

/*=========================================
  MODAL WINDOW STYLES
  Стили модального окна с промокодом
=========================================*/

#thanks-modal {
  position: fixed;
  inset: 0;
  display: none !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  font-family: 'GothamPro', sans-serif;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#thanks-modal.show {
  display: flex !important;
}

#modal-content {
  background: #fff;
  padding: 40px 30px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

#modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  color: #959595;
  padding: 5px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

#modal-close:hover {
  color: #000;
}

#thanks-modal h3 {
  margin: 0 0 20px;
  font-size: 34px;
  font-weight: 500;
  font-family: 'GothamPro', sans-serif;
  color: #000;
}

#thanks-modal p {
  margin: 0 0 20px;
  font-size: 18px;
  color: #000;
}

#promo-value {
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 30px;
  padding: 15px;
  border: 2px solid #000;
  color: #000;
  letter-spacing: 2px;
  font-family: 'GothamPro', sans-serif;
}

#copy-promo {
  width: 100%;
  height: 50px;
  padding: 0;
  background: #000;
  color: #fff;
  font-family: 'GothamPro', sans-serif;
  font-size: 16px;
  font-weight: 400;
  border: 3px solid #000;
  cursor: pointer;
  transition: all 0.3s ease;
}

#copy-promo:hover {
  background: #fff;
  color: #000;
}

#copy-status {
  margin-top: 15px;
  color: #18a957;
  display: none;
  font-size: 14px;
}

/* Адаптивность модального окна для мобильных устройств */
@media (max-width: 760px) {
  #modal-content {
    padding: 30px 20px;
    width: 95%;
  }

  #thanks-modal h3 {
    font-size: 28px;
    margin-bottom: 15px;
  }

  #thanks-modal p {
    font-size: 16px;
    margin-bottom: 15px;
  }

  #promo-value {
    font-size: 24px;
    padding: 12px;
    margin-bottom: 20px;
  }

  #copy-promo {
    height: 44px;
    font-size: 15px;
  }

  #copy-status {
    font-size: 13px;
    margin-top: 12px;
  }

  #modal-close {
    top: 10px;
    right: 10px;
    font-size: 24px;
  }
}
