/* Базовые настройки */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f7fa;
  color: #2b3642;
  margin: 0;
  padding: 20px;
}

.req_form {
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 32px;
}

.title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 28px;
  color: #1a2530;
}

/* Контейнеры полей */
.input-container {
  margin-bottom: 24px;
  position: relative;
  transition: opacity 0.2s, transform 0.2s;
}

/* Скрытые поля: делаем это через display:none, чтобы не занимали место */
.input-container.hidden-field {
  display: none;
}

/* Метки и примечания */
.label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #3a4555;
  margin-bottom: 8px;
}

.input_remark, .input_remark_em {
  display: block;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 4px;
}

.input_remark_em {
  color: #4b5563;
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 6px;
}

/* Поля ввода */
.input, .input_area, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus, .input_area:focus, select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Радио-группы */
.radio_input {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.radio_input label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid #e5e9ed;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  color: #374151;
  font-weight: 400;
  transition: all 0.2s;
}

.radio_input input[type="radio"] {
  margin: 0;
}

.radio_input label:hover {
  border-color: #cbd5e1;
  background: #f9fafb;
}

/* Выделяем выбранный вариант */
.radio_input input[type="radio"]:checked + span,
.radio_input input[type="radio"]:checked ~ label {
  border-color: #4f46e5;
  background: #e0e7ff;
  color: #1e40af;
}
/* Хак: если в label нет span, то сработает второй селектор */

/* Файлы */
.input_file {
  border: 1px dashed #d1d5db;
  background: #fafafa;
}
.input_file:focus {
  border-color: #4f46e5;
  box-shadow: none;
}

/* Ошибки */
.error-msg {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px; /* чтобы верстка не «прыгала» */
  display: none;
  line-height: 1.4;
}

/* Подсвечиваем поле с ошибкой */
.input.error,
.input_area.error,
select.error,
.radio_input.error {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.error-msg.visible {
  display: block;
}

/* Кнопка */
.submit {
  width: 100%;
  padding: 16px 20px;
  background: #1e40af;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit:hover {
  background: #1d3899;
}

.submit:active {
  transform: scale(0.99);
}

/* Адаптив */
@media (max-width: 768px) {
  .radio_input {
    flex-direction: column;
  }
  .radio_input label {
    width: 100%;
    text-align: left;
  }
}
