/* ─────────────────────────────────────────
   BLOCK: question-modal
   Модальное окно «Задать вопрос».
   Открыт/закрыт через модификатор --open.
   Дизайн: одна колонка, белый фон,
───────────────────────────────────────── */

/* Корневой элемент — скрыт по умолчанию */
.question-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}

/* Модификатор: окно открыто */
.question-modal--open {
  display: block;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__overlay
───────────────────────────────────────── */
.question-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__window
   Белый фон, острые углы, одна колонка
───────────────────────────────────────── */
.question-modal__window {
  position: absolute;
  top: 24%;
  left: 36.5%;
  width: 402px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  background: var(--gray-bg);
  padding: 58px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.20);
  overflow-y: auto;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__header
───────────────────────────────────────── */
.question-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__title
───────────────────────────────────────── */
.question-modal__title {
  font-size: 28px;
  font-weight: 500;
  color: #1a1a1a;
  text-align: center;
  line-height: 1;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__close
   Абсолютно позиционирован в правом верхнем
   углу окна
───────────────────────────────────────── */
.question-modal__close {
  position: absolute;
  top: -44px;
  right: -30px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  z-index: 1;
}
.question-modal__close:hover { color: #1a1a1a; }

/* ─────────────────────────────────────────
   ELEMENT: question-modal__form
───────────────────────────────────────── */
.question-modal__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__field
───────────────────────────────────────── */
.question-modal__field {
  width: 100%;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__input
   Белое поле, острые углы
───────────────────────────────────────── */
.question-modal__input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 0;
  background: #fff;
  font-size: 14px;
  color: #374151;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.question-modal__input::placeholder { color: #9ca3af; }
.question-modal__input:focus { border-color: var(--purple); }

/* ─────────────────────────────────────────
   ELEMENT: question-modal__textarea
───────────────────────────────────────── */
.question-modal__textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 0;
  resize: none;
  border: 1px solid var(--gray-border);
  background: #fff;
  font-size: 14px;
  color: #374151;
  font-family: inherit;
  outline: none;
  min-height: 80px;
  transition: border-color 0.15s;
}
.question-modal__textarea::placeholder { color: #9ca3af; }
.question-modal__textarea:focus { border-color: var(--purple); }

/* ─────────────────────────────────────────
   ELEMENT: question-modal__btn
   Полная ширина, фиолетовый, острые углы
───────────────────────────────────────── */
.question-modal__btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--purple-btn);
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 500;
  resize: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.question-modal__btn:hover { background: var(--purple); }

/* ─────────────────────────────────────────
   ELEMENT: question-modal__consent
───────────────────────────────────────── */
.question-modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__consent-input
   Кастомный чекбокс — фиолетовый при активации
───────────────────────────────────────── */
.question-modal__consent-input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--gray-dark);
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.question-modal__consent-input:checked {
  background: none;
}
.question-modal__consent-input:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid var(--purple);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__consent-label
───────────────────────────────────────── */
.question-modal__consent-label {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* ─────────────────────────────────────────
   ELEMENT: question-modal__consent-link
───────────────────────────────────────── */
.question-modal__consent-link {
  color: var(--gray-text);
  text-decoration: underline;
}
.question-modal__consent-link:hover { text-decoration: none; }
