.old-calc-page-title,
.page-calc {
    max-width: 1320px;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
    color: var(--gray1-color, #3c3c3c);
}

.old-calc-page-title {
    margin-top: 44px;
    margin-bottom: 32px;
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2;
}

.page-calc {
    margin-bottom: 72px;
}

.page-calc > .hide {
    display: none !important;
}

.page-calc .form-calc {
    margin: 0;
}

.page-calc .row {
    margin-right: -18px;
    margin-left: -18px;
}

.page-calc .col-sm-4,
.page-calc .col-sm-12,
.page-calc .col-lg-2,
.page-calc .col-lg-4,
.page-calc .col-lg-5,
.page-calc .col-lg-12,
.page-calc .col-xs-4,
.page-calc .col-xs-12 {
    padding-right: 18px;
    padding-left: 18px;
}

.page-calc .calc-selected {
    min-height: 360px;
    margin: 0 auto 12px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.page-calc .calc-type-name {
    margin-bottom: 36px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.page-calc h2 {
    clear: both;
    margin: 0 0 18px;
    padding-top: 8px;
    color: var(--gray1-color, #3c3c3c);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
}

.page-calc label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray1-color, #3c3c3c);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.page-calc input[type="text"],
.page-calc input[type="number"],
.page-calc select,
.page-calc textarea {
    display: block;
    width: 100%;
    min-height: 45px;
    height: 45px;
    margin-bottom: 28px;
    padding: 13px 20px;
    border: 1px solid var(--gray4-color, #d5d7dc);
    border-radius: 4px;
    background-color: var(--white-color, #fff);
    color: var(--gray2-color, #737782);
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    transition: border-color .15s ease-in-out, color .15s ease-in-out, background-color .15s ease-in-out;
}

.page-calc select {
    padding-right: 42px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gray2-color, #737782) 50%),
        linear-gradient(135deg, var(--gray2-color, #737782) 50%, transparent 50%);
    background-position:
        calc(100% - 25px) 50%,
        calc(100% - 17px) 50%;
    background-size: 8px 8px, 8px 8px;
    background-repeat: no-repeat;
}

.page-calc textarea {
    height: auto;
    min-height: 120px;
}

.page-calc input[type="text"]:focus,
.page-calc input[type="number"]:focus,
.page-calc select:focus,
.page-calc textarea:focus {
    border-color: var(--gray3-color, #949494);
    outline: none;
}

.page-calc input[disabled],
.page-calc select[disabled],
.page-calc textarea[disabled] {
    background-color: var(--gray5-color, #f0f1f3);
    color: var(--gray2-color, #737782);
    cursor: default;
}

.page-calc a {
    color: var(--gray1-color, #3c3c3c);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-calc .btn-red,
.page-calc .btn-calc-link,
.page-calc .btn-red-border,
.page-calc input[type="submit"],
.page-calc input[type="button"],
.page-calc button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: 4px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: opacity .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.page-calc .btn-red,
.page-calc input[type="submit"].btn-red,
.page-calc input[type="button"].btn-red {
    border-color: var(--red-color, #fb1f2e);
    background-color: var(--red-color, #fb1f2e);
    color: var(--white-color, #fff);
}

.page-calc .btn-calc-link,
.page-calc .btn-red-border,
.page-calc input[type="button"]:not(.btn-red) {
    border-color: var(--gray5-color, #f0f1f3);
    background-color: var(--gray5-color, #f0f1f3);
    color: var(--gray1-color, #3c3c3c);
}

.page-calc input:disabled,
.page-calc button:disabled {
    opacity: .45;
    cursor: default;
}

.page-calc .form-result,
.page-calc #tableResult,
.page-calc #tableFoam,
.page-calc #tableTissue,
.page-calc #tableWork,
.page-calc #tableWork_1,
.page-calc #tableWork_2,
.page-calc #tableMaterials {
    overflow-x: auto;
}

.page-calc table {
    width: 100%;
}

#modalColors.modal,
#modalFabricColors.modal,
#success_modal.modal,
#alternative_cloth_modal.modal,
#project_select.modal {
    position: fixed;
    z-index: 11100;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 24px 12px;
    overflow-y: auto;
    background: rgba(0, 0, 0, .6);
    visibility: hidden;
    opacity: 0;
    transition: visibility .15s ease-in-out, opacity .15s ease-in-out;
}

#modalColors.modal.is-visible,
#modalFabricColors.modal.is-visible,
#success_modal.modal.is-visible,
#alternative_cloth_modal.modal.is-visible,
#project_select.modal.is-visible,
#project_select.modal.in {
    visibility: visible !important;
    opacity: 1 !important;
}

#modalColors .modalDialog,
#modalFabricColors .modalDialog,
#success_modal .modalDialog,
#alternative_cloth_modal .modalDialog,
#project_select .modalDialog {
    position: relative;
    z-index: 2;
    width: min(100%, 1180px);
    margin: 40px auto;
}

#success_modal .modalDialog,
#alternative_cloth_modal .modalDialog,
#project_select .modalDialog {
    width: min(100%, 720px);
}

#modalColors .modalContent,
#modalFabricColors .modalContent,
#success_modal .modalContent,
#alternative_cloth_modal .modalContent,
#project_select .modalContent {
    border-radius: 4px;
    background-color: var(--white-color, #fff);
    box-shadow: 0 6px 12px rgba(17, 17, 17, .2);
    overflow: hidden;
}

#modalColors .modalHeader,
#modalFabricColors .modalHeader,
#success_modal .modalHeader,
#alternative_cloth_modal .modalHeader,
#project_select .modalHeader {
    position: relative;
    padding: 24px 88px 18px 28px;
    border-bottom: 1px solid var(--gray5-color, #f0f1f3);
}

#modalColors .modalTitle,
#modalFabricColors .modalTitle,
#success_modal .modalTitle,
#alternative_cloth_modal .modalTitle,
#project_select .modalTitle {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
}

#modalColors .modalClose,
#modalFabricColors .modalClose,
#success_modal .modalClose,
#alternative_cloth_modal .modalClose,
#project_select .modalClose {
    position: absolute;
    top: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    width: 48px;
    min-height: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: var(--gray5-color, #f0f1f3);
    cursor: pointer;
}

#modalColors .modalClose::before,
#modalColors .modalClose::after,
#modalFabricColors .modalClose::before,
#modalFabricColors .modalClose::after,
#success_modal .modalClose::before,
#success_modal .modalClose::after,
#alternative_cloth_modal .modalClose::before,
#alternative_cloth_modal .modalClose::after,
#project_select .modalClose::before,
#project_select .modalClose::after {
    content: "";
    position: absolute;
    top: 23px;
    left: 15px;
    width: 18px;
    height: 2px;
    background: var(--gray1-color, #3c3c3c);
}

#modalColors .modalClose::before,
#modalFabricColors .modalClose::before,
#success_modal .modalClose::before,
#alternative_cloth_modal .modalClose::before,
#project_select .modalClose::before {
    transform: rotate(45deg);
}

#modalColors .modalClose::after,
#modalFabricColors .modalClose::after,
#success_modal .modalClose::after,
#alternative_cloth_modal .modalClose::after,
#project_select .modalClose::after {
    transform: rotate(-45deg);
}

#modalColors .modalBody,
#modalFabricColors .modalBody,
#success_modal .modalBody,
#alternative_cloth_modal .modalBody,
#project_select .modalBody {
    max-height: calc(100vh - 180px);
    padding: 28px;
    overflow-y: auto;
}

#modalColors .modalBody > .row,
#modalFabricColors .modalBody > .row {
    display: grid;
    margin-right: 0;
    margin-left: 0;
}

#modalColors .modalBody > .row:first-child {
    grid-template-columns: minmax(260px, 360px);
    margin-bottom: 28px;
}

#modalColors .modalBody > .row + .row,
#modalFabricColors .modalBody > .row {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 24px 22px;
    align-items: start;
}

#modalColors .modalBody [class*="col-"],
#modalFabricColors .modalBody [class*="col-"] {
    float: none !important;
    width: auto !important;
    min-height: 0;
    padding-right: 0;
    padding-left: 0;
}

#modalColors .modalSearch label,
#modalFabricColors .modalSearch label {
    margin-bottom: 8px;
}

#modalColors .modalSearchInput input,
#modalFabricColors .modalSearchInput input,
#alternative_cloth_modal input,
#project_select input[type="text"],
#project_select input[type="tel"],
#project_select input[type="submit"],
#project_select select,
#project_select .select2-container--default .select2-selection--single {
    display: block;
    width: 100%;
    min-height: 45px;
    height: 45px;
    padding: 13px 20px;
    border: 1px solid var(--gray4-color, #d5d7dc);
    border-radius: 4px;
    background-color: var(--white-color, #fff);
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 500;
}

#project_select .modalBody .form-calc {
    margin: 0;
}

#project_select .modalBody .row {
    margin-right: -18px;
    margin-left: -18px;
}

#project_select .modalBody [class*="col-"] {
    float: none;
    width: 100%;
    min-height: 0;
    padding-right: 18px;
    padding-left: 18px;
}

#project_select label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray1-color, #3c3c3c);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

#project_select .select2-container {
    width: 100% !important;
    margin-bottom: 24px;
}

#project_select .select2-container--default .select2-selection--single {
    margin-bottom: 0;
    padding: 0 42px 0 20px;
}

#project_select .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    color: var(--gray2-color, #737782);
    line-height: 43px;
}

#project_select .select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 50%;
    right: 12px;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
}

#project_select .select2-container--default .select2-selection--single .select2-selection__arrow b {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
}

#project_select .select2-container--default .select2-selection--single .select2-selection__arrow b::before,
#project_select .select2-container--default .select2-selection--single .select2-selection__arrow b::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 2px;
    border-bottom-left-radius: 2px;
    border-top-left-radius: 2px;
    background-color: var(--gray3-color, #949494);
}

#project_select .select2-container--default .select2-selection--single .select2-selection__arrow b::before {
    right: 11px;
    transform: rotate(45deg);
}

#project_select .select2-container--default .select2-selection--single .select2-selection__arrow b::after {
    right: 7px;
    transform: rotate(135deg);
}

#project_select input[type="submit"].btn-red {
    display: inline-flex;
    width: auto;
    min-width: 150px;
    margin-top: 4px;
    border: 2px solid var(--red-color, #fb1f2e);
    background-color: var(--red-color, #fb1f2e);
    color: var(--white-color, #fff);
    font-weight: 600;
    cursor: pointer;
}

#modalColors .imgThumb,
#modalFabricColors .imgThumb {
    margin: 0;
    cursor: pointer;
}

#modalColors .imgThumbImg,
#modalFabricColors .imgThumbImg {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
}

#modalColors .imgThumbTitle,
#modalFabricColors .imgThumbTitle {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.3;
}

@media (max-width: 991px) {
    .old-calc-page-title {
        margin-top: 28px;
        font-size: 24px;
    }

    .page-calc {
        margin-bottom: 48px;
    }

    .page-calc .calc-selected {
        min-height: 260px;
    }

    .page-calc h2,
    #modalColors .modalTitle,
    #modalFabricColors .modalTitle,
    #success_modal .modalTitle,
    #alternative_cloth_modal .modalTitle,
    #project_select .modalTitle {
        font-size: 20px;
    }
}
