/*==============================*/
/* Simple Lightbox */
/*==============================*/

/*---------------------------------*/
/* 背景スクロール固定 */
/*---------------------------------*/
body.is-lightbox-open{
	overflow: hidden;
}

/*---------------------------------*/
/* Lightbox背景 */
/*---------------------------------*/
div.simpleLightbox{
	position: fixed;
	top: 0;
	left: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	visibility: hidden;
	width: 100%;
	height: 100%;
	padding: 64px;
	background: rgba(0,0,0,0);
	opacity: 0;
	box-sizing: border-box;
	pointer-events: none;
	transition:
		background-color .5s ease,
		opacity .5s ease,
		visibility .5s ease;
}

div.simpleLightbox.is-open{
	visibility: visible;
	background: rgba(0,0,0,.82);
	opacity: 1;
	pointer-events: auto;
}

/* ======= TB =======*/
@media screen and (min-width: 768px) and (max-width: 1024px) {

	div.simpleLightbox{
		padding: 56px;
	}

}

/* ======= SP =======*/
@media screen and (max-width: 767px) {

	div.simpleLightbox{
		padding: 64px 24px;
	}

}

/*---------------------------------*/
/* Lightbox本体 */
/*---------------------------------*/
div.simpleLightbox-inner{
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
}

/*---------------------------------*/
/* 画像エリア */
/*---------------------------------*/
div.simpleLightbox figure{
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	margin: 0;
	opacity: 0;
	transform: scale(.94) translateY(8px);
	transition:
		opacity .55s ease,
		transform .55s cubic-bezier(.22,.61,.36,1);
}

div.simpleLightbox.is-image-show figure{
	opacity: 1;
	transform: scale(1) translateY(0);
}

/*---------------------------------*/
/* 画像 */
/*---------------------------------*/
div.simpleLightbox figure img{
	display: block;
	width: auto;
	height: auto;
	max-width: min(960px, calc(100vw - 128px));
	max-height: min(760px, calc(100vh - 128px));
	margin: 0;
	border-radius: 4px;
	box-shadow: 0 16px 48px rgba(0,0,0,.4);
}

/* ======= TB =======*/
@media screen and (min-width: 768px) and (max-width: 1024px) {

	div.simpleLightbox figure img{
		max-width: min(820px, calc(100vw - 112px));
		max-height: min(700px, calc(100vh - 112px));
	}

}

/* ======= SP =======*/
@media screen and (max-width: 767px) {

	div.simpleLightbox figure img{
		max-width: calc(100vw - 48px);
		max-height: calc(100vh - 128px);
		border-radius: 3px;
	}

}

/*---------------------------------*/
/* 閉じるボタン */
/*---------------------------------*/
button.simpleLightbox-close{
	position: absolute;
	top: -18px;
	right: -18px;
	z-index: 2;
	display: block;
	width: 42px;
	height: 42px;
	padding: 0;
	background: rgba(0,0,0,.72);
	border: 1px solid rgba(255,255,255,.65);
	border-radius: 50%;
	cursor: pointer;
	opacity: 0;
	transform: scale(.8);
	transition:
		background-color .3s ease,
		opacity .4s ease .15s,
		transform .4s ease .15s;
}

div.simpleLightbox.is-image-show button.simpleLightbox-close{
	opacity: 1;
	transform: scale(1);
}

button.simpleLightbox-close::before,
button.simpleLightbox-close::after{
	position: absolute;
	top: 50%;
	left: 50%;
	content: "";
	width: 21px;
	height: 2px;
	background: #fff;
	border-radius: 1px;
}

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

button.simpleLightbox-close::after{
	transform: translate(-50%,-50%) rotate(-45deg);
}

button.simpleLightbox-close:hover{
	background: rgba(0,0,0,.95);
}

/* ======= TB =======*/
@media screen and (min-width: 768px) and (max-width: 1024px) {

	button.simpleLightbox-close{
		top: -17px;
		right: -17px;
		width: 40px;
		height: 40px;
	}

}

/* ======= SP =======*/
@media screen and (max-width: 767px) {

	button.simpleLightbox-close{
		top: -16px;
		right: -8px;
		width: 38px;
		height: 38px;
	}

	button.simpleLightbox-close::before,
	button.simpleLightbox-close::after{
		width: 19px;
	}

}

/*---------------------------------*/
/* 読み込み中 */
/*---------------------------------*/
div.simpleLightbox-loader{
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255,255,255,.25);
	border-top-color: #fff;
	border-radius: 50%;
	transform: translate(-50%,-50%);
	animation: simpleLightbox-loading .8s linear infinite;
}

div.simpleLightbox.is-image-show div.simpleLightbox-loader{
	display: none;
}

@keyframes simpleLightbox-loading{

	0%{
		transform: translate(-50%,-50%) rotate(0);
	}

	100%{
		transform: translate(-50%,-50%) rotate(360deg);
	}

}