/* Стили для пошагового интерфейса калькулятора */

/* Навигация по шагам */
.steps-navigation {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
    padding: 0 10px;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: 1;
}

.step.active:not(:last-child)::after {
    background: #007bff;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    font-weight: bold;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background: #007bff;
}

.step-label {
    font-size: 14px;
    color: #666;
    display: block;
}

.step.active .step-label {
    color: #007bff;
    font-weight: bold;
}

.progress-bar {
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
}

/* Контент шагов */
.step-content {
    display: none;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.step-content.active {
    display: block;
}

.step-content h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

/* Навигационные кнопки */
.step-navigation {
    margin-top: 30px;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 0 10px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-default {
    background: #6c757d;
    color: white;
}

.btn-default:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Анимации */
.step-content {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .step-indicator {
        flex-direction: column;
        gap: 15px;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .step {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .step-number {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .step-navigation {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        margin: 5px 0;
        width: 100%;
    }
}

/* Валидация */
.step-content .error-field {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.step-content .error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Состояние загрузки */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}