/* Manipulator calculator — КранЛаб */
.manip-calc-section {
    padding: 60px 0;
}

.manip-calc {
    background: linear-gradient(160deg, #f7fbff 0%, #eef5fb 45%, #f8fafc 100%);
    border: 1px solid rgba(34, 151, 249, 0.18);
    border-radius: 28px;
    padding: 36px 40px 40px;
    position: relative;
    overflow: hidden;
}

.manip-calc::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 151, 249, 0.18) 0%, rgba(34, 151, 249, 0) 70%);
    pointer-events: none;
}

.manip-calc__head {
    position: relative;
    margin-bottom: 28px;
    max-width: 720px;
}

.manip-calc__head h2 {
    margin: 0 0 10px;
}

.manip-calc__head h2:before {
    display: none;
}

.manip-calc__lead {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #4b5563;
}

.manip-calc__progress {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    position: relative;
}

.manip-calc__progress-item {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.manip-calc__progress-bar {
    height: 6px;
    border-radius: 999px;
    background: #dbe7f3;
    overflow: hidden;
    margin-bottom: 8px;
}

.manip-calc__progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent-color1, #2297f9);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.manip-calc__progress-item.is-active .manip-calc__progress-bar span,
.manip-calc__progress-item.is-done .manip-calc__progress-bar span {
    width: 100%;
}

.manip-calc__progress-label {
    font-size: 12px;
    line-height: 1.3;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.manip-calc__progress-item.is-active .manip-calc__progress-label {
    color: #111827;
    font-weight: 600;
}

.manip-calc__step {
    display: none;
    position: relative;
}

.manip-calc__step.is-active {
    display: block;
    animation: manipCalcIn 0.28s ease;
}

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

.manip-calc__step-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 18px;
    color: #111827;
}

.manip-calc__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.manip-calc__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manip-calc__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manip-calc__field--full {
    grid-column: 1 / -1;
}

.manip-calc__label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.manip-calc__field .form-control,
.manip-calc select.form-control {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: 1px solid #d5e0ea;
    background: #fff;
    padding: 0 14px;
    font-size: 15px;
    color: #111827;
    box-shadow: none;
}

.manip-calc textarea.form-control {
    height: auto;
    min-height: 100px;
    padding: 12px 14px;
    resize: vertical;
}

.manip-calc__field .form-control:focus,
.manip-calc select.form-control:focus {
    border-color: var(--accent-color1, #2297f9);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 151, 249, 0.15);
}

.manip-calc__field.is-error .form-control,
.manip-calc__field.is-error select.form-control {
    border-color: #ef4444;
}

.manip-calc__hint {
    font-size: 12px;
    color: #ef4444;
    display: none;
}

.manip-calc__field.is-error .manip-calc__hint {
    display: block;
}

.manip-calc__choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.manip-calc__choice {
    position: relative;
}

.manip-calc__choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.manip-calc__choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #d5e0ea;
    background: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.manip-calc__choice input:checked + span {
    border-color: var(--accent-color1, #2297f9);
    background: rgba(34, 151, 249, 0.08);
    color: #0b5ea8;
}

.manip-calc__choice span:hover {
    transform: translateY(-1px);
    border-color: rgba(34, 151, 249, 0.55);
}

.manip-calc__toggles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.manip-calc__toggle {
    position: relative;
}

.manip-calc__toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.manip-calc__toggle span {
    display: block;
    min-height: 70px;
    padding: 14px 12px;
    border-radius: 14px;
    border: 1px dashed #c9d7e6;
    background: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.manip-calc__toggle input:checked + span {
    border-style: solid;
    border-color: var(--accent-color1, #2297f9);
    background: rgba(34, 151, 249, 0.08);
    color: #0b5ea8;
}

.manip-calc__results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.manip-calc__card {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 18px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.manip-calc__card:hover {
    border-color: rgba(34, 151, 249, 0.55);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.manip-calc__card-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.manip-calc__card-meta {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
    flex-grow: 1;
}

.manip-calc__card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-color1, #2297f9);
}

.manip-calc__card-link {
    font-size: 13px;
    font-weight: 600;
    color: #0b5ea8;
    text-decoration: none;
}

.manip-calc__card-link:hover {
    text-decoration: underline;
}

.manip-calc__empty {
    grid-column: 1 / -1;
    padding: 20px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 14px;
    line-height: 1.5;
}

.manip-calc__summary {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #dbe7f3;
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
}

.manip-calc__summary strong {
    color: #111827;
}

.manip-calc__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.manip-calc__nav .btn {
    min-width: 160px;
}

.manip-calc__nav-note {
    font-size: 13px;
    color: #6b7280;
}

.manip-calc .agreement {
    margin-top: 14px;
}

@media (max-width: 991px) {
    .manip-calc {
        border-radius: 20px;
        padding: 28px 22px 30px;
    }

    .manip-calc__grid,
    .manip-calc__grid--3,
    .manip-calc__results,
    .manip-calc__toggles {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 639px) {
    .manip-calc-section {
        padding: 40px 0;
    }

    .manip-calc {
        padding: 22px 16px 24px;
        border-radius: 16px;
    }

    .manip-calc__grid,
    .manip-calc__grid--3,
    .manip-calc__choices,
    .manip-calc__results,
    .manip-calc__toggles {
        grid-template-columns: 1fr;
    }

    .manip-calc__progress-label {
        font-size: 11px;
    }

    .manip-calc__nav .btn {
        width: 100%;
        min-width: 0;
    }

    .manip-calc__nav {
        flex-direction: column-reverse;
        align-items: stretch;
    }
}
