.electric-category-wrapper {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 20px 24px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 40px;
    margin-bottom: 24px;
}

.electric-category {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.electric-category .left-position {
    flex: 1;
}

.electric-category .left-position p {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: #16151C;
    margin: 0;
}

.electric-category .right-position {
    display: flex;
    gap: 20px;
}

.category-btn {
    padding: 10px 20px;
    height: 42px;
    background: transparent;
    border: 1px solid #00859E;
    border-radius: 10px;
    font-weight: 400;
    font-size: 16px;
    color: #00859E;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active {
    background: #00859E;
    color: #FFFFFF;
}

/* Responsive */
@media (max-width: 768px) {
    .electric-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .electric-category .right-position {
        width: 100%;
    }

    .category-btn {
        flex: 1;
        text-align: center;
    }
}

/* Toggle switch styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 37px;
    height: 17px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Visual slider - OFF state (light gray) */
.toggle-switch .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #CCCCCC;
    border-radius: 16px;
    transition: 0.3s;
}

/* ON state (green) */
.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(180deg, rgba(0, 112, 133, 0.5) 0%, #007085 100%);
}

/* Circle inside slider */
.toggle-switch .toggle-slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

/* When checked - circle moves right */
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    color: #16151C;
    cursor: pointer;
}

.toggle-label:hover {
    color: #007085;
}

.calculated-fields-switch {
    width: 100%;
    margin-top: 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.constructions-list {
    margin-top: 16px;
    margin-bottom: 24px;
    padding: 8px 0;
}

.construction-item {
    margin-bottom: 12px;
}

.construction-item:last-child {
    margin-bottom: 0;
}

.construction-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.construction-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00859E;
}

/* Checkbox label text - from Figma */
.construction-label span {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 19px;
    color: #16151C;
}

/* Responsive */
@media (max-width: 768px) {
    .construction-label span {
        font-size: 14px;
        line-height: 17px;
    }
}

.construction-table-wrapper {
    background: #FFFFFF;
    width: 100%;
    padding: 25px;
    border-radius: 10px;
    box-sizing: border-box;
}

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

.construction-detail-wrapper {
     margin: 25px 0;
}

.construction-table th:first-child {
    text-align: left;
}

.construction-table th {
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 14px;
    text-align: right;
    color: #00859E;
}

.construction-table th span {
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 14px;
    text-align: right;
    color: #A2A1A8;  /* light gray */
}

.construction-table tr:first-child {
    border-bottom: 30px solid #FFFFFF;
}

.construction-table td:first-child {
    text-align: left;
    padding: 0;
}

.construction-table td {
    text-align: right;
}

.construction-table th:first-child,
.construction-table td:first-child {
    width: 50%;
}

.construction-table select {
    width: 95%;
    min-width: 95%;
    max-width: 95%;
}

.construction-table select[size] {
    height: auto;
}

.construction-table select option {
    white-space: normal;
    word-break: break-word;
    padding: 4px;
}

/* Main footer container */
.main-footer {
    width: 100%;
    margin-top: 50px;
    margin-bottom: 10px;
    position: relative;
}

/* Buttons container */
.main-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 40px;
}

/* Reset button */
.reset {
    width: 168px;
    height: 42px;
    background: transparent;
    border: 1px solid #00859E;
    font-size: 16px;
    font-weight: 500;
    color: #00859E;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset:hover {
    background: rgba(0, 133, 158, 0.05);
}

/* Calculate button */
.calc {
    width: 133px;
    height: 42px;
    background: #00859E;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc:hover {
    background: #006B8A;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .main-buttons {
        justify-content: center;
        gap: 15px;
        margin-bottom: 30px;
    }

    .reset,
    .calc {
        width: auto;
        padding: 0 20px;
    }
}

/* Table wrapper */
.result-table-wrapper {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

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

.rules-text {
    margin-top: 20px;
    font-size: 12px;
    font-weight: 300;
    line-height: 15px;
    color: #16151C;
}

.result-table th {
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 17px;
    color: #16151C;
    padding: 12px;
}

.result-table th:first-child {
    text-align: left;
}

.result-table th:not(:first-child) {
    text-align: right;
}

.result-table td p {
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 17px;
    color: #16151C;
    margin: 0;
}

.result-table td span {
    font-size: 12px;
    line-height: 15px;
    color: #A2A1A8;
    display: block;
    margin-top: 4px;
}

.result-table td {
    padding: 14px 10px;
}

/* Hide default browser tooltip */
.info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.info-icon[title] {
    font-size: 0;
    color: transparent;
}

.tooltip-icon {
    width: 16px;
    height: 20px;
    vertical-align: middle;
    margin-left: -1px;
    padding-bottom: 7px;
}

/* Custom tooltip - works on hover (desktop) and click (mobile) */
/* Base tooltip - hidden by default */
.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    margin-bottom: 30px;
    left: 100%;
    transform: translateY(-50%);
    background: #FFFFFF;
    color: #454449;
    font-weight: 400;
    font-size: 11px;
    font-style: normal;
    width: 200px;
    white-space: normal;
    word-wrap: break-word;
    padding: 6px 6px;
    border-radius: 8px;
    line-height: 1.3;
    letter-spacing: -0.2px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Show tooltip on hover - NO content here! */
.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.info-icon:hover::before,
.info-icon:active::before {
    display: none !important;
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    z-index: 100;
}

@media (max-width: 768px) {
    .info-icon {
        display: none !important;
    }
}

.collapse-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#info-icon-3 {
    margin: 0 0 15px -7px;
}

.calc-val .text-container {
    display: block;
    margin-bottom: 12px;
}

.power-error p {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 0;
}

.basket-icon {
    width: 20px;
    height: 20px;
}

.remove-icon {
    width: 14px;
    height: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-icon:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.remove-icon-static {
    width: 14px;
    height: 14px;
    cursor: default;
    vertical-align: middle;
    margin-top: 2px;
}

.construction-quantity-input {
    width: 100px;
    padding: 6px;
    text-align: right;
    border: none;
    background: transparent;
    outline: none;
}

.construction-table input[type="number"] {
    text-align: right;
    border: none;
    background: transparent;
    outline: none;
}

.construction-table input[type="number"]::-webkit-inner-spin-button,
.construction-table input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.construction-table input[type="number"] {
    -moz-appearance: textfield;
}

.construction-table td {
    font-size: 14px;
}

.construction-table .add-row td {
    color: #A2A1A8;
}

.construction-table .add-row select {
    color: #A2A1A8;
}

.construction-table .add-row select option {
    color: #16151C;
}

/* Таблица конструкций - управление шириной столбцов */
.construction-table {
    width: 100%;
    table-layout: fixed;  /* Фиксированная ширина */
}

.construction-table colgroup .col-type {
    width: 55%;
}

.construction-table colgroup .col-rate {
    width: 13%;
}

.construction-table colgroup .col-quantity {
    width: 12%;
}

.construction-table colgroup .col-cost {
    width: 15%;
}

.construction-table colgroup .col-remove {
    width: 5%;
}

/* Для мобильной версии - уменьшить шрифт */
@media (max-width: 768px) {
    .construction-table {
        font-size: 9px;
    }

    .construction-table colgroup .col-type {
        width: 30%;
    }

    .construction-table colgroup .col-rate {
        width: 20%;
    }

    .construction-table colgroup .col-quantity {
        width: 20%;
    }

    .construction-table colgroup .col-cost {
        width: 20%;
    }

    .construction-table colgroup .col-remove {
        width: 10%;
    }
}

.construction-table select {
    background: #FFFFFF;
}

.construction-table td:not(:first-child) {
    text-align: right;
}

.construction-table td {
    white-space: nowrap;
    overflow: hidden;
    /*text-overflow: ellipsis;*/
}

.construction-table select:focus {
    outline: none;
    border-color: #A0C4BC;
    box-shadow: none;
}

/* Mobile version for construction table */
@media (max-width: 768px) {
    .construction-table {
        font-size: 11px;
    }

    .construction-table select {
        background-image: none !important;
        padding-right: 8px !important;
    }

    .construction-table th {
        font-size: 9px;
        line-height: 10px;
        padding: 4px 2px;
    }

    .construction-table th span {
        font-size: 7px;
        line-height: 8px;
    }

    .construction-table td {
        font-size: 10px;
        padding: 4px 2px;
    }

    .construction-table select {
        font-size: 10px !important;
        height: 28px !important;
        padding: 0 16px 0 4px !important;
        min-width: 50px;
    }

    .construction-table input[type="number"] {
        font-size: 10px !important;
        width: 50px !important;
        padding: 2px !important;
        min-width: 30px;
    }

    .construction-table .remove-icon {
        width: 12px;
        height: 12px;
    }

    .construction-table .basket-icon {
        width: 14px;
        height: 14px;
    }

    .add-row td {
        font-size: 10px;
    }

    .add-row select {
        font-size: 10px !important;
        height: 28px !important;
        padding: 0 16px 0 4px !important;
        background-image: none !important;
    }

    /* Третий столбик - прижать вправо */
    .construction-table td:nth-child(3) {
        text-align: right;
    }

    .construction-table td:nth-child(3) input {
        width: 45px !important;
        min-width: 25px;
        text-align: right;
    }

    /* Скрыть иконку в последней строке */
    .add-row td:last-child {
        display: none;
    }
}

/* Mobile version for result table */
@media (max-width: 768px) {
    .result-table-wrapper {
        padding: 10px;
        margin: 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .result-table {
        min-width: 400px;
        font-size: 9px;
    }

    .result-table th,
    .result-table td {
        padding: 4px 3px;
        font-size: 8px;
    }

    .result-table th:first-child {
        width: 30%;
        font-size: 8px;
    }

    .result-table td:first-child {
        font-size: 7px;
        line-height: 1.2;
    }

    .result-table th:nth-child(2),
    .result-table th:nth-child(3) {
        width: 18%;
        font-size: 7px;
    }

    .result-table th:nth-child(4) {
        width: 34%;
        font-size: 7px;
    }

    .result-table td:nth-child(2),
    .result-table td:nth-child(3) {
        font-size: 8px;
        text-align: right;
    }

    .result-table td:nth-child(4) {
        font-size: 8px;
        text-align: right;
        padding-right: 6px;
    }

    .result-table td p {
        font-size: 7px;
        line-height: 1.2;
        margin: 0;
    }

    .result-table td span {
        font-size: 6px;
        line-height: 1.1;
        display: block;
        margin-top: 2px;
    }
}