.modal_window {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999;
	display: none;
	align-items: center;
	justify-content: center;
}

.modal_overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    transition: background-color .3s ease;
    z-index: 0;
}
.modal_window_active .modal_overlay {
    background-color: rgb(0 0 0 / 50%);
}

.modal_block {
    max-width: 500px;
    min-width: 370px;
    width: 100%;
    background-color: #ffffff;
    z-index: 1;
    position: relative;
    top: -50px;
    opacity: 0;
    overflow: hidden;
    transition: max-width .3s ease;
}
.modal_body {
    padding: 0 40px 60px;
}
.modal_closet {
    position: relative;
    width: 25px;
    height: 25px;
    margin-left: auto;
    margin-right: 15px;
    margin-top: 10px;
    cursor: pointer;
}

.modal_closet:before, .modal_closet:after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #c9c9c9;
    position: absolute;
    top: 50%;
    left: 50%;
    transition: background-color .3s ease;
}

.modal_closet:before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal_closet:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.modal_closet:hover:before, .modal_closet:hover:after {
	background-color: #FF3A1D;
}

.modal_head {
    text-align: center;
    font-size: 28px;
    margin: 18px 0 35px;
    padding: 0 15px;
}
.modal_body input, .modal_body select, .modal_body textarea {
    display: block;
    width: 100%;
    margin: 0 auto 17px;
}

.password_link {
    display: flex;
    justify-content: center;
    margin: 18px 0;
}
.modal_block a:not(.button) {
    border-bottom: dashed 1px;
    transition: border-color .3s ease;
    text-decoration: none;
}
.modal_block a:hover {
    border-color: transparent;
}

.modal_footer {
    background-color: #f0f5fa;
    min-height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.modal_body .btn, .modal_body button:not([class]), .modal_body .button, .modal_body input[type="submit"] {
    width: auto;
    margin-bottom: 0;
    min-height: 48px;
}

.register_link a {
    margin-left: 3px;
}
.modal_body input:active, .modal_body select:active, .modal_body textarea:active, .modal_body input:focus, .modal_body select:focus, .modal_body textarea:focus {
    border-color: rgb(240 122 33 / 50%);
}
#login .modal_body {
    padding-bottom: 40px;
}
.modal_window.error .modal_block {
    background-color: #ffe5e5;
    color: #f00;
}

.modal_window.error .modal_closet:before, .modal_window.error .modal_closet:after {
    background-color: #ff8282;
}

.modal_window.error .modal_closet:hover:before, .modal_window.error .modal_closet:hover:after {
    background-color: #FF3A1D;
}

.modal_window.error .modal_block .modal_body {
    padding-bottom: 40px;
}
.modal_window.error ul:not([class]) li:before {
    background-color: #f00;
    display: none;
}
.modal_window.success .modal_block {
    background-color: #ccffcf;
    color: #129710;
    font-size: 18px;
    line-height: 150%;
}

.modal_window.success .modal_body {
    padding-top: 20px;
    text-align: center;
    max-width: 80%;
    width: 100%;
    margin: 0 auto;
}
.modal_window.success .modal_closet:before, .modal_window.success .modal_closet:after {
    background-color: #83c987;
}

.modal_window.success .modal_closet:hover:before, .modal_window.success .modal_closet:hover:after {
    background-color: #FF3A1D;
}

.modal_window.warning .modal_block {
    background-color: #fef3eb;
    color: #f07a21;
    font-size: 18px;
    line-height: 150%;
}

.modal_window.warning .modal_body {
    padding-top: 20px;
    text-align: center;
    max-width: 80%;
    width: 100%;
    margin: 0 auto;
}
.modal_window.warning .modal_closet:before, .modal_window.warning .modal_closet:after {
    background-color: #f07a21;
}

.modal_window.warning .modal_closet:hover:before, .modal_window.warning .modal_closet:hover:after {
    background-color: #FF3A1D;
}
.modal_body .quantity input {
    max-width: 100%;
    margin: 0;
}

.modal_block .scm_table_product_image a {
    border: none;
}

#modal_cart .modal_block {
    max-width: 800px;
}

.modal_buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal_body .modal_buttons input[type="submit"] {
    margin: 0;
}