/* ==========================================================================
   ИСПРАВЛЕНИЕ СКРОЛЛА И АДАПТИВНОСТЬ ТЕСТА
   ========================================================================== */
.test-container { 
  max-width: 750px; 
  margin: 40px auto; 
  padding: 30px; 
  background: #fff; 
  border-radius: 12px; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
  font-family: Arial, sans-serif; 
  box-sizing: border-box !important; /* Удерживает внутренние отступы внутри блока */
  width: 100% !important;
}
.test-container h1 { 
  color: #0b1727; 
  font-size: 24px; 
  text-align: center; 
  margin-bottom: 20px; 
}
.form-group { 
  margin-bottom: 20px; 
}
.form-group label { 
  display: block; 
  font-weight: bold; 
  margin-bottom: 8px; 
  color: #333; 
}

/* Принудительно ограничиваем ширину инпутов под размер экрана */
.form-group input[type="text"], 
.form-group input[type="email"] { 
  width: 100% !important; 
  max-width: 100% !important;
  padding: 12px; 
  border: 1px solid #ccc; 
  border-radius: 6px; 
  box-sizing: border-box !important; 
  font-size: 16px; 
}
.question-block { 
  background: #f9f9f9; 
  padding: 20px; 
  border-radius: 8px; 
  margin-bottom: 20px; 
  border-left: 4px solid #009246; 
}
.question-title { 
  font-weight: bold; 
  font-size: 16px; 
  margin-bottom: 12px; 
  color: #111; 
  word-break: break-word; /* Перенос длинных строк */
}
.answer-option { 
  display: flex; 
  align-items: center; 
  margin-bottom: 8px; 
  cursor: pointer; 
}
.answer-option input { 
  margin-right: 10px; 
  width: 18px; 
  height: 18px; 
}
.submit-test-btn { 
  background: #009246; 
  color: white; 
  border: none; 
  padding: 14px 28px; 
  font-size: 16px; 
  font-weight: bold; 
  border-radius: 6px; 
  cursor: pointer; 
  width: 100%; 
  text-transform: uppercase; 
  transition: background 0.3s; 
}
.submit-test-btn:hover { 
  background: #27ae60; 
}

/* Стили Модального окна Согласий */
.modal-overlay { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background: rgba(0,0,0,0.6); 
  z-index: 20000; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}
.consent-modal { 
  background: #fff; 
  width: 90%; 
  max-width: 500px; 
  border-radius: 14px; 
  padding: 25px; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
  font-family: Arial, sans-serif; 
  box-sizing: border-box; 
}
.consent-modal h3 { 
  margin-top: 0; 
  color: #0b1727; 
  font-size: 18px; 
  border-bottom: 1px solid #eee; 
  padding-bottom: 10px; 
  text-align: center; 
}
.consent-item { 
  display: flex !important; 
  align-items: flex-start !important; 
  justify-content: flex-start !important; 
  margin-bottom: 15px; 
  font-size: 14px; 
  color: #444; 
  line-height: 1.4; 
  text-align: left !important;            
}
.consent-item input { 
  margin: 3px 12px 0 0 !important;        
  min-width: 18px !important; 
  min-height: 18px !important; 
  width: 18px !important;
  height: 18px !important;
  cursor: pointer; 
  flex-shrink: 0 !important;              
}
.consent-item label {
  text-align: left !important;
  cursor: pointer;
}
.consent-item label a {
  color: #009246;
  text-decoration: underline;
}
.consent-item label a:hover {
  text-decoration: none;
}
.consent-buttons { 
  display: flex; 
  gap: 10px; 
  margin-top: 20px; 
}
.consent-btn { 
  flex: 1; 
  padding: 12px; 
  border: none; 
  border-radius: 6px; 
  font-weight: bold; 
  cursor: pointer; 
  text-transform: uppercase; 
  font-size: 13px; 
  transition: 0.3s; 
}
.btn-agree { 
  background: #009246; 
  color: white; 
}
.btn-agree:hover {
  background: #27ae60;
}
.btn-agree:disabled { 
  background: #ccc; 
  cursor: not-allowed; 
  color: #888; 
}
.btn-disagree { 
  background: #eee; 
  color: #333; 
}
.btn-disagree:hover {
  background: #ddd;
}
.select-all-box { 
  background: #f5f5f5; 
  padding: 10px; 
  border-radius: 6px; 
  margin-bottom: 15px; 
  font-weight: bold; 
}

/* ==========================================================================
   КАСТОМНОЕ УВЕДОМЛЕНИЕ ОБ УСПЕШНОЙ ОТПРАВКЕ ТЕСТА
   ========================================================================== */
.success-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(11, 23, 39, 0.8); 
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-modal-card {
  background: #fff;
  width: 90%;
  max-width: 450px;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  box-sizing: border-box;
  animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.success-modal-icon {
  width: 60px;
  height: 60px;
  background: #e8f5e9;
  color: #009246;
  font-size: 32px;
  line-height: 60px;
  border-radius: 50%;
  margin: 0 auto 20px auto;
  font-weight: bold;
}
.success-modal-card h3 {
  margin: 0 0 10px 0;
  color: #0b1727;
  font-size: 20px;
}
.success-modal-card p {
  color: #555;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 25px 0;
}
.success-modal-btn {
  background: #009246;
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  width: 100%;
  transition: background 0.2s;
}
.success-modal-btn:hover {
  background: #27ae60;
}

/* ==========================================================================
   РАДИКАЛЬНОЕ БЛОКИРОВАНИЕ ГОРИЗОНТАЛЬНОГО СКРОЛЛА СТРАНИЦЫ ТЕСТИРОВАНИЯ
   ========================================================================== */

/* Полностью отсекаем боковой скролл на уровне окна отображения и документа */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Принудительно ограничиваем глобальный родительский класс темы сайта */
.wrapper {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Фиксируем черную шапку сайта в границах экрана */
.header {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Устраняем возможные длинные текстовые сущности, способные растянуть ширину */
.test-container *, 
.question-block * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  word-break: break-word; /* Позволяет переносить длинный контент */
}


@keyframes scaleUp {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Жесткое подавление бокового скролла на мобильных для изоляции */
@media (max-width: 768px) {
  .test-container {
    margin: 10px auto;
    padding: 15px;      
    border-radius: 0;
  }
}
