.kso_form {
    background: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.form_title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* Стили для строки с тремя параметрами */
.row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Стили для строки с двумя параметрами температуры */
.row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin:0 0 25px 0;
}

.kso_wrap_input {
    position: relative;
}

.kso_wrap_input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form__input, 
.kso_wrap_input select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form__input:focus, 
.kso_wrap_input select:focus {
    outline: none;
    border-color: #4799cf;
    box-shadow: 0 0 0 3px rgba(71, 153, 207, 0.1);
}

.form__input:hover, 
.kso_wrap_input select:hover {
    border-color: #a5b1c2;
}

/* Стили для бегунков температуры */
.temperature-slider-wrapper {
    margin: 15px 0;
}

.temperature-value {
    text-align: center;
    font-weight: 600;
    color: #4799cf;
    font-size: 18px;
    margin-top: 5px;
}

.temperature-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.temperature-inputs input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
}

/* Стилизация jQuery UI слайдера */
.ui-slider {
    position: relative;
    background: #e1e5e9;
    border-radius: 5px;
    height: 8px;
}

.ui-slider-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4799cf;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    top: -6px;
    margin-left: -10px;
}

.ui-slider-range {
    position: absolute;
    background: #4799cf;
    border-radius: 5px;
    height: 100%;
}

.kso_note {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #4799cf;
    margin: 25px 0;
}

.kso_note p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.kso_form_submit {
    width: 100%;
    background: linear-gradient(135deg, #4799cf 0%, #2c6ba0 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color:#fff!important;
    text-decoration:none;
    text-align:center;
}

.kso_form_submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 153, 207, 0.4);
}

.kso_form_submit:active {
    transform: translateY(0);
}

.kso_result {
    background: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.kso_result:empty{
    display:none
}

.kso_calc_result h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #4799cf;
    padding-bottom: 10px;
}

.kso_calc_result p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.kso_calc_result strong {
    color: #4799cf;
}

.kso_selected {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #4799cf;
    margin: 20px 0;
}

.kso_alternatives {
    background: #fff9e6;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #ffd700;
}

.kso_alternatives p {
    margin-bottom: 10px;
}

.error {
    color: #4799cf;
    padding: 25px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight:bold
}

.kso_generate_pdf{
    width:100%;
    margin:15px auto;
}

/* Стили для select */
.kso_wrap_input select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234799cf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

/* Адаптивность */
@media (max-width: 880px) {
    .container {
        padding: 10px;
    }
    
    .kso_form, .kso_result {
        padding: 20px;
    }
    
    .form_title {
        font-size: 24px;
    }
    
    .row-3,
    .row-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .temperature-inputs {
        flex-direction: column;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kso_result {
    animation: fadeIn 0.5s ease-out;
}


.temperature-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e1e5e9;
}

.kso_tables_container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.kso_table_wrap {
    width: 100%;
    overflow: hidden;
}

.kso_table_title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.kso_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 300px;
}

.kso_table th {
    background-color: #f8f9fa;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    white-space: nowrap;
}

.kso_table td {
    padding: 12px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Название - 50% ширины, выравнивание по левому краю */
.kso_table th:first-child,
.kso_table td:first-child {
    text-align: left;
    width: 50%;
    padding-left: 15px;
}

/* Остальные столбцы - выравнивание по центру */
.kso_table th:not(:first-child),
.kso_table td:not(:first-child) {
    text-align: center;
    width: 12.5%; /* 4 столбца по 12.5% = 50% */
}

.kso_table tr:last-child td {
    border-bottom: 1px solid #dee2e6;
}

/* Убираем цветное выделение */
.kso_price,
.kso_total {
    font-weight: 500;
    color: #333;
}

.kso_product_link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.kso_product_link:hover {
    color: #004499;
    text-decoration: underline;
}

.form-control-hide{
    display:none
}

.paragraph table.kso_table{
    border: none !important;
}

.paragraph table.kso_table td{
    border: none !important;
    border-bottom: 2px solid #dee2e6 !important;
}

/* Вертикальный режим для мобильных */
@media (max-width: 880px) {
    .paragraph table.kso_table {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 5px;
        overflow: hidden;
    }
    
    .paragraph table.kso_table thead {
        display: none;
    }
    
    .paragraph table.kso_table tbody, 
    .paragraph table.kso_table tr, 
    .paragraph table.kso_table td {
        display: block;
        width: 100%;
    }
    
    .paragraph table.kso_table tr {
        margin-bottom: 0;
        border-bottom: 1px solid #dee2e6;
        padding: 15px 0;
    }
    
    .paragraph table.kso_table tr:last-child {
        border-bottom: none;
    }
    
    .paragraph table.kso_table td {
        padding: 8px 15px;
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
        width:100%!important;
    }
    
    .paragraph table.kso_table td:first-child {
        text-align: right;
        padding-left: 15px;
        
    }
    
    .paragraph table.kso_table td:last-child {
        border-bottom: none;
    }
    
    .paragraph table.kso_table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        font-weight: 500;
        color: #666;
        text-align: left;
    }
    
    /* Для мобильных убираем ширину первого столбца */
    .paragraph table.kso_table td:first-child {
        width: 100%;
        padding-left: 15px;
    }
}


@media (max-width: 480px) {
    .paragraph table.kso_table td:first-child{
        text-align: left;
    }
    .paragraph table.kso_table td:first-child:before{
        display:none
    }
    
    .paragraph table.kso_table{
        max-width:initial;
        min-width: initial;
    }
}

.blank details {
    margin: 20px 0 0;
    border: 1px solid #e1e5e9;
    border-radius: 5px;
    background: #f8f9fa;
    overflow: hidden;
}

.blank details[open] {
    background: #fff;
    border-color: #c5d9e8;
}

.blank details summary {
    padding: 14px 40px 14px 15px;
    cursor: pointer;
    color: #333;
    list-style: none;
    position: relative;
    user-select: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.blank details summary::-webkit-details-marker {
    display: none;
}

.blank details summary::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #4799cf;
    border-bottom: 2px solid #4799cf;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
}

.blank details[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
}

.blank details summary:hover {
    color: #4799cf;
    background: #f0f7ff;
}

.blank details p {
    margin: 0;
    padding: 0 15px 15px;
    color: #555;
}

/* CTA-кнопки в блоке результата */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 200px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #4799cf 0%, #2c6ba0 100%);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 153, 207, 0.4);
    color: #fff !important;
}

.cta.ghost {
    background: #fff;
    color: #4799cf !important;
    border: 2px solid #4799cf;
    box-shadow: none;
}

.cta.ghost:hover {
    background: #f0f7ff;
    color: #2c6ba0 !important;
    box-shadow: none;
}

@media (max-width: 880px) {
    .cta-row {
        flex-direction: column;
    }

    .cta {
        width: 100%;
        min-width: 0;
    }
}

/* П-образный компенсатор — чекбокс, схема, таблицы сравнения */
.p-calc-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 20px 0;
    font-size: 15px;
    cursor: pointer;
    line-height: 1.4;
}

.p-calc-check input[type="checkbox"] {
    display: block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #4799cf;
    flex-shrink: 0;
    cursor: pointer;
}

.p-calc-check small {
    display: block;
    color: #666;
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
    line-height: 1.35;
}

.p-calc-result .kso_calc_result {
    background: #fff;
}

.p-calc-result h3 {
    margin: 0;
    padding: 16px 18px;
    border-bottom: 2px solid #1B2430;
    font-size: 18px;
}

.p-calc-scheme {
    padding: 18px 16px 6px;
    text-align: center;
    border-bottom: 2px solid #1B2430;
}

.p-calc-scheme svg {
    max-width: 420px;
    width: 100%;
    height: auto;
}

.p-calc-scheme__cap {
    text-align: center;
    font-size: 13px;
    color: #666;
    padding: 6px 0 10px;
}

.p-calc-table {
    width: 100%;
    border-collapse: collapse;
}

.p-calc-table td {
    border: 1px solid #1B2430;
    padding: 12px 16px;
    font-size: 15px;
    vertical-align: top;
}

.p-calc-table__k {
    width: 58%;
    font-weight: 700;
    font-size: 14px;
    background: #F2F5F8;
}

.p-calc-table__v {
    font-size: 18px;
    white-space: nowrap;
}

.p-calc-table__v .unit {
    font-size: 13px;
    color: #666;
}

.p-calc-big {
    font-size: 26px;
    font-weight: 700;
    color: #4799cf;
}

.p-calc-compare {
    border-top: 2px solid #1B2430;
}

.p-calc-compare h4 {
    margin: 0;
    padding: 14px 16px 4px;
    font-size: 16px;
    font-weight: 700;
}

.p-calc-table_compare td {
    font-size: 14px;
}

.p-calc-table__h {
    background: #F2F5F8;
    font-weight: 700;
    width: 34%;
}

.p-calc-table__mono {
    font-family: 'PT Mono', monospace;
}

.p-calc-verdict {
    margin: 16px 0;
    padding: 16px 18px;
    border-top: 2px solid #1B2430;
    background: #F2F7F3;
    font-size: 15px;
}

.p-calc-verdict strong {
    color: #2d7a4f;
}

.p-calc-verdict_warn {
    background: #FDF6EC;
}

.p-calc-result .cta-row {
    padding: 16px 18px;
    border-top: 1px solid #e1e5e9;
    margin-top: 0;
}

.p-calc-cta-ghost {
    background: #fff !important;
    color: #4799cf !important;
    border: 2px solid #4799cf !important;
    box-shadow: none !important;
}

.p-calc-cta-ghost:hover {
    background: #f0f7ff !important;
    color: #2c6ba0 !important;
    transform: none;
}

/* П-образный компенсатор — доп. правки (override style.css checkbox hide) */
#pCompensatorCalc .p-calc-check input[type="checkbox"] {
    display: block;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.p-calc-table__row-main td {
    background: #f0f7ff;
    border-top: 2px solid #4799cf;
    border-bottom: 2px solid #4799cf;
}

.p-calc-table__row-main .p-calc-table__k {
    font-size: 15px;
    font-weight: 700;
    color: #1B2430;
}

.p-calc-table__row-main .p-calc-big {
    font-size: 32px;
    font-weight: 700;
    color: #24557E;
}

@media (max-width: 768px) {
    .p-calc-table__scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .p-calc-table__scroll > .p-calc-table {
        min-width: 520px;
    }

    .p-calc-compare__scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .p-calc-compare__scroll .p-calc-table_compare {
        min-width: 520px;
    }
}