/* ==========================================================================
   Калькулятор списания долгов
   ========================================================================== */

.calc {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(16, 24, 40, 0.08);
}

/* Прогресс */
.calc__progress {
    height: 6px;
    background: #e5e8ec;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.calc__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2f9c5c, #22a559);
    transition: width 0.35s ease;
}

.calc__step-counter {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 32px;
}

/* Шаги */
.calc__step {
    display: none;
}
.calc__step.is-active {
    display: block;
    animation: calc-fade 0.3s ease;
}

@keyframes calc-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.calc__question {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #0f172a;
}

.calc__hint {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* Ползунок */
.calc__slider-wrap {
    margin: 32px 0;
}

.calc__slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e8ec;
    outline: none;
    cursor: pointer;
}

.calc__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2f9c5c;
    cursor: grab;
    box-shadow: 0 4px 12px rgba(47, 156, 92, 0.35);
    transition: transform 0.15s ease;
}

.calc__slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.calc__slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2f9c5c;
    cursor: grab;
    border: none;
    box-shadow: 0 4px 12px rgba(47, 156, 92, 0.35);
}

.calc__slider-value {
    margin-top: 16px;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: #2f9c5c;
    letter-spacing: -0.01em;
}

/* Опции */
.calc__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.calc__option {
    display: block;
    padding: 14px 18px 14px 48px;
    border: 2px solid #e5e8ec;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
}

.calc__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.calc__option::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: #fff;
    transition: all 0.2s ease;
}

.calc__option--check::before {
    border-radius: 5px;
}

.calc__option:hover {
    border-color: #2f9c5c;
    background: #f8fdf9;
}

.calc__option:has(input:checked) {
    border-color: #2f9c5c;
    background: #f0fdf4;
}

.calc__option:has(input:checked)::before {
    border-color: #2f9c5c;
    background: #2f9c5c;
    box-shadow: inset 0 0 0 3px #fff;
}

.calc__option--check:has(input:checked)::before {
    box-shadow: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath fill='%23fff' d='M4 10L0 6l1.4-1.4L4 7.2 10.6 0 12 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

/* Навигация */
.calc__nav {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 24px;
}

.calc__nav .btn {
    min-width: 140px;
}

/* Кнопки */
.calc .btn {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.calc .btn--primary {
    background: #2f9c5c;
    color: #fff;
}

.calc .btn--primary:hover {
    background: #237a46;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(47, 156, 92, 0.3);
}

.calc .btn--ghost {
    background: transparent;
    color: #6b7280;
    border-color: #e5e8ec;
}

.calc .btn--ghost:hover {
    color: #2f9c5c;
    border-color: #2f9c5c;
}

.calc .btn--block {
    width: 100%;
}

/* Результат */
.calc__result {
    text-align: center;
    animation: calc-fade 0.4s ease;
}

.calc__result-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
}

.calc__result-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 12px;
    color: #0f172a;
}

.calc__result-text {
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
    max-width: 560px;
    margin: 0 auto 32px;
}

/* Смета */
.calc__estimate {
    background: #f7f8fa;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: left;
}

.calc__estimate h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0f172a;
}

.calc__estimate-table {
    width: 100%;
    border-collapse: collapse;
}

.calc__estimate-table td {
    padding: 10px 0;
    font-size: 15px;
    color: #374151;
    border-bottom: 1px solid #e5e8ec;
}

.calc__estimate-table tr:last-child td {
    border-bottom: none;
}

.calc__estimate-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #0f172a;
}

.calc__estimate-total td {
    padding-top: 16px;
    font-size: 16px;
    color: #2f9c5c !important;
}

/* Форма */
.calc__form {
    background: #f0fdf4;
    border-radius: 16px;
    padding: 28px;
    text-align: left;
    margin-bottom: 24px;
}

.calc__form h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #0f172a;
}

.calc__form > p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px;
    line-height: 1.5;
}

.calc__form-fields {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}

.calc__field {
    display: block;
}

.calc__field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.calc__field-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.calc__field-input:focus {
    outline: none;
    border-color: #2f9c5c;
    box-shadow: 0 0 0 3px rgba(47, 156, 92, 0.12);
}

.calc__legal {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin: 14px 0 0;
}

.calc__legal a {
    color: #2f9c5c;
    text-decoration: underline;
}

/* Кнопка «Пройти заново» */
.calc__restart {
    font-size: 14px;
    margin-top: 8px;
}

/* Сообщения */
.calc__success {
    text-align: center;
    padding: 24px 0;
}

.calc__success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
}

.calc__success h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #0f172a;
}

.calc__success p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

/* Адаптив */
@media (max-width: 640px) {
    .calc {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .calc__question {
        font-size: 18px;
    }

    .calc__slider-value {
        font-size: 22px;
    }

    .calc__nav {
        flex-direction: column-reverse;
    }

    .calc__nav .btn {
        width: 100%;
    }

    .calc__result-title {
        font-size: 22px;
    }

    .calc__estimate-table td {
        font-size: 14px;
    }

    .calc__form {
        padding: 20px;
    }
}