/* Скрытие инпутов */
.visually-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Анимация появления */
.full-survey {
  animation: fadeInDown 0.5s ease forwards;
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Обертка варианта */
.input-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
  margin-bottom: 10px;
  background: #fff;
}
.input-wrap:hover {
  border-radius: 2px;
  border: 1px solid var(--accent-owen-9-base, #157f8a);
}

/* Текстовое поле внутри */
.input-wrap--text .text-input {
  border: none;
  background: transparent;
  font-size: 1rem;
  width: 100%;
  outline: none;
  color: #333;
}
.input-wrap--text:focus-within {
  border-radius: 2px;
  border: 1px solid var(--Black, #000);
}

/* Чекбокс кастом */
.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.custom-checkbox input {
  position: absolute;
  opacity: 0;
}
.checkbox-svg {
  width: 20px;
  height: 20px;
  border: 1.4px solid #000;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  transition: all 0.2s;
}
.checkbox-svg svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
  stroke: #fff;
  display: block;
}
.custom-checkbox input:checked + .checkbox-svg {
  background-color: #0056b3;
  border-color: #0056b3;
}
.custom-checkbox input:checked + .checkbox-svg svg {
  opacity: 1;
  transform: scale(1);
}

/* === ОШИБКИ (Красная рамка) === */
/* Применяется к блоку вопроса (.form-item), если он не заполнен при нажатии кнопки */
.form-item.is-error {
  border: 1px solid #d32f2f;
  background-color: #fff5f5;
  padding: 15px; /* Небольшой отступ чтобы рамка не резала контент */
  border-radius: 4px;
}
.form-item.is-error .form-item-title {
  color: #d32f2f;
}

/* Ошибка в контактной форме */
.form__input.error-border {
  border-color: #d32f2f !important;
  background-color: #fff5f5;
}

/* Кнопки */
.btn:disabled,
button:disabled,
.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

#btn-open-modal-choice {
  display: flex;
  min-height: 56px;
  padding: 11px 24px;
  justify-content: center;
  align-items: center;
  gap: 4px;

  border-radius: 2px;
  border: 1px solid var(--accent-owen-9-base, #157f8a);
  background: none;
  color: var(--accent-owen-9-base, #157f8a);

  /* Regular text/Regular Text 20 */
  font-family: "Inter";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 24px */
  letter-spacing: -0.6px;
  cursor: pointer;
}

/* Модалка */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
/* .modal-window {
  box-sizing: border-box;
  background: var(--White, #fff);
  padding: 30px;
  max-width: 1200px;
  height: 688px;
  overflow-y: auto;
  position: relative;
} */

.modal-window {
  box-sizing: border-box;
  display: flex;
  padding: 80px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  background: var(--White, #fff);
  max-height: 688px;
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}

.form-section {
  display: flex;
  padding: 100px 80px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  background: var(--White, #fff);
}
.from-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 1240px;
  padding: 60px;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  border: 1px solid var(--Black, #000);
  background: var(--White, #fff);
}

.form-wrap-bg {
  background: url(../img/form.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
}

.form-header-first {
  display: flex;
  max-width: 660px;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  align-self: stretch;
  grid-row: 1 / span 1;
  grid-column: 1 / span 1;
  justify-self: stretch;
}

.form-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;
  color: var(--Black, #000);

  /* H3 */
  font-family: "Inter";
  font-size: 54px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%; /* 54px */
  letter-spacing: -2.7px;
}

.form-title {
  color: var(--Black, #000);

  /* H3 */
  font-family: "Inter";
  font-size: 54px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%; /* 54px */
  letter-spacing: -2.7px;
}
.form-subtitle {
  color: var(--Black, #000);

  /* Regular text/Regular Text 17 */
  font-family: "Inter";
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 20.4px */
  letter-spacing: -0.51px;
}
.survey-intro {
}

.question-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  align-self: stretch;
}

.form-item {
}
.form-item-num {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.num-main {
  color: var(--body-body-element-text-icons, #000);

  /* Bold text/Bold text 17 */
  font-family: "Inter";
  font-size: 17px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%; /* 20.4px */
  letter-spacing: -0.51px;
}
.num-separator {
  color: var(--Neutral-5, #7e8386);

  /* Regular text/Regular Text 14 */
  font-family: "Inter";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 16.8px */
  letter-spacing: -0.42px;
}
.num-total {
  color: var(--Neutral-5, #7e8386);

  /* Regular text/Regular Text 14 */
  font-family: "Inter";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 16.8px */
  letter-spacing: -0.42px;
}

.form-item-title {
  color: var(--Black, #000);

  /* Bold text/Bold text 20 */
  font-family: "Inter";
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%; /* 24px */
  letter-spacing: -0.6px;
}
.form-item-inputs {
  width: 100%;
  display: grid;
  row-gap: 20px;
  column-gap: 20px;
  align-self: stretch;
  grid-template-rows: repeat(2, fit-content(100%));
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#full-survey-block .survey-item[data-step="2"] .form-item-inputs,
#full-survey-block .survey-item[data-step="3"] .form-item-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 20px;
  column-gap: 20px;
  width: 100%;
}

#full-survey-block .survey-item[data-step="10"] .input-wrap--text {
  grid-row: 1 / span 1;
}

/* 2. Растягиваем блок "Свой вариант" на 2 колонки только в этих вопросах */
#full-survey-block .survey-item[data-step="2"] .input-wrap--text,
#full-survey-block .survey-item[data-step="3"] .input-wrap--text {
  grid-column: span 2;
}

.input-wrap {
}
.visually-hidden {
}
.custom-radio {
}

/* 1. Скрываем стандартный радио-инпут */
.input-wrap input.visually-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* 2. Базовые размеры для кастомного элемента */
.input-wrap .custom-radio {
  width: 20px;
  height: 20px;
  flex-shrink: 0; /* Чтобы не сжимался в flex-контейнере */
  display: inline-block;
  position: relative;
}

/* 3. Неактивное состояние (черный круг) - по умолчанию */
.input-wrap .custom-radio::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='10' cy='10' r='9.3' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* 4. Активное состояние (зеленый круг с галочкой) - при checked */
.input-wrap input.visually-hidden:checked + .custom-radio::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23157F8A'/%3E%3Cg clip-path='url(%23clip0_180_942)'%3E%3Cpath d='M5.45508 10.9006L8.26799 13.5935L14.4552 7.40626' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_180_942'%3E%3Crect width='11' height='11' fill='white' transform='translate(4.45508 5)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
}

.input-text {
  color: var(--Black, #000);

  /* Text/Text_17_Regular */
  font-family: "Inter";
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 132%; /* 22.44px */
}
.input-wrap--text {
  display: flex;
  height: 96px;
  padding: 20px;
  align-items: flex-start;
  align-content: flex-start;
  gap: 12px;
  align-self: start;
  flex-wrap: wrap;
  grid-row: 2 / span 1;
  grid-column: 2 / span 2;
  justify-self: stretch;
}
.input-wrap--text .text-input {
  display: flex;
  padding: 17px 20px;
  align-items: center;
  gap: 10px;
  flex: 1 0 0;

  overflow: hidden;
  color: var(--Neutral-6, #5a5d60);
  text-overflow: ellipsis;

  /* Text/Text_17_Regular */
  font-family: "Inter";
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 132%; /* 22.44px */

  border-radius: 2px;
  border: 1px solid var(--Black, #000);
}

.text-input-q9 {
  border: none;
  overflow: hidden;
  color: var(--Neutral-6, #5a5d60);
  text-overflow: ellipsis;

  /* Text/Text_17_Regular */
  font-family: "Inter";
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 132%; /* 22.44px */

  border: none;
  outline: none;
}

.survey-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
}
.btn {
  background: var(--accent-owen-9-base, #157f8a);
  transition: background var(--button-transition);
  cursor: pointer;
}

.btm:hover {
  background: var(--Accent-Owen-10, #066a74);
  backdrop-filter: blur(30px);
  transition: background var(--button-transition);
}

.btn--primary {
  display: flex;
  min-height: 56px;
  padding: 16px 24px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 2px;
  background: var(--accent-owen-9-base, #157f8a);
  backdrop-filter: blur(30px);
  color: var(--White, #fff);

  /* Regular text/Regular Text 20 */
  font-family: "Inter";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 24px */
  letter-spacing: -0.6px;
  outline: none;
  border: none;
}

.btn--cancel {
  display: flex;
  height: 56px;
  min-height: 56px;
  padding: 11px 24px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: none;
  color: var(--accent-owen-9-base, #157f8a);

  /* Regular text/Regular Text 20 */
  font-family: "Inter";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 24px */
  letter-spacing: -0.6px;

  outline: none;
  border-radius: 2px;
  border: 1px solid var(--accent-owen-9-base, #157f8a);
  backdrop-filter: blur(30px);
}

.btn--cancel:hover {
}

.full-survey {
}

.survey-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  gap: 20px;
}

/* Скрываем стандартный чекбокс */
.input-wrap input.visually-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Базовые стили для кастомного чекбокса ОВЕН */
.custom-checkbox-owen {
  width: 20px;
  height: 20px;
  border: 1.4px solid #000; /* Черная рамка в неактивном состоянии */
  border-radius: 4px; /* Квадратная форма */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  transition: all 0.2s ease;
  position: relative;
  margin-right: 12px; /* Отступ до текста */
}

/* Галочка внутри (псевдоэлемент) */
.custom-checkbox-owen::after {
  content: "";
  width: 8px;
  height: 8px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
  /* Встроенный SVG галочки */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8' fill='none'%3E%3Cg clip-path='url(%23clip0_191_3166)'%3E%3Cpath d='M0.727539 4.29156L2.77329 6.25L7.27311 1.75018' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_191_3166'%3E%3Crect width='8' height='8' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  display: block;
}

/* Состояние: Чекбокс выбран */
.input-wrap input.visually-hidden:checked + .custom-checkbox-owen {
  border-color: var(--accent-owen-9-base, #157f8a);
  background: var(--accent-owen-9-base, #157f8a);
}

/* Показываем галочку при выборе */
.input-wrap input.visually-hidden:checked + .custom-checkbox-owen::after {
  opacity: 1;
  transform: scale(1);
}

/* Ховер эффект для удобства (опционально) */
.input-wrap:hover .custom-checkbox-owen {
  border-color: var(--accent-owen-9-base, #157f8a);
}

#survey-full-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  align-self: stretch;
}

.modal-title {
  color: var(--Black, #000);

  /* H3 */
  font-family: "Inter";
  font-size: 54px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%; /* 54px */
  letter-spacing: -2.7px;
}

.form-wrap {
  display: inline-grid;
  row-gap: 20px;
  column-gap: 20px;
  align-self: stretch;
  grid-template-rows: repeat(3, fit-content(100%));
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  align-self: stretch;
}

.modal-form {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.modal-form-wrap {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: inline-grid;
  row-gap: 20px;
  column-gap: 20px;
  align-self: stretch;
  grid-template-rows: repeat(3, fit-content(100%));
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form__input {
  box-sizing: border-box;
  display: flex;
  padding: 17px 20px;
  align-items: center;
  gap: 10px;
  flex: 1 0 0;
  border-radius: 2px;
  border: 1px solid var(--Black, #000);
}

.form__input-label--text-grid {
  position: relative;
  display: flex;
  height: 112px;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  grid-row: 3 / span 1;
  grid-column: 1 / span 2;
  justify-self: stretch;
}

.form__input--text {
  width: 100%;
}

.text-number {
  position: absolute;
  bottom: 0px;
  right: 10px;
  color: var(--Neutral-6, #5a5d60);
  text-align: right;
  font-family: "Inter";
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
}

.agreement-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
  grid-column: 1 / -1;
}

.agreement {
  color: var(--Black, #000);

  /* Regular text/Regular Text 17 */
  font-family: "Inter";
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 20.4px */
  letter-spacing: -0.51px;
}

.agreement__link {
  color: var(--Primary-2, var(--9-base, #f58220));

  /* Regular text/Regular Text 17 */
  font-family: "Inter";
  font-size: 17px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 20.4px */
  letter-spacing: -0.51px;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: none;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.choice-buttons {
  display: flex;
  max-width: 300px;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  align-self: stretch;
  grid-row: 1 / span 1;
  grid-column: 1 / span 1;
  justify-self: stretch;
}

.btn--large {
  width: 100%;
}

@media (max-width: 960px) {
  .form-item-inputs {
    display: flex;
    flex-direction: column;
  }

  #full-survey-block .survey-item[data-step="2"] .form-item-inputs,
  #full-survey-block .survey-item[data-step="3"] .form-item-inputs {
    display: flex;
    flex-direction: column;
  }

  #full-survey-block .survey-item[data-step="10"] .input-wrap--text {
    box-sizing: border-box;
    width: 100%;
  }

  .input-wrap--text {
    box-sizing: border-box;
    width: 100%;
  }
}

@media (min-width: 480px) and (max-width: 760px) {
  .form-title {
    font-size: 36px;
  }

  .form-item-inputs {
    display: flex;
    flex-direction: column;
  }

  .form-section {
    padding: 80px 40px;
  }

  .from-wrap {
    padding: 40px;
  }
}

@media (max-width: 480px) {
  .form-title {
    color: var(--Black, #000);

    /* H4 */
    font-family: "Inter";
    font-size: 36px;
    font-style: normal;
    font-weight: 400;
    line-height: 100%; /* 36px */
    letter-spacing: -1.8px;
  }

  .form-section {
    padding: 80px 20px;
  }

  .from-wrap {
    display: grid;
    min-height: 688px;
    max-width: 1240px;
    row-gap: 40px;
    column-gap: 40px;
    align-self: stretch;
    grid-template-rows: repeat(1, minmax(0, 1fr));
    grid-template-columns: minmax(0, 2fr);

    padding: 0;

    border: none;
  }

  .form-subtitle {
    padding-bottom: 20px;
  }

  .form-item-inputs {
    display: flex;
    flex-direction: column;
  }

  .input-wrap--text {
    box-sizing: border-box;
    width: 100%;
  }

  .input-wrap .input-wrap--text {
    width: 100%;
  }

  .survey-controls {
    flex-direction: column;
    gap: 40px;
  }

  #btn-start-cancel {
    width: 100%;
  }

  #btn-finish-survey {
    width: 100%;
  }

  #btn-start-survey {
    width: 100%;
  }

  .modal-form-wrap {
    display: flex;
    flex-direction: column;
  }

  /* .form-header {
    padding: 80px 20px;
  } */

  .survey-intro {
    padding-left: 20px;
    padding-right: 20px;
  }
}
