/* ==========================================
   БУРГАРАНТ — стили квиза расчёта стоимости
   ========================================== */

.quiz-wrapper {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  max-width: 700px;
  margin: 0 auto 40px;
  padding: 30px 36px 36px;
  position: relative;
  overflow: hidden;
}

/* Прогресс-бар */
.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quiz-step-label {
  text-align: right;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 6px;
  margin-bottom: 16px;
}

/* Заголовок шага */
.quiz-question-title {
  font-family: var(--font-impact);
  font-size: 24px;
  color: var(--color-primary);
  margin: 0 0 20px;
  line-height: 1.2;
  text-align: center;
}

/* Контейнер шагов */
.quiz-steps-container {
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.quiz-step {
  display: none;
  animation: none;
}

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

.quiz-step.slide-out-left {
  animation: slideOutLeft 0.2s ease forwards;
}

.quiz-step.slide-in-right {
  animation: slideInRight 0.2s ease forwards;
}

.quiz-step.slide-out-right {
  animation: slideOutRight 0.2s ease forwards;
}

.quiz-step.slide-in-left {
  animation: slideInLeft 0.2s ease forwards;
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Варианты ответов */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.quiz-option {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  background: #f4f6fb;
  border: 2px solid #e0e6f0;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-text);
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-option:hover {
  background: #e8eef8;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.quiz-option.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.quiz-option-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 30px;
  text-align: center;
}

/* Навигация назад */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 20px;
}

.quiz-back-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 14px;
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s ease;
}

.quiz-back-btn:hover {
  color: var(--color-accent);
}

.quiz-back-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================
   ФИНАЛЬНЫЙ ШАГ — форма
   ========================================== */

.quiz-final-title {
  font-family: var(--font-impact);
  font-size: 26px;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 8px;
}

.quiz-final-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.quiz-form-group {
  margin-bottom: 14px;
}

.quiz-form-group label {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.quiz-form-group input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  background: #f0f0f0;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  color: var(--color-text);
  transition: border-color 0.2s ease;
  font-family: var(--font-main);
}

.quiz-form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #f8f8f8;
}

.quiz-form-group input.error {
  border-color: #c52020;
}

.quiz-submit-btn {
  display: block;
  width: 100%;
  height: 56px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 28px;
  font-family: var(--font-impact);
  font-size: 20px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
  letter-spacing: 0.02em;
}

.quiz-submit-btn:hover {
  background-color: var(--color-primary);
}

.quiz-privacy {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

.quiz-privacy a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.quiz-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.quiz-consent-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  width: 15px;
  height: 15px;
}

.quiz-consent-label a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ==========================================
   РЕЗУЛЬТАТ / РАССЧИТАННАЯ СТОИМОСТЬ
   ========================================== */

.quiz-result {
  display: none;
}

.quiz-result.show {
  display: block;
}

.quiz-result-title {
  font-family: var(--font-impact);
  font-size: 24px;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 20px;
}

.quiz-result-price {
  background: linear-gradient(135deg, #264d83, #3a6fbe);
  color: #fff;
  border-radius: 16px;
  padding: 25px 30px;
  text-align: center;
  margin-bottom: 20px;
}

.quiz-result-price .price-range {
  font-family: var(--font-impact);
  font-size: 32px;
  display: block;
  margin-bottom: 5px;
}

.quiz-result-price .price-label {
  font-size: 14px;
  opacity: 0.9;
}

.quiz-result-details {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.quiz-result-details li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.quiz-result-details li::before {
  content: '✓';
  color: #28a745;
  font-weight: bold;
  flex-shrink: 0;
}

.quiz-result-note {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 20px;
}

.quiz-result-callback {
  background: #e8f4e8;
  border-radius: 10px;
  padding: 16px 20px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: #2d6e2d;
}

/* ==========================================
   СОСТОЯНИЕ ЗАГРУЗКИ / SUCCESS
   ========================================== */

.quiz-loading {
  text-align: center;
  padding: 30px;
  color: var(--color-text-muted);
}

.quiz-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #eee;
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   АДАПТИВ КВИЗА
   ========================================== */

@media screen and (max-width: 768px) {
  .quiz-wrapper {
    padding: 20px 16px 24px;
    border-radius: 12px;
    margin: 0 10px 30px;
  }

  .quiz-question-title {
    font-size: 20px;
  }

  .quiz-option {
    min-height: 56px;
    font-size: 14px;
  }

  .quiz-result-price .price-range {
    font-size: 26px;
  }

  .quiz-submit-btn {
    font-size: 17px;
  }
}

@media screen and (max-width: 480px) {
  .quiz-wrapper {
    padding: 16px 12px 20px;
    margin: 0 5px 20px;
  }

  .quiz-question-title {
    font-size: 18px;
  }

  .quiz-option {
    padding: 10px 14px;
    font-size: 13px;
  }
}
