/* Стили интерактивного конструктора ЖБИ септика septik.run (Desktop-First) */

.calc-page-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Единое рабочее пространство (Grid на десктопе, Flex column на мобильном) */
.calc-workspace {
    display: grid;
    grid-template-columns: 370px 1fr;
    grid-template-areas:
        "configurator voice"
        "configurator scheme"
        "services results";
    gap: 24px;
    align-items: start;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    box-sizing: border-box;
}

#block_configurator {
    grid-area: configurator;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

#block_voice {
    grid-area: voice;
}

#block_scheme {
    grid-area: scheme;
}

#block_results {
    grid-area: results;
}

#block_services {
    grid-area: services;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calc-sidebar-head {
    font-size: 15px;
    line-height: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
}

.calc_steps {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Шаги настройки: на десктопе вертикальный список-аккордеон */
.flexkon {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.calc_step {
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
}

.calc_step_card {
    position: relative;
    background: #1e293b;
    border: 1.5px solid transparent;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.calc_step:hover .calc_step_card {
    background: #273549;
    border-color: #3b82f6;
}

.calc_step.active .calc_step_card {
    background: #1e293b;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.calc_step_number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 12px;
    line-height: 22px;
    font-weight: 800;
    text-align: center;
    flex-shrink: 0;
}

.calc_step_icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.strok {
    font-size: 15px;
    line-height: 20px;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    margin: 0;
    flex: 1;
}

.calc_step_badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.calc_step.active .calc_step_badge {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}

/* Контент шага: открывается прямо под карточкой на десктопе */
.calc_step_content_cnt {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    margin-top: 6px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* Выдвижная панель для мобильного режима (на десктопе скрыта) */
.calc_active_drawer {
    display: none;
    margin-top: 10px;
    width: 100%;
}

.calc_active_drawer .calc_step_content_cnt {
    margin-top: 0;
}

.calc_step_content {
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.calc_step_content_side {
    width: 100%;
    box-sizing: border-box;
}

/* Переключатели (+ / -, 1 / 2) */
.calc_switch_outer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px auto;
    width: 84px;
}

.calc_switch {
    position: relative;
    overflow: hidden;
    background-color: #cbd5e1;
    border-radius: 20px;
    cursor: pointer;
    width: 84px;
    height: 32px;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.12);
}

.calc_switch_value {
    float: left;
    width: 50%;
    text-align: center;
    font-size: 15px;
    line-height: 32px;
    color: #475569;
    position: relative;
    z-index: 2;
    font-weight: 800;
    transition: color 0.2s ease;
}

.calc_switch_value + .calc_switch_value {
    color: #0f172a;
}

.calc_switch.active .calc_switch_value:first-child {
    color: #0f172a;
}

.calc_switch.active .calc_switch_value + .calc_switch_value {
    color: #ffffff;
}

.calc_switch_select {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    border-radius: 20px;
    background: #2563eb;
    transition: left 0.25s ease;
}

.calc_switch.active .calc_switch_select {
    left: 50%;
}

/* Дропдауны */
.calc_field_half {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
    box-sizing: border-box;
}

.calc_dropdown {
    width: 100%;
    position: relative;
}

.calc_dropdown_field {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 7px 5px;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.calc_dropdown_field:hover {
    background: #e2e8f0;
    border-color: #3b82f6;
}

.calc_dropdown_field.active {
    background: #e2e8f0;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.calc_dropdown_field_text {
    font-size: 13px;
    line-height: 18px;
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calc_dropdown_values {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    width: max-content;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
    box-sizing: border-box;
    padding: 2px 0;
}

.calc_dropdown_value {
    padding: 7px 8px;
    font-size: 13px;
    line-height: 18px;
    color: #0f172a;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: center;
    user-select: none;
    white-space: nowrap;
}

.calc_dropdown_value:last-child {
    border-bottom: none;
}

.calc_dropdown_value:hover {
    background: #2563eb;
    color: #ffffff;
}

.calc_data_fieldset-1,
.calc_data_fieldset-2 {
    width: 100%;
}

.calc_data_fieldset-1 {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.calc_data_fieldset-1 .calc_field_half {
    margin-bottom: 0;
}

.calc_data_fieldset-1 .calc_field_half:first-child {
    flex: 1.35;
}

.calc_data_fieldset-1 .calc_field_half:last-child {
    flex: 0.95;
}

.dou {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.dou .calc_field_half {
    margin-bottom: 0;
}

.dou .calc_field_half:first-child {
    flex: 1.35;
}

.dou .calc_field_half:last-child {
    flex: 0.95;
}

/* ПРАВАЯ КОЛОНКА: Схема, результаты и оформление */
.calc-main-panel {
    flex: 1;
    width: 100%;
    max-width: 760px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Карточка визуализации схемы */
.calc-scheme-card {
    background: radial-gradient(circle at 50% 15%, #ffffff 0%, #f8fafc 55%, #eef2f6 100%);
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 24px 20px 20px;
    box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.03), 0 4px 16px rgba(15, 23, 42, 0.05);
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.calc_scheme {
    position: relative;
    max-width: 440px;
    width: 100%;
    height: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Реалистичные рассеянные тени под основанием колодцев */
.calc_scheme_shadows {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    height: 32px;
    background: radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, 0.22) 0%, rgba(15, 23, 42, 0.08) 50%, rgba(15, 23, 42, 0) 75%);
    pointer-events: none;
    z-index: 1;
}

.calc_scheme_axis {
    position: absolute;
    height: 100%;
    top: 25px;
    transition: left 500ms ease 0ms;
    z-index: 2;
}

.calc_scheme_object {
    position: absolute;
    transition: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 5px 8px rgba(15, 23, 42, 0.16));
}

.calc_scheme_object.active {
    transition: all 500ms ease 0ms;
}

/* Кнопки управления */
.knopki {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.rascet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-new {
    border: 1px solid #334155;
    border-radius: 8px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    padding: 11px 24px;
    font-weight: 700;
    font-size: 15px;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-new:hover {
    background: #1e293b;
    border-color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.btn-trash {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-trash:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.05);
}

.btn-trash svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Таблица характеристик сооружения */
#calculation_results {
    background: #ffffff;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

#calculation_results .calc_res_title {
    text-align: center;
    margin: 0 0 12px 0;
    font-size: 17px;
    line-height: 22px;
    font-weight: 800;
    color: #0f172a;
}

.res-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    margin: 0 0 6px 0;
}

.res-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 13.5px;
}

.res-table th {
    background: #334155;
    color: #ffffff;
    padding: 8px 8px;
    text-align: center;
    font-weight: 700;
    border: 1px solid #334155;
    white-space: nowrap;
    font-size: 13px;
}

.res-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    color: #1e293b;
    font-size: 13.5px;
    vertical-align: middle;
}

.res-table td.res-td-name,
.res-table td:first-child,
.res-table th.th-name,
.res-table th:first-child {
    text-align: left;
    white-space: normal;
    word-break: normal;
    line-height: 18px;
}

.res-table td.res-td-val,
.res-table th:not(:first-child) {
    white-space: nowrap;
}

.res-table td.res-td-act,
.res-table th.th-del {
    width: 28px;
    padding: 4px 2px;
    text-align: center;
    white-space: nowrap;
}

.res-table tr:hover td {
    background-color: #f8fafc;
}

.res-footer td {
    background: #f1f5f9;
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
    border-top: 2px solid #cbd5e1;
    white-space: nowrap;
}

.calc_note {
    font-size: 15px;
    line-height: 20px;
    color: #64748b;
    margin-top: 8px;
    text-align: center;
}

.btn-del-row {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    line-height: 18px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.btn-del-row:hover {
    background: #dc2626;
}

/* Схлопываемый спойлер дополнительных услуг */
.calc-services-spoiler {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    width: 100%;
}

.calc-services-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    gap: 8px;
    box-sizing: border-box;
}

.calc-services-header:hover {
    background: #f1f5f9;
}

.calc-services-header-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calc-services-title {
    font-size: 16px;
    line-height: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.2px;
}

.calc-services-badge {
    font-size: 13px;
    line-height: 17px;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.calc-services-header-arrow-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.calc-services-arrow {
    font-size: 13px;
    color: #475569;
    transition: transform 0.2s ease;
}

.calc-services-spoiler.is-open .calc-services-arrow {
    transform: rotate(180deg);
}

.calc-services-content {
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.calc-services-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.calc-service-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.calc-service-item.is-checked {
    background: #eff6ff;
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.12);
}

.srv-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.srv-custom-check {
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    box-sizing: border-box;
    position: relative;
}

.srv-checkbox:checked + .srv-custom-check {
    background: #2563eb;
    border-color: #2563eb;
}

.srv-checkbox:checked + .srv-custom-check::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    top: 2px;
}

.srv-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    overflow: hidden;
}

.srv-name {
    font-size: 15px;
    line-height: 18px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.srv-desc {
    font-size: 14px;
    line-height: 18px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Блок прямой заявки в сайдбаре */
.tg-order-block {
    text-align: center;
    background: #ffffff;
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    width: 100%;
    margin-top: 10px;
}

.tg-order-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    line-height: 24px;
    font-weight: 800;
    color: #0f172a;
}

.tg-order-desc {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 19px;
    color: #64748b;
}

.tg-order-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.phone-mask-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.phone-mask-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-tg-submit {
    width: 100%;
    padding: 11px 16px;
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.btn-tg-submit:hover {
    background: #15803d;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35);
}

#tg_status {
    margin-top: 8px;
    font-size: 12px;
    line-height: 16px;
}

/* Панель голосового ассистента над схемой */
.calc-ai-voice-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.calc-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.calc-ai-title {
    font-size: 15px;
    line-height: 20px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-ai-icon {
    width: 18px;
    height: 18px;
    fill: #2563eb;
    flex-shrink: 0;
}

.calc-ai-badge {
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    color: #16a34a;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 100px;
    padding: 2px 8px;
    white-space: nowrap;
}

.calc-ai-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.btn-voice-rec {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.btn-voice-rec:hover {
    background: #1e293b;
    border-color: #475569;
    color: #ffffff;
}

.btn-voice-rec.is-recording {
    background: #dc2626;
    border-color: #ef4444;
}

.btn-voice-rec.is-recording .voice-pulse-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #ef4444;
    border-radius: 12px;
    animation: voicePulse 1.2s infinite ease-out;
}

@keyframes voicePulse {
    0% { transform: scale(0.96); opacity: 1; }
    100% { transform: scale(1.1); opacity: 0; }
}

.rec-mic-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Компактный блок голосового помощника над схемой */
.calc-voice-compact {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}

.calc-ai-status {
    font-size: 12px;
    line-height: 16px;
    color: #475569;
    text-align: center;
    min-height: 18px;
    margin-bottom: 8px;
}

.calc-preset-chip {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    line-height: 16px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
    display: inline-flex;
    align-items: center;
}

.calc-preset-chip:hover {
    background: #1e293b;
    color: #ffffff;
    border-color: #475569;
}

/* Медиа-запросы в порядке убывания ширины (Desktop First) */
@media (max-width: 860px) {
    .calc-workspace {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    #block_configurator {
        order: 1;
        width: 100%;
        max-width: 100%;
        padding: 14px 12px;
    }
    #block_voice {
        order: 2;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
    }
    #block_scheme {
        order: 3;
        width: 100%;
        max-width: 100%;
    }
    #block_results {
        order: 4;
        width: 100%;
        max-width: 100%;
    }
    #block_services {
        order: 5;
        width: 100%;
        max-width: 100%;
    }
    .flexkon {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .calc_step_card {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 2px;
        height: 94px;
        padding: 6px 3px;
        position: relative;
    }
    .calc_step_number {
        position: absolute;
        top: 4px;
        left: 4px;
        width: 18px;
        height: 18px;
        font-size: 11px;
        line-height: 18px;
    }
    .calc_step_icon {
        width: 34px;
        height: 34px;
        margin: 2px auto;
    }
    .strok {
        font-size: 15px;
        line-height: 17px;
        text-align: center;
    }
    .calc_step_badge {
        font-size: 13px;
        padding: 2px 6px;
        max-width: 92%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .calc_active_drawer {
        display: block;
    }
    .btn-voice-rec {
        justify-content: center;
    }
    .res-table th,
    .res-table td {
        padding: 8px 6px;
        font-size: 14.5px;
        font-weight: 700;
    }
    .res-footer td {
        font-size: 15.5px;
        font-weight: 800;
    }
}

@media (max-width: 580px) {
    .calc-page-wrap {
        padding: 12px 10px 30px;
    }
    .flexkon {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .calc_step_card {
        height: 98px;
        padding: 6px 2px 5px;
    }
    .calc_step_number {
        width: 18px;
        height: 18px;
        font-size: 12px;
        line-height: 18px;
        top: 3px;
        left: 3px;
    }
    .calc_step_icon {
        width: 32px;
        height: 32px;
    }
    .strok {
        font-size: 15px;
        line-height: 17px;
    }
    .calc_step_badge {
        font-size: 13px;
        padding: 2px 5px;
    }
    .calc-voice-compact {
        flex-direction: row;
        gap: 8px;
    }
    .tg-order-form {
        flex-direction: column;
        width: 100%;
    }
    .phone-mask-field {
        width: 100%;
    }
    .btn-tg-submit {
        width: 100%;
    }
    .res-table {
        font-size: 12px;
    }
    .res-table th,
    .res-table td {
        padding: 6px 3px;
        font-size: 12px;
    }
    .res-table td.res-td-name,
    .res-table td:first-child {
        font-size: 12px;
        line-height: 16px;
    }
    .res-footer td {
        font-size: 12px;
        padding: 6px 3px;
    }
    .btn-del-row {
        width: 19px;
        height: 19px;
        font-size: 13px;
        line-height: 17px;
    }
    #calculation_results {
        padding: 12px 6px;
        border-radius: 12px;
    }
    .calc_scheme {
        max-width: 320px;
        height: 320px;
    }
}

@media (max-width: 380px) {
    .calc-page-wrap {
        padding: 10px 4px 24px;
    }
    .flexkon {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .calc_step_card {
        height: 98px;
        padding: 6px 4px 5px;
    }
    .strok {
        font-size: 15px;
        line-height: 17px;
    }
    .calc_step_badge {
        font-size: 13px;
        padding: 2px 5px;
    }
    #calculation_results {
        padding: 10px 4px;
    }
    .res-table th {
        font-size: 14px;
        font-weight: 800;
        padding: 7px 4px;
    }
    .res-table td {
        padding: 7px 4px;
        font-size: 14px;
        font-weight: 700;
    }
    .res-table td.res-td-name,
    .res-table td:first-child {
        font-size: 14px;
        line-height: 18px;
        font-weight: 700;
    }
    .res-footer td {
        font-size: 15px;
        font-weight: 900;
        padding: 8px 4px;
    }
    .calc_scheme {
        max-width: 280px;
        height: 280px;
    }
}
