/* ============================================================
   QUIZ WRAPPER
   ============================================================ */
.quiz-wrapper {
  max-width: 680px;
  margin: 0 auto;
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
  position: relative;
  padding-bottom: 80px; /* место под стрелки */
}

/* ============================================================
   ПРОГРЕСС-БАР
   ============================================================ */
.quiz-progress {
  margin-bottom: 32px;
}

.quiz-progress-bar {
  height: 3px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: #1a1a2e;
  border-radius: 2px;
  width: 20%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   ШАГ
   ============================================================ */
.quiz-step {
  display: none;
  animation: quizFadeIn 0.3s ease;
}

.quiz-step.active {
  display: block;
}

@keyframes quizFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ЗАГОЛОВОК ШАГА — иконка + вопрос в одну строку
   ============================================================ */
.quiz-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.step-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #1a1a2e;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.quiz-question {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.3;
}

.quiz-hint {
  font-size: 13px;
  color: #888;
  margin: 6px 0 20px 0;
  line-height: 1.5;
}

/* ============================================================
   ВАРИАНТЫ (radio)
   ============================================================ */
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 20px;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: #f2f2f0;
  border: 1.5px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.quiz-option-btn:hover {
  background: #e8e8e4;
  border-color: #1a1a2e;
}

.quiz-option-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.quiz-option-btn:has(input:checked) {
  background: #1a1a2e;
  border-color: #1a1a2e;
}

.quiz-option-btn:has(input:checked) .option-letter,
.quiz-option-btn:has(input:checked) .option-text {
  color: #fff;
}

.quiz-option-btn:has(input:checked) .option-letter {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

.option-letter {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #777;
  transition: all 0.18s ease;
}

.option-text {
  font-size: 15px;
  color: #1a1a2e;
  font-weight: 500;
  transition: color 0.18s ease;
}

/* ============================================================
   ИНПУТЫ
   ============================================================ */
.quiz-input-wrap {
  margin-bottom: 14px;
}

.quiz-text-input {
  width: 100%;
  background: #fff;
  border: none;
  border-bottom: 2px solid #ccc;
  border-radius: 0;
  padding: 12px 4px;
  font-size: 16px;
  color: #1a1a2e;
  box-sizing: border-box;
  height: 50px;
  outline: none;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.2s ease;
}

.quiz-text-input::placeholder {
  color: #bbb;
  font-weight: 400;
}

.quiz-text-input:focus {
  border-bottom-color: #1a1a2e;
  background: #fff;
}

/* intl-tel-input полная ширина */
.quiz-phone-wrap .iti {
  width: 100%;
}

.quiz-phone-wrap .iti__flag-container {
  top: 0;
  bottom: 0;
}

/* ============================================================
   TEXTAREA
   ============================================================ */
.quiz-textarea {
  width: 100%;
  background: #fafafa;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  color: #1a1a2e;
  box-sizing: border-box;
  min-height: 130px;
  resize: vertical;
  outline: none;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.2s ease;
}

.quiz-textarea::placeholder { color: #bbb; }
.quiz-textarea:focus { border-color: #1a1a2e; }

.quiz-char-counter {
  font-size: 12px;
  color: #bbb;
  text-align: right;
  margin-top: 5px;
}

/* ============================================================
   ОШИБКИ
   ============================================================ */
.quiz-field-error {
  font-size: 13px;
  color: #d32f2f;
  margin-top: 8px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiz-field-error:not(:empty)::before {
  content: '⚠';
  font-size: 12px;
}

/* ============================================================
   КНОПКА CONFIRM
   ============================================================ */
.quiz-nav-btn-wrap {
  margin-top: 24px;
}

.quiz-confirm-btn {
  background: #1a1a2e;
  color: #fff;
  border: none;
  padding: 13px 36px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  transition: background 0.2s ease, transform 0.1s ease;
  display: inline-block;
}

.quiz-confirm-btn:hover { background: #2d2d50; }
.quiz-confirm-btn:active { transform: scale(0.98); }

.quiz-submit-btn {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
}

/* ============================================================
   СТРЕЛКИ НАВИГАЦИИ — фиксированы внизу враппера
   ============================================================ */
.quiz-arrows {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  gap: 6px;
}

.quiz-arrow-btn {
  width: auto;
  height: auto;
  border-radius: 6px;
  border: 1px solid #555;
  background: #fff;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.quiz-arrow-btn:hover {
  background: #f5f5f5;
}

.quiz-arrow-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ============================================================
   PRIVACY
   ============================================================ */
.privacy-note {
  font-size: 13px;
  color: #aaa;
  margin: 16px 0 0;
}
.privacy-note a { color: #3687e3; text-decoration: underline; }

/* ============================================================
   ЭКРАН ОТКАЗА (сумма < 3000)
   ============================================================ */
.quiz-rejection {
  padding: 8px 0;
}

.rejection-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 16px;
}

.rejection-body {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 12px;
}

/* ============================================================
   ФИНАЛЬНЫЙ ЭКРАН
   ============================================================ */
.quiz-success {
  animation: quizFadeIn 0.4s ease;
  padding: 8px 0;
}

.quiz-success-icon {
  width: 64px;
  height: 64px;
  background: #2e7d32;
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
}

.quiz-success-title {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 20px;
  line-height: 1.25;
}

.quiz-success-text {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin: 0 0 12px;
}

/* ============================================================
   intl-tel-input fixes
   ============================================================ */
.iti__search-input { height: 30px; }
.iti__country-container { font-size: 15px; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 520px) {
  .quiz-question { font-size: 16px; }
  .quiz-option-btn { padding: 10px 14px; }
  .option-text { font-size: 14px; }
  .quiz-success-title { font-size: 20px; }
}
