/* Стили для модального окна калькулятора */

.calculator-modal {
  z-index: 10000;
}

.calculator-content {
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

/* Прогресс бар */
.progress-container {
  margin-bottom: 32px;
  text-align: center;
}

.progress-text {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FCC419 0%, #F59E0B 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 25%;
}

/* Заголовки шагов */
.step-title {
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #101113;
  margin-bottom: 24px;
  line-height: 1.3;
}

/* Блоки вопросов */
.question-block {
  margin-bottom: 32px;
}

.question-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.question-icon {
  color: #6B7280;
  flex-shrink: 0;
}

.question-text {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #101113;
  line-height: 1.4;
}

/* Сетка опций */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-item input[type="radio"] {
  width: 20px;
  height: 20px;
  border: 2px solid #D1D5DB;
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.option-item input[type="radio"]:hover {
  border-color: #FCC419;
}

.option-item input[type="radio"]:checked {
  border-color: #FCC419;
  background: #FCC419;
}

.option-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #101113;
  border-radius: 50%;
}

.option-item input[type="radio"]:checked + .option-text {
  font-weight: 600;
  color: #101113;
}

.option-text {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #374151;
  line-height: 1.4;
  cursor: pointer;
}

/* Навигационные кнопки */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #E5E7EB;
}

.nav-button {
  padding: 12px 24px;
  border-radius: 12px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 100px;
}

.prev-button {
  background: #F3F4F6;
  color: #374151;
}

.prev-button:hover {
  background: #E5E7EB;
}

.next-button {
  background: #FCC419;
  color: #101113;
  margin-left: auto;
}

.next-button:hover {
  background: #F59E0B;
  transform: translateY(-1px);
}

.next-button:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
}

/* Финальная форма */
.final-form .form-group {
  margin-bottom: 20px;
}

.final-form .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.final-form .input-icon {
  position: absolute;
  left: 16px;
  z-index: 1;
  pointer-events: none;
}

.final-form .form-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 2px solid #E5E7EB;
  border-radius: 16px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #101113;
  background: #F9FAFB;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.final-form .form-input:focus {
  outline: none;
  border-color: #FCC419;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(252, 196, 25, 0.1);
}

.final-form .form-input.error {
  border-color: #EF4444 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
  animation: shake 0.5s ease-in-out;
}

.final-form .form-input::placeholder {
  color: #9CA3AF;
}

.calc-submit-button {
  width: 100%;
  padding: 16px 24px;
  background: #FCC419;
  border: none;
  border-radius: 16px;
  font-family: "Unbounded", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #101113;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calc-submit-button:hover {
  background: #F59E0B;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(252, 196, 25, 0.4);
}

.calc-submit-button:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Скрытие шагов */
.step-content {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Адаптивность */
@media (max-width: 768px) {
  .calculator-content {
    margin: 8px;
    padding: 16px !important;
    max-height: 92vh !important;
    border-radius: 16px !important;
  }
  
  .progress-container {
    margin-bottom: 16px !important;
  }
  
  .progress-text {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }
  
  .step-title {
    font-size: 16px !important;
    margin-bottom: 16px !important;
    line-height: 1.2 !important;
  }
  
  .question-block {
    margin-bottom: 20px !important;
  }
  
  .question-header {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  
  .question-text {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }
  
  .options-grid {
    grid-template-columns: 1fr;
    gap: 10px !important;
  }
  
  .option-item {
    gap: 10px !important;
  }
  
  .option-item input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
  }
  
  .option-text {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }
  
  .navigation-buttons {
    flex-direction: column;
    gap: 10px !important;
    margin-top: 20px !important;
    padding-top: 16px !important;
  }
  
  .nav-button {
    width: 100%;
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
  
  .next-button {
    margin-left: 0;
    order: -1;
  }
  
  .final-form .form-group {
    margin-bottom: 12px !important;
  }
  
  .final-form .form-input {
    padding: 12px 12px 12px 40px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
  }
  
  .final-form .input-icon {
    left: 12px !important;
    width: 18px !important;
    height: 18px !important;
  }
  
  .calc-submit-button {
    padding: 12px 20px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    margin-top: 4px !important;
  }
}

@media (max-width: 480px) {
  .calculator-content {
    margin: 5px;
    padding: 14px !important;
    max-height: 94vh !important;
  }
  
  .progress-container {
    margin-bottom: 12px !important;
  }
  
  .step-title {
    font-size: 15px !important;
    margin-bottom: 14px !important;
  }
  
  .question-block {
    margin-bottom: 16px !important;
  }
  
  .question-header {
    gap: 6px !important;
    margin-bottom: 10px !important;
  }
  
  .question-text {
    font-size: 13px !important;
  }
  
  .options-grid {
    gap: 8px !important;
  }
  
  .option-item {
    gap: 8px !important;
  }
  
  .option-text {
    font-size: 13px !important;
  }
  
  .navigation-buttons {
    margin-top: 16px !important;
    padding-top: 12px !important;
    gap: 8px !important;
  }
  
  .nav-button {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  
  .final-form .form-group {
    margin-bottom: 10px !important;
  }
  
  .final-form .form-input {
    padding: 10px 10px 10px 36px !important;
    font-size: 14px !important;
  }
  
  .final-form .input-icon {
    left: 10px !important;
    width: 16px !important;
    height: 16px !important;
  }
  
  .calc-submit-button {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
}
