/* ==========================================================================
   Квиз-калькулятор
   ========================================================================== */

.quiz {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* ---------- Прогресс-бар ---------- */

.quiz__progress {
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  margin-bottom: 32px;
  overflow: hidden;
}

.quiz__progress-bar {
  height: 100%;
  background: #ED9736;
  border-radius: 2px;
  width: 25%;
  transition: width 0.3s ease;
}

/* ---------- Шаги ---------- */

.quiz__step {
  display: none;
  animation: quiz-fade 0.3s ease;
}

.quiz__step.is-active {
  display: block;
}

@keyframes quiz-fade {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quiz__title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #1a1a1a;
}

.quiz__subtitle {
  font-size: 14px;
  color: #888;
  margin: 0 0 24px;
}

/* ---------- Варианты ответа (карточки) ---------- */

.quiz__options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quiz__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 2px solid #eaeaea;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  text-align: left;
  font-size: 15px;
  color: #1a1a1a;
  font-family: inherit;
}

.quiz__option:hover {
  border-color: #ED9736;
  background: #fff8f0;
}

.quiz__option.is-selected {
  border-color: #ED9736;
  background: #fff5e8;
}

.quiz__option-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff5e8;
  border-radius: 10px;
  color: #ED9736;
}

.quiz__option-icon svg {
  width: 22px;
  height: 22px;
}

.quiz__option-text {
  flex: 1;
  font-weight: 500;
}

/* ---------- Поля ввода ---------- */

.quiz__field {
  margin-bottom: 16px;
}

.quiz__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 6px;
}

.quiz__input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #eaeaea;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.quiz__input:focus {
  outline: none;
  border-color: #ED9736;
}

.quiz__input.is-error {
  border-color: #e74c3c;
}

/* ---------- Кнопки ---------- */

.quiz__actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.quiz__btn {
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz__btn--primary {
  background: #ED9736;
  color: #fff;
  flex: 1;
}

.quiz__btn--primary:hover:not(:disabled) {
  background: #d88726;
}

.quiz__btn--primary:disabled {
  background: #ddd;
  cursor: not-allowed;
}

.quiz__btn--back {
  background: transparent;
  color: #888;
  padding: 14px 16px;
}

.quiz__btn--back:hover {
  color: #1a1a1a;
}

/* ---------- Согласие ---------- */

.quiz__consent {
  font-size: 12px;
  color: #999;
  margin-top: 16px;
  line-height: 1.5;
}

.quiz__consent a {
  color: #ED9736;
  text-decoration: underline;
}

/* ---------- Финальный экран «Спасибо» ---------- */

.quiz__success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.quiz__success.is-active {
  display: block;
}

.quiz__success-icon {
  width: 72px;
  height: 72px;
  background: #fff5e8;
  color: #ED9736;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.quiz__success-icon svg {
  width: 36px;
  height: 36px;
}

.quiz__success-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}

.quiz__success-text {
  font-size: 15px;
  color: #666;
  margin: 0;
}

/* ---------- Адаптив ---------- */

@media (max-width: 600px) {
  .quiz {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .quiz__title {
    font-size: 20px;
  }

  .quiz__options {
    grid-template-columns: 1fr;
  }

  .quiz__actions {
    flex-direction: column-reverse;
  }

  .quiz__btn--back {
    width: 100%;
  }
}