@charset "utf-8";

/*  読み込み中　-------------------------*/
.modal_loading {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    z-index: 2005;
}
.modal_loading img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    margin-left: -25px;
    text-align: center;
    color: #fff;
    opacity: .8;
    animation: modal_spin 1.5s linear infinite;
}
@keyframes modal_spin {
    0% {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
}

/*　モーダルウィンドウ　---------*/
body.modal_open {
    overflow: hidden !important;
}

#modal_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-color: rgba(0,0,0,0.75);
    z-index: 1999;
}

#modal_window * {
	box-sizing: content-box;
}

#modal_window {
    display: none;
    width: 100%;
    height: 120%;
}

#modal_content {
    position: fixed;
    display: inline-block;
    z-index: 2001;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 4px solid #000;
/*    border-radius: 6px;*/
    transition: all .5s ease;
}
#modal_content.change_item img#modal_item {
    opacity: 0;
    transition: all .5s ease;
}

#modal_content img#modal_item {
    background-color: #ccc;
}

#modal_content iframe#modal_item {
    vertical-align: middle;
    border: none;
}

/* .modal_gallery_btn.close {
	position: absolute;
	display: inline-block;
	width: 150px;
	height: 50px;
	margin: 0;
	padding: 0;
	bottom: -70px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 3.6vw;
	color: #fff;
	font-weight: bolder;
	border: solid 3px #000;
	background-color: #0000a7;
	box-shadow: 0 0 0 4px #FFF inset;
} */
.modal_gallery_btn.close {
	position: absolute;
	display: inline-block;
	width: 50px;
	height: 50px;
	margin: 0;
	padding: 0;
	top: 0;
	right: 0;
	transform: translateY(-130%);
}
.modal_gallery_btn.close::before, .modal_gallery_btn.close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 5px;
	background: #fff;
}
.modal_gallery_btn.close::before {
	transform: translate(-50%,-50%) rotate(45deg);
}
.modal_gallery_btn.close::after {
	transform: translate(-50%,-50%) rotate(-45deg);
}

.modal_gallery_btn.prev,
.modal_gallery_btn.next {
    position: absolute;
    display: inline-block;
    width: 36px;
    height: 80px;
    margin: 0;
    padding: 0;
    border: none;
    background-color: #fff;
    z-index: 2012;
    color: #666;
    letter-spacing: normal;
    line-height: 30px;
    font-size: 20px;
    font-weight: bolder;
    text-align: center;
    transition: all .5s ease;
}
.modal_gallery_btn.prev {
    border-radius: 6px 0 0 6px;
}
.modal_gallery_btn.next {
    border-radius: 0 6px 6px 0;
}
.modal_gallery_btn.prev {
	z-index: 2011;
}
.modal_gallery_btn.next {
	z-index: 2012;
}

/*.modal_gallery_btn.close:hover,*/
.modal_gallery_btn.prev:hover,
.modal_gallery_btn.next:hover {
    color: #aaa;
    opacity: 1;
}

.ctrl_OFF .modal_gallery_btn.prev,
.ctrl_OFF .modal_gallery_btn.next {
	display: none;
}


/* タッチデバイス用 */
#modal_window.touch #modal_content {
    padding: 0;
    /* border: solid 4px #000; */
}

#modal_window.touch #modal_content img#modal_item {
	border-radius: 6px;
}

#modal_control {
    display: none;
    position: fixed;
    width: 92%;
	top: 0;
	right: 0;
    height: 50px;
    background-color: rgba(0,0,0,0.6);
	border: solid 1px #888;
	border-radius: 20px;
    z-index: 2010;
	transition: all .5s ease;
	transform: translateY(-130%);
}

#modal_control .modal_gallery_btn.close {
	transform: translateY(0);
}
#modal_control .modal_gallery_btn.prev,
#modal_control .modal_gallery_btn.next {
    position: relative;
    display: inline-block;
    width: 35%;
	height: 100%;
	top: 0;
	right: 0;
	border-radius: 0;
	opacity: 1;
	font-size: 24px;
	font-weight: normal;
	background-color: transparent;
}
#modal_control .modal_gallery_btn.prev {
	border-radius: 20px 0 0 20px;
}
#modal_control .modal_gallery_btn.next {
	border-radius: 0 20px 20px 0;
}
#modal_control .modal_gallery_btn.prev.hover,
#modal_control .modal_gallery_btn.next.hover,
#modal_control .modal_gallery_btn.close.hover {
	background-color: rgba(255,255,255,0.5);
	transition: .1s all;
}
/* 「次へ・前へ」ボタンを表示しない場合 */
#modal_window.ctrl_OFF + #modal_control {
	background-color: transparent;
	border: none;
}
/* #modal_window.ctrl_OFF + #modal_control .modal_gallery_btn.close {
	width: 150px;
	font-size: 3.6vw;
	color: #fff;
	font-weight: bolder;
	border: solid 3px #000;
	background-color: #0000a7;
	box-shadow: 0 0 0 4px #FFF inset;
} */
#modal_window.ctrl_OFF + #modal_control .modal_gallery_btn.close {
	/* width: 150px;
	font-size: 3.6vw; */
}
#modal_window.ctrl_OFF + #modal_control .modal_gallery_btn.prev,
#modal_window.ctrl_OFF + #modal_control .modal_gallery_btn.next {
	display: none;
}
@media screen and (max-height: 56.25vw) {
	#modal_control {
		bottom: -10px!important;
	}
	#modal_window.ctrl_OFF + #modal_control .modal_gallery_btn.close {
		/* width: 300px;
		height: 60px;
		font-size: 20px; */
	}
}


/* リスト用スタイル */
.modal_list {
	cursor: pointer;
}
/*
.modal_list {
	position: relative;
	margin: 0;
	font-size: 0;
}
#media .modal_list {
	margin: 0 130px;
}
.modal_list .thumbnail {
	position: relative;
	display: inline-block;
	width: calc(100% / 5);
	margin: 0;
	padding: 4px;
	text-align: center;
	cursor: pointer;
	overflow: hidden;
}
.modal_list .thumbnail > img {
	border-radius: 5px;
}
#logo .modal_list .thumbnail > img {
	border: solid 1px #ccc;
}

.modal_list .thumbnail:hover > img {
	filter: brightness(0.5);
}
@media screen and (max-width:768px) {
	#media .modal_list {
		margin: 3%;
		margin-bottom: -20px;
		padding: 0;
		text-align: center;
	}
	.modal_list .thumbnail {
		width: calc(100% / 4);
		margin: 0 10px 20px;
		padding: 0;
	}
}
@media screen and (max-width:520px) {
	#media .modal_list {
		margin: 0;
	}
	.modal_list .thumbnail {
		width: calc(100% / 2.5);
	}
}
*/

