.popup {
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 50%;
    /*width: 100%;*/
    height: calc(100% - 50px);
    justify-content: center;
    align-items: center;
    display: none;
    z-index: 1000;
    /*max-width: 1060px;*/
    &.active {
        display: flex;
    }
    .close_popup {
        position: absolute;
        width: 40px;
        height: 40px;
        border-radius: 10rem;
        left: 0;
        right: 0;
        margin: 0 auto;
        top: -50px;
        cursor: pointer;
        border: 2px solid #0b2766;
        &:after,
        &:before {
            content: "";
            position: absolute;
            width: 2px;
            height: 20px;
            background: #0b2766;
            left: 17px;
            top: 8px;
        }
        &:after {
            transform: rotate(45deg);
        }
        &:before {
            transform: rotate(-45deg);
        }
    }
    .criteria_popup {
        /*overflow: hidden;*/
        max-width: 670px;
        margin: 0 auto;
        position: relative;
        height: auto;
        border-radius: 20px;
        .form_outer_criteria {
            background: #ffffff;
            border: 1px solid #e7eaf3;
            box-shadow: 0px 30px 54px rgb(31 64 150 / 21%);
            border-radius: 20px;
            overflow-y: auto;
            max-height: 550px;
            padding: 40px 55px 50px;
            overflow-y: auto;
            height: 100%;
        }
        form {
            padding: 0 0 20px;
            .head {
                h5 {
                    font-weight: 500;
                    font-size: 20px;
                    line-height: 170%;
                    color: #0b2766;
                    padding: 0 0 12px;
                }
                p {
                    font-size: 16px;
                    line-height: 170%;
                    color: #5673b1;
                }
            }
            .loader {
                position: absolute;
                left: 0;
                right: 0;
                top: 0;
                width: 100%;
                height: 100%;
                align-items: center;
                justify-content: center;
                background: #0000003d;
                z-index: 100;
                border-radius: 20px;
                display: none;
                &.active {
                    display: flex;
                }
                img {
                    width: 50px;
                }
            }
            .box {
                padding: 50px 0 0;
                &:last-child {
                    padding: 70px 0 0;
                }
                h4 {
                    font-weight: 800;
                    font-size: 12px;
                    line-height: 110%;
                    letter-spacing: 0.2em;
                    text-transform: uppercase;
                    color: rgba(86, 115, 177, 0.5);
                    padding: 0 0 20px;
                }
                p {
                    font-size: 14px;
                    line-height: 170%;
                    color: #5673b1;
                    padding-bottom: 20px;
                }
                .column {
                    display: flex;
                    justify-content: space-between;
                    padding: 0 0 20px;
                    &.purpose_1,
                    &.purpose_2 {
                        display: none;
                        &.active {
                            display: flex;
                        }
                    }
                    .form_block {
                        width: calc(50% - 10px);
                        label {
                            font-weight: 800;
                            font-size: 14px;
                            line-height: 120%;
                            color: #5673b1;
                            padding: 0 0 10px;
                            display: inline-block;
                        }
                        input {
                            width: 100%;
                            background: #f7f9ff;
                            border-radius: 5px;
                            border: none;
                            padding: 14px 10px;
                            min-height: 48px;
                            font-size: 17px;
                            line-height: 120%;
                            color: #0b2766;
                            border: 2px solid transparent;
                            &:focus {
                                border-color: #0b2766;
                            }
                            &:focus-visible {
                                outline: none;
                            }
                            &.invalid {
                                border-color: red;
                            }
                            &::placeholder {
                                color: #0b2766;
                            }
                        }
                        .search-autocomplites__result {
                            display: flex;
                            flex-wrap: wrap;
                            padding: 10px 0 0;
                            li {
                                background: #eef0f8;
                                margin: 1px 1px;
                                border-radius: 10rem;
                                font-size: 11px;
                                padding: 5px 20px 5px 5px;
                                position: relative;
                                text-transform: capitalize;
                                cursor: pointer;
                                .search-autocomplites__result-close {
                                    position: absolute;
                                    right: 10px;
                                    top: 7px;
                                    &:after,
                                    &:before {
                                        content: "";
                                        position: absolute;
                                        width: 1px;
                                        height: 10px;
                                        background: #0b2766;
                                    }
                                    &:after {
                                        transform: rotate(45deg);
                                    }
                                    &:before {
                                        transform: rotate(-45deg);
                                    }
                                }
                            }
                        }
                        .search_box {
                            position: relative;
                            input {
                                white-space: nowrap;
                                overflow: hidden;
                                text-overflow: ellipsis;
                            }
                            .search-autocomplites__list {
                                display: none;
                                position: absolute;
                                background: #fff;
                                z-index: 9;
                                width: 100%;
                                border: 1px solid #e7eaf3;
                                box-shadow: 0px 0px 6px rgb(31 64 150 / 21%);
                                left: 0;
                                border-radius: 5px;
                                top: 100%;
                                max-height: 150px;
                                overflow-y: auto;
                                ul {
                                    li {
                                        font-size: 14px;
                                        padding: 10px 10px;
                                        transition: all 0.5s ease-in-out;
                                        display: inline-flex;
                                        width: 100%;
                                        align-items: center;
                                        text-transform: capitalize;
                                        cursor: pointer;
                                        color: #0b2766;
                                        span {
                                            display: inline-block;
                                            padding: 0 2px 0 0;
                                        }
                                        &:hover {
                                            background: #e8e8e8;
                                        }
                                        &.filtered {
                                            display: none;
                                        }
                                        &.hidden {
                                            display: none;
                                        }
                                        &.active {
                                            display: block;
                                        }
                                    }
                                }
                            }
                            &:hover {
                                .search-autocomplites__list {
                                    display: block;
                                }
                            }
                            &.visible {
                                .search-autocomplites__list {
                                    display: block;
                                }
                            }
                        }
                    }
                }
            }
            .dropdown {
                position: relative;
                background: #f7f9ff;
                border-radius: 5px;
                padding: 14px 10px;
                font-size: 17px;
                line-height: 120%;
                color: #0b2766;
                min-height: 48px;
                cursor: pointer;
                border: 2px solid transparent;
                &.invalid {
                    border-color: red;
                }
                &.cities {
                    padding: 14px 55px 14px 10px;
                    span {
                        &.text {
                            white-space: nowrap;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            display: inherit;
                            width: 100%;
                        }
                    }
                }
                .arrow {
                    width: 24px;
                    height: 24px;
                    background: rgba(11, 39, 102, 0.05);
                    border-radius: 4px;
                    position: absolute;
                    right: 12px;
                    top: 12px;
                    background-image: url(/images/Vector_arrow.png);
                    background-repeat: no-repeat;
                    background-position: 6px 9px;
                }
                ul {
                    display: none;
                    position: absolute;
                    background: #fff;
                    z-index: 9;
                    width: 100%;
                    border: 1px solid #e7eaf3;
                    box-shadow: 0px 0px 6px rgb(31 64 150 / 21%);
                    left: 0;
                    border-radius: 5px;
                    top: 100%;
                    max-height: 150px;
                    overflow-y: auto;
                    &.active {
                        display: block;
                    }
                    li {
                        font-size: 14px;
                        padding: 10px 10px;
                        transition: all 0.5s ease-in-out;
                        display: inline-flex;
                        width: 100%;
                        justify-content: space-between;
                        align-items: center;
                        text-transform: capitalize;
                        &:hover {
                            background: #e8e8e8;
                        }
                    }
                }
                /*&:hover {
                    ul {
                        display: block;
                    }
                }*/
            }
            .check_box {
                padding: 10px 0 0;
                &.checkbox_grid {
                    label {
                        display: flex;
                        justify-content: space-between;
                        align-items: flex-start;
                        span {
                            display: inline-block;
                            border: 2px solid #4a6cb7;
                            box-sizing: border-box;
                            border-radius: 3px;
                            height: 20px;
                            width: 20px;
                            margin: 0 5px 0 0;
                            position: relative;
                            top: 5px;
                            &.invalid {
                                border: 2px solid red;
                            }
                        }
                        p {
                            width: calc(100% - 34px);
                            padding-bottom: 0;
                        }
                    }
                }
                .checkbox-text {
                    font-weight: bold;
                    font-size: 17px;
                }
                label {
                    display: inline-flex;
                    align-items: center;
                    font-size: 14px;
                    line-height: 160%;
                    color: #5673b1;
                    cursor: pointer;
                    margin: 0 32px 0 0;
                    &:last-child {
                        margin: 0;
                    }
                    gap: 8px;
                    span {
                        display: inline-block;
                        border: 2px solid #4a6cb7;
                        box-sizing: border-box;
                        border-radius: 3px;
                        height: 20px;
                        width: 20px;
                        margin: 0 5px 0 0;
                        position: relative;
                        &:before {
                            content: "";
                            position: absolute;
                            width: 9px;
                            height: 4px;
                            border-left: 3px solid #0b2766;
                            border-bottom: 3px solid #0b2766;
                            transform: rotate(-56deg);
                            top: 3px;
                            left: 2px;
                            display: none;
                        }
                    }
                    input {
                        display: none;
                        &:checked {
                            + span {
                                background: #fff100;
                                border: 2px solid #fff100;
                                border-radius: 3px;
                                &:before {
                                    display: block;
                                }
                            }
                        }
                    }
                }
            }
            .btn_grid {
                text-align: center;
                position: relative;
                padding: 55px 0 0;
                .max_price_error {
                    position: absolute;
                    left: 0;
                    right: 0;
                    top: 20px;
                    color: red;
                    display: none;
                    &.show {
                        display: block;
                    }
                }
            }
            .error {
                display: none;
                color: #ff0505;
            }
            .recaptcha {
                display: none;
                color: #ff0505;
            }
            .messages {
                position: absolute;
                bottom: 35px;
                left: 0;
                width: 100%;
                text-align: center;
                right: 0;
            }
        }
    }
}
.form_select_item {
    width: 20% !important;
    .arrow {
        background-color: inherit !important;
        right: 5px !important;
    }
    .contacts_types_dropdown {
        position: relative;
    }
    .type_txt {
        background: #f7f9ff;
        border: 2px solid #f7f9ff;
        box-sizing: border-box;
        border-radius: 5px;
        font-size: 17px;
        line-height: 120%;
        color: #0b2766;
        padding: 12px 20px 12px 10px;
        width: 100%;
        min-height: 48px;
        position: relative;
        cursor: pointer;
    }

    .type_txt:before {
        content: "";
        position: absolute;
        width: 0px;
        height: 0px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid #4a6cb7;
        right: 10px;
        top: 20px;
    }
    input {
        width: 100%;
        font-size: 17px;
        line-height: 20px;
        color: #0b2766;
        background: #f7f9ff;
        border-radius: 5px;
        border: 2px solid #f7f9ff;
        padding: 14px 12px;
    }
    p {
        padding: 0px !important;
    }
    .dropdown_box {
        position: absolute;
        display: none;
        width: 100%;
        background: #f7f9ff;
        border-radius: 0 0 5px 5px;
        margin: -3px 0 0;
        z-index: 1;
        overflow: hidden;
    }
}

.form_column {
    width: 40%;
    label {
        font-weight: 800;
        font-size: 14px;
        line-height: 17px;
        color: #5673b1;
        padding: 0 0 10px;
        display: inline-block;
    }
    input {
        width: 100%;
        font-size: 17px;
        line-height: 20px;
        color: #0b2766;
        background: #f7f9ff;
        border-radius: 5px;
        border: 2px solid #f7f9ff;
        padding: 14px 12px;
    }
}
.form_column_inner {
    width: 40%;
    label {
        font-weight: 800;
        font-size: 14px;
        line-height: 17px;
        color: #5673b1;
        padding: 0 0 10px;
        display: inline-block;
    }
    input {
        width: 100%;
        font-size: 17px;
        line-height: 20px;
        color: #0b2766;
        background: #f7f9ff;
        border-radius: 5px;
        border: 2px solid #f7f9ff;
        padding: 14px 12px;
    }
}
.column {
    gap: 15px;
}
.overlay.criteria_overlay {
    background: rgb(255 255 255 / 92%);
}

.dropdown ul {
    display: none;
    position: absolute;
    background: #fff;
    z-index: 9;
    width: 100%;
    border: 1px solid #e7eaf3;
    box-shadow: 0px 0px 6px rgba(31, 64, 150, 0.21);
    left: 0;
    border-radius: 5px;
    top: 100%;
    max-height: 150px;
    overflow-y: auto;
    &:active {
        display: block !important;
    }
}
@media (max-width: 767px) {
    .popup {
        width: calc(100% - 20px);
        .close_popup {
            width: 30px;
            height: 30px;
            top: -40px;
            &:before,
            &:after {
                height: 15px;
                left: 12px;
                top: 6px;
            }
        }
        .criteria_popup {
            .form_outer_criteria {
                padding: 40px 25px 50px;
            }
            form {
                .head {
                    text-align: center;
                    h5 {
                        font-size: 16px;
                        line-height: 150%;
                    }
                    p {
                        font-size: 14px;
                        line-height: 150%;
                    }
                }
                .box {
                    max-width: 480px;
                    margin: 0 auto;
                    &:last-child {
                        padding: 40px 0 0;
                    }
                    p {
                        font-size: 14px;
                        line-height: 150%;
                    }
                    .column {
                        padding: 0;
                        flex-direction: column;
                        .form_block {
                            width: 100%;
                            padding: 0 0 10px;
                        }
                    }
                }
                .dropdown {
                    font-size: 15px;
                    line-height: 120%;
                }
                .btn_grid {
                    padding: 25px 0 0;
                    .max_price_error {
                        top: 15px;
                        font-size: 14px;
                    }
                }
                .check_box {
                    label {
                        margin: 0 10px 0 0;
                    }
                }
                .messages {
                    font-size: 12px;
                }
            }
        }
    }
    .form_column_inner {
        width: 100%;
    }
    .form_column {
        width: 100%;
    }
    .form_select_item {
        width: 100% !important;
    }
}
@media (min-width: 768px) and (max-width: 1199.5px) {
    .popup {
        width: 100%;
        max-width: 550px;
        .close_popup {
            width: 30px;
            height: 30px;
            top: -35px;
            &:after {
                width: 2px;
                height: 15px;
                left: 12px;
                top: 6px;
            }
            &:before {
                width: 2px;
                height: 15px;
                left: 12px;
                top: 6px;
            }
        }
        .close_popup {
            width: 30px;
            height: 30px;
            top: -35px;
            &:after,
            &:before {
                width: 2px;
                height: 15px;
                left: 12px;
                top: 6px;
            }
        }
        .criteria_popup {
            .form_outer_criteria {
                padding: 20px 20px 20px;
                .head {
                    text-align: center;
                }
            }
            form {
                .check_box {
                    label {
                        margin: 0 20px 0 0;
                    }
                }
                .btn_grid {
                    padding: 35px 0 0;
                }
            }
        }
    }
}
@media (min-width: 1440px) {
    .popup {
        .criteria_popup {
            .form_outer_criteria {
                max-height: 650px;
            }
        }
    }
}
