/* Калькулятор крепежа */
.calc {
    padding: 8px 0 56px;
}

.calc_lead {
    max-width: 760px;
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.65;
    color: #55566a;
}

.calc_grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}

.calc_form {
    flex: 1 1 320px;
    min-width: 280px;
    background: #f7f8fa;
    border-radius: 12px;
    padding: 24px;
}

.calc_result {
    flex: 1 1 420px;
    min-width: 300px;
}

.calc_field {
    margin-bottom: 18px;
}

.calc_field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 15px;
    color: #404155;
}

.calc_field .calc_hint {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: #7b7c8d;
    font-weight: 400;
}

.calc_field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 17px;
    font-family: inherit;
    color: #404155;
    background: #fff;
    border: 1px solid #d8dae2;
    border-radius: 8px;
    transition: border-color .2s, box-shadow .2s;
}

.calc_field input:focus {
    outline: none;
    border-color: #375faf;
    box-shadow: 0 0 0 3px rgba(55, 95, 175, .15);
}

.calc_field input.is-invalid {
    border-color: #d0342c;
    box-shadow: 0 0 0 3px rgba(208, 52, 44, .12);
}

.calc_posts {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e4ec;
    font-size: 15px;
    color: #55566a;
}

.calc_posts strong {
    font-size: 20px;
    color: #404155;
}

.calc_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.calc_btn {
    padding: 11px 18px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #d8dae2;
    background: #fff;
    color: #404155;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}

.calc_btn:hover {
    border-color: #375faf;
    color: #375faf;
}

.calc_btn--primary {
    background: #f9a400;
    border-color: #f9a400;
    color: #fff;
    font-weight: 600;
}

.calc_btn--primary:hover {
    background: #e59700;
    border-color: #e59700;
    color: #fff;
}

/* Итоговые карточки */
.calc_cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.calc_card {
    padding: 18px;
    background: #fff;
    border: 1px solid #e2e4ec;
    border-left: 4px solid #375faf;
    border-radius: 10px;
}

.calc_card--nuts {
    border-left-color: #f9a400;
}

.calc_card_label {
    font-size: 14px;
    color: #7b7c8d;
    margin-bottom: 6px;
}

.calc_card_value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #404155;
}

.calc_card_unit {
    font-size: 14px;
    font-weight: 400;
    color: #7b7c8d;
    margin-left: 4px;
}

/* Таблица разбивки */
.calc_table_wrap {
    overflow-x: auto;
}

.calc_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.calc_table th,
.calc_table td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e4ec;
}

.calc_table th {
    font-weight: 600;
    color: #404155;
    background: #f7f8fa;
    white-space: nowrap;
}

.calc_table td:last-child,
.calc_table th:last-child {
    text-align: right;
    white-space: nowrap;
}

.calc_table tfoot td {
    font-weight: 700;
    border-bottom: none;
    border-top: 2px solid #d8dae2;
}

.calc_formula {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    color: #55566a;
    white-space: nowrap;
}

.calc_note {
    margin-top: 14px;
    padding: 14px 16px;
    background: #fff8e8;
    border-left: 4px solid #f9a400;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #55566a;
}

.calc_note b {
    color: #404155;
}

@media (max-width: 720px) {
    .calc_form { padding: 18px; }
    .calc_card_value { font-size: 26px; }
    .calc_table th,
    .calc_table td { padding: 9px 8px; font-size: 14px; }
}

@media print {
    .top_line, .top_line_nav, .header, .footer, .breadcrumbs,
    .calc_actions, .modal, .calc_lead { display: none !important; }
    .calc_grid { display: block; }
    .calc_form { background: none; padding: 0; }
    .calc_card { border: 1px solid #999; }
}

/* Блок мостовых стоек */
.calc_section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e4ec;
}

.calc_section_title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #404155;
}

.calc_section_lead {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #7b7c8d;
}

.calc_field--inline {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.calc_field--inline label {
    flex: 0 0 132px;
    margin-bottom: 0;
}

.calc_field--inline .calc_hint {
    display: inline;
    margin-left: 6px;
}

.calc_field--inline input {
    flex: 1 1 auto;
    min-width: 0;
}

.calc_warn {
    margin: 16px 0 0;
    padding: 12px 14px;
    background: #fdecea;
    border-left: 4px solid #d0342c;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.55;
    color: #8a2018;
}

/* Болты мостовых стоек */
.calc_cards--bridge {
    margin-top: -12px;
    margin-bottom: 26px;
}

.calc_card--bridge {
    border-left-color: #5a8f4f;
}

.calc_row--bridge td:first-child {
    color: #3f6a37;
}

.calc_sub {
    display: block;
    font-size: 13px;
    color: #7b7c8d;
}

@media (max-width: 480px) {
    .calc_field--inline { display: block; }
    .calc_field--inline label { margin-bottom: 6px; }
}

/* Выбор диаметра болта мостовой стойки */
.calc_field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 17px;
    font-family: inherit;
    color: #404155;
    background: #fff;
    border: 1px solid #d8dae2;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

.calc_field select:focus {
    outline: none;
    border-color: #375faf;
    box-shadow: 0 0 0 3px rgba(55, 95, 175, .15);
}

/* Заголовок страницы: на десктопе — как на остальных страницах */
.calc .h2 h1 {
    line-height: 1.25;
}

/* На узких экранах заголовок длинный и переносится на 2–3 строки:
   даём воздух между строками и не прижимаем текст к иконке */
@media (max-width: 800px) {
    .calc .h2 {
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
        padding: 20px 0 14px;
        line-height: 1.4;
    }

    .calc .h2 h1 {
        font-size: 22px;
        line-height: 1.4;
        word-spacing: 0.04em;
        overflow-wrap: break-word;
        hyphens: none;
    }

    .calc .icon_right {
        flex: 0 0 auto;
        width: 22px;
        height: 28px;
        margin-right: 12px;
        margin-top: 2px;
    }
}

@media (max-width: 420px) {
    .calc .h2 h1 {
        font-size: 20px;
        line-height: 1.45;
    }

    .calc .icon_right {
        width: 18px;
        height: 23px;
        margin-right: 10px;
    }
}
