#modal_faded{
	background:rgba(0,0,0,.7);
	position: fixed;
	left:0;
	top:0;
	z-index:2000;
	width:100%;
	height: 100%;
	display: none;
}

#modal_faded.opened{
	display: block;
}

#modal_win,
#modal_img_win{
	z-index:2001;
	left:50%;
	top:50%;
	transform: translateX(-50%) translateY(-50%);
	display: none;
	position: fixed;
	background:white;
	border:solid 2px rgba(150,150,150,1);
	width: 900px;
	padding:10px 6px;
	min-height: 300px;
	max-height: 650px;
	flex-direction: column;
	user-select: none;
	-moz-user-select:none;
	-webkit-user-select:none;
}

#modal_win.opened,
#modal_img_win.opened{
	display: flex;
}

#modal_header{
	border-bottom:solid 2px grey;
	padding-bottom:15px;
	height: 20%;
}

#modal_text{
	min-height: 220px;
	user-select: text;
	-moz-user-select:text;
	-webkit-user-select:text;
}

#modal_btns{
	height: 10%;
	display: flex;
	flex-direction: row;
}

#modal_exit{
	display: inline-block;
	position: fixed;
	right:10px;
	cursor: pointer;
}

.modal_btn{
	text-align: center;
	display: inline-block;
	padding:3px 5px;
	background:rgba(0, 106, 244, .6980392156862745);
	border-radius: 2px;
	color:white;
	height: 25px;
	line-height: 25px;
	width: 100%;
	text-overflow: ellipsis;
	overflow: hidden;
	margin-left:2.5px;
	margin-right: 2.5px;
	cursor: pointer;
	position: relative;
}

.modal_btn.first{
	display: none;
}

.modal_btn:hover:after{
	content:'';
	position: absolute;
	top:0;
	left:0;
	width:100%;
	height: 100%;
	background:rgba(0,0,0,.1);
}

.modal_btn:active:after{
	content:'';
	position: absolute;
	top:0;
	left:0;
	width:100%;
	height: 100%;
	background:rgba(0,0,0,.15);
}

#modal_img_cont{
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
}
#modal_img_cont img{
	max-height: 570px;
	max-width: 900px;
}
#modal_img_cont div:first-child{
	left:20px
}
#modal_img_cont div:last-child{
	right:20px
}

.modal_img_btn_slides{
	position: fixed;
	top:25%;
	height:50%;
	width:20%;
	display: flex;
	align-items: center;
	opacity: 0.3;
	transition: 300ms;
	padding:0 5px;
}

.modal_img_btn_slides.hided{
	display: none;
}

.modal_img_btn_slides:hover{
	opacity: 0.9;
	cursor: pointer;
}

.modal_img_btn_slides i{
	font-size:10em;
	color:white;
	text-shadow: black 0px 0px 10px;
}

#modal_img_btn_prev{
	left:0;
	justify-content: flex-start;
}

#modal_img_btn_next{
	right:0;
	justify-content: flex-end;
}

@media screen and (max-height: 680px){
	#modal_win,
	#modal_img_win{
		/*position: absolute;*/
		top:0;
		transform: translateX(-50%)
	}
}

@media screen and (max-width:900px){
	.modal_img_btn_slides{
		height:25%
	}
	#modal_win,
	#modal_img_win{
		width:calc(100% - 14px);
		height: 100%;
		/*position: absolute;*/
		left:0;
		top:0;
		transform: unset;
	}
	#modal_exit{
		position: absolute;
	}
	#modal_img_cont img{
		max-width: unset;
		max-height: unset;
	}
	#modal_img_cont{
		overflow:auto;
		display: block;
	}
}