.calc-price-block {
    background: #F5FBFF;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(63, 121, 212, 0.15);
}
.calc-price-label {
    font-size: 16px;
    font-weight: 500;
    color: #232536;
}
.calc-price-value {
    font-size: 28px;
    font-weight: 700;
    color: #3F79D4;
}
.calc-price-value span {
    font-size: 18px;
    font-weight: 500;
}

.calc-specs-block {
    background: #f5fbff;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 16px 0 0 0;
    border: 1px solid rgba(63, 121, 212, 0.1);
    display: none;
}
.calc-specs-block.visible {
    display: block;
}
.calc-specs-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #232536;
}
.calc-specs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.calc-specs-item {
    background: white;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #232536;
    border: 1px solid rgba(63, 121, 212, 0.12);
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
}
.calc-specs-item strong {
    color: #3F79D4;
    font-weight: 700;
    font-size: 18px;
    display: block;
    margin-bottom: 2px;
}

.calc-server-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 10px;
}
.calc-server-title {
    font-size: 18px;
    font-weight: 600;
    color: #232536;
}
.calc-server-remove {
    background: none;
    border: 1px solid #e53935;
    color: #e53935;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-family: Montserrat;
}
.calc-server-remove:hover {
    background: #e53935;
    color: white;
}

.calc-global-bottom {
    border-radius: 0 0 9px 9px;
    margin-top: 0;
}
.calc-bottom-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.calc-add-server {
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 80px;
    cursor: pointer;
    transition: 0.3s;
    font-family: Montserrat;
    white-space: nowrap;
}
.calc-add-server:hover {
    border-color: #FFD050;
    color: #FFD050;
}

.calc-total-block {
    background: linear-gradient(135deg, #232536 0%, #2d3050 100%);
    border-radius: 12px;
    padding: 24px 32px;
    margin-top: 24px;
    display: none;
    align-items: center;
    justify-content: space-between;
}
.calc-total-block.visible {
    display: flex;
}
.calc-total-label {
    font-size: 18px;
    font-weight: 600;
    color: white;
}
.calc-total-value {
    font-size: 32px;
    font-weight: 700;
    color: #FFD050;
}
.calc-total-value span {
    font-size: 20px;
    font-weight: 500;
}

.calc-tooltip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.calc-tooltip-overlay.active {
    display: flex;
}
.calc-tooltip-box {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.calc-tooltip-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 20px;
    color: #232536;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}
.calc-tooltip-close:hover {
    background: #f5f5f5;
}
.calc-tooltip-text {
    font-size: 15px;
    font-weight: 400;
    line-height: 170%;
    color: #232536;
}

.calc-setup-price {
    font-size: 13px;
    font-weight: 600;
    color: #3F79D4;
    margin-left: 6px;
}

.calc-order-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 11111;
    display: none;
    overflow-y: auto;
}
.calc-order-overlay.active {
    display: block;
}
.calc-order-panel {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 92%;
    margin: 40px auto;
    padding: 40px;
    position: relative;
    box-sizing: border-box;
}
.calc-order-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 22px;
    color: #232536;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}
.calc-order-close:hover {
    background: #f5f5f5;
}
.calc-order-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: #232536;
}

.calc-order-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.calc-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    table-layout: fixed;
}
.calc-order-table thead {
    background: #232536;
    color: white;
}
.calc-order-table th {
    padding: 12px 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
}
.calc-order-table col.col-server { width: 14%; }
.calc-order-table col.col-cpu { width: 13%; }
.calc-order-table col.col-ram { width: 13%; }
.calc-order-table col.col-ssd { width: 13%; }
.calc-order-table col.col-os { width: 17%; }
.calc-order-table col.col-services { width: 17%; }
.calc-order-table col.col-price { width: 13%; }
.calc-order-table th:first-child {
    border-radius: 8px 0 0 0;
    text-align: left;
    padding-left: 16px;
}
.calc-order-table th:last-child {
    border-radius: 0 8px 0 0;
}
.calc-order-table td {
    padding: 10px;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.calc-order-table td:first-child {
    text-align: left;
    font-weight: 600;
    padding-left: 16px;
}
.calc-order-table tbody tr:hover {
    background: #f9fbff;
}
.calc-order-table .order-price-cell {
    font-weight: 700;
    color: #3F79D4;
    font-size: 15px;
    white-space: nowrap;
}

.calc-order-table .counter {
    justify-content: center;
}

.calc-order-services {
    font-size: 13px;
    color: #555;
    text-align: left;
}
.calc-order-os {
    font-size: 13px;
    white-space: nowrap;
}

.calc-order-total-row td {
    padding: 16px 10px;
    font-size: 16px;
    font-weight: 700;
    background: #f5fbff;
    border-bottom: none;
}
.calc-order-total-row td:last-child {
    color: #3F79D4;
    font-size: 20px;
}

.calc-order-setup-row td {
    font-size: 13px;
    color: #888;
    padding: 6px 10px;
    border-bottom: none;
}

.calc-order-contacts {
    margin-top: 24px;
}
.calc-order-contacts-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #232536;
}
.calc-order-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.calc-order-field {
    display: flex;
    flex-direction: column;
}
.calc-order-field label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #555;
}
.calc-order-field input {
    padding: 12px 16px;
    border: 1px solid rgba(33, 46, 58, 0.2);
    border-radius: 8px;
    font-family: Montserrat;
    font-size: 15px;
    font-weight: 400;
    color: #232536;
    background: white;
    transition: border-color 0.3s;
}
.calc-order-field input:focus {
    border-color: #3F79D4;
    outline: none;
}
.calc-order-field input.error {
    border-color: #e53935;
}
.calc-order-field.full-width {
    grid-column: 1 / -1;
}

.calc-order-submit-wrap {
    text-align: center;
    margin-top: 24px;
}
.calc-order-submit {
    background: #FFD050;
    border: none;
    border-radius: 80px;
    padding: 14px 48px;
    font-family: Montserrat;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    color: #232536;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.calc-order-submit:hover {
    background: #ffe59c;
}
.calc-order-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.calc-order-submit svg {
    transition: 0.3s;
    position: relative;
    left: 0;
}
.calc-order-submit:hover svg {
    left: 5px;
}

.calc-order-message {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 500;
    display: none;
}
.calc-order-message.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.calc-order-message.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.calc-server-instance {
    position: relative;
}
.calc-server-instance + .calc-server-instance {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed rgba(63, 121, 212, 0.2);
}

@media (max-width: 1024px) {
    .calc-order-panel {
        padding: 28px 20px;
        margin: 20px auto;
    }
    .calc-order-table th,
    .calc-order-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    .calc-order-table input[type="number"] {
        width: 50px;
    }
}

@media (max-width: 768px) {
    .calc-price-block {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 16px;
    }
    .calc-specs-list {
        flex-direction: column;
    }
    .calc-specs-item {
        min-width: auto;
    }
    .calc-total-block {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 20px;
    }
    .calc-order-fields {
        grid-template-columns: 1fr;
    }
    .calc-order-panel {
        padding: 20px 16px;
        width: 94%;
        margin: 20px auto;
    }
    .calc-order-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    .calc-order-table {
        min-width: 0;
        table-layout: auto;
    }
    .calc-order-table colgroup {
        display: none;
    }
    .calc-order-table thead {
        display: none;
    }
    .calc-order-table tbody tr {
        display: flex;
        flex-direction: column;
        background: #F5FBFF;
        border-radius: 10px;
        padding: 16px;
        margin-bottom: 12px;
        border: 1px solid rgba(63, 121, 212, 0.1);
    }
    .calc-order-table tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 8px 0;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        font-size: 14px;
        width: 100% !important;
        box-sizing: border-box;
    }
    .calc-order-table tbody tr td:last-child {
        border-bottom: none;
    }
    .calc-order-table tbody tr td:first-child {
        padding-left: 0;
        font-size: 16px;
        font-weight: 700;
        justify-content: center;
        text-align: center;
        margin-bottom: 4px;
        border-bottom: 2px solid rgba(63, 121, 212, 0.15);
        padding-bottom: 12px;
    }
    .calc-order-table tbody tr td:before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        color: #232536;
        font-size: 13px;
        min-width: 100px;
        flex-shrink: 0;
        margin-right: 12px;
    }
    .calc-order-table tbody tr td:first-child:before {
        display: none;
    }
    .calc-order-table .order-price-cell {
        font-size: 18px;
        padding-top: 10px;
    }
    .calc-order-table .order-counter {
        gap: 4px;
    }
    .calc-order-table input[type="number"] {
        width: 45px;
    }
    .calc-order-table .calc-order-os,
    .calc-order-table .calc-order-services {
        text-align: right;
        font-size: 13px;
    }
    .calc-order-total-row {
        background: #232536 !important;
        border-radius: 10px !important;
        padding: 20px 16px !important;
    }
    .calc-order-total-row td {
        color: white !important;
        border-bottom: none !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 4px 0 !important;
    }
    .calc-order-total-row td:first-child {
        border-bottom: none !important;
        font-size: 14px;
        font-weight: 600;
        background: #232536;
        color: white !important;
        border-radius: 10px 10px 0 0;
    }
    .calc-order-total-row td:last-child {
        color: #FFD050 !important;
        font-size: 24px !important;
        font-weight: 700;
    }
    .calc-order-total-row td:before {
        display: none;
    }
    .calc-order-setup-row {
        padding: 8px 16px !important;
    }
    .calc-order-setup-row td {
        border-bottom: none !important;
        font-size: 12px;
    }
    .calc-order-setup-row td:before {
        display: none;
    }
    .calc-bottom-buttons {
        flex-direction: column;
        gap: 12px;
    }
    .calc-bottom-buttons .btn {
        width: 100%;
        box-sizing: border-box;
    }
    .calc-add-server {
        width: 100%;
        font-size: 13px;
        padding: 11px 20px;
        box-sizing: border-box;
    }
    .calc-tooltip-box {
        padding: 24px 20px;
    }
    .tab_info {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .calc-price-value {
        font-size: 24px;
    }
    .calc-total-value {
        font-size: 26px;
    }
    .calc-order-panel {
        padding: 20px 14px;
        width: 96%;
        margin: 10px auto;
    }
    .calc-order-submit {
        width: 100%;
        justify-content: center;
    }
}
