/**
 * Стили для калькулятора в статьях
 */

.article-calculator {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 16px;
    color: #fff;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: var(--font-size-h3);
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    color: #fff;
}

.calculator-subtitle {
    margin: 0;
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    opacity: 0.9;
}

/* Прогресс */
.calculator-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #fff;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Шаги */
.calculator-steps {
    min-height: 300px;
}

.calculator-step {
    animation: fadeIn 0.3s ease;
}

.calculator-step h4 {
    margin: 0 0 1.5rem 0;
    font-size: var(--font-size-h3);
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-semibold);
    text-align: center;
}

.calculator-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.calculator-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
}

.calculator-option:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.calculator-option.selected {
    background-color: #fff;
    color: var(--color-primary);
    border-color: #fff;
    font-weight: 600;
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.option-text {
    font-size: 1rem;
    text-align: center;
}

.option-hint {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Input группы */
.calculator-input-group {
    margin-bottom: 1.5rem;
}

.calculator-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-align: center;
}

.calculator-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.calculator-input:focus {
    outline: none;
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.3);
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
    text-align: center;
}

/* Быстрые опции */
.calculator-quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.quick-option {
    padding: 0.75rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.quick-option:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

/* Range */
.calculator-range {
    margin-top: 1.5rem;
}

.calculator-range-input {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.calculator-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.calculator-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

#range-current-value {
    font-weight: 600;
    font-size: 1rem;
}

/* Результат */
.calculator-result {
    animation: fadeIn 0.3s ease;
    text-align: center;
}

.calculator-result h4 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
}

.result-summary {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 1rem;
    opacity: 0.9;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.calculator-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Навигация */
.calculator-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.calculator-prev,
.calculator-next {
    flex: 1;
    max-width: 200px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .article-calculator {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .calculator-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .calculator-option {
        padding: 1rem;
        min-height: 80px;
    }
    
    .option-icon {
        font-size: 1.5rem;
    }
    
    .calculator-navigation {
        flex-direction: column;
    }
    
    .calculator-prev,
    .calculator-next {
        max-width: 100%;
    }
}

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

