/**
 * Success case document popup and overlay.
 *
 * @package AriawellTheme
 */

#overlay-mask {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: none;
	z-index: 300;
}

#overlay-mask.on {
	display: block;
}

.case__popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	max-width: 500px;
	padding: 0 10px;
	opacity: 0;
	visibility: hidden;
	transition: 0.5s;
	z-index: 301;
}

.case__popup.on {
	opacity: 1;
	visibility: visible;
}

.case__popup .close {
	width: 30px;
	margin-left: auto;
	margin-bottom: 15px;
	cursor: pointer;
	color: #fff;
}

.case__popup .close > svg {
	width: 30px;
	height: 30px;
}

.case__popup-view {
	font-size: 0;
	max-height: 80vh;
	border-radius: 10px;
	overflow-y: auto;
}

.case__popup-view::-webkit-scrollbar {
	display: none;
}

.case__popup-view > img {
	width: 100%;
	height: auto;
}

.case-document-thumb {
	position: relative;
	font-size: 0;
}

.case-document-thumb > figure {
	margin: 0;
}

.case-document-thumb > figure > img {
	width: 100%;
	height: auto;
	display: block;
}

.case-document-thumb .show {
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 30px;
	line-height: 35px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.7);
	text-align: center;
	color: #fff;
	cursor: pointer;
}

.case-document-thumb .show > svg {
	width: 20px;
	height: 20px;
	vertical-align: middle;
}

body.ms-case-list .case-item .thumb.case-document-thumb > figure,
.case-item .thumb.case-document-thumb > figure {
	width: 100px;
	margin: 0 auto;
	padding: 5px;
	border: 1px solid #ddd;
}

.success-cases-section .success-cases-list-image.case-document-thumb {
	display: inline-block;
	max-width: 100px;
}

.success-cases-section .success-cases-list-image.case-document-thumb > figure {
	padding: 5px;
	border: 1px solid #ddd;
}

@media all and (max-width: 1023px) {
	body.ms-case-list .case-item .thumb.case-document-thumb {
		position: absolute;
		top: 20px;
		left: 0;
		width: 100px;
	}

	body.ms-case-list .case-item .thumb.case-document-thumb .show {
		position: static;
		transform: none;
		width: 100%;
		line-height: 30px;
	}

	body.ms-case-list .case-item .thumb.case-document-thumb .show > svg {
		width: 15px;
		height: 15px;
	}
}

@media all and (max-width: 660px) {
	.case__popup {
		max-width: calc(100% - 32px);
	}

	body.ms-case-list .case-item .thumb.case-document-thumb .show {
		line-height: 28px;
	}

	body.ms-case-list .case-item .thumb.case-document-thumb .show > svg {
		width: 13px;
		height: 13px;
	}
}

/* Office gallery popup: swiper-bundle.css의 .swiper { padding:0 }보다 우선 */
.image-popup-overlay .popup-swiper {
	width: 100%;
	padding: 0 80px;
	font-size: 0;
	box-sizing: border-box;
}

.image-popup-overlay .popup-swiper .swiper-slide {
	overflow: hidden;
	border-radius: 20px;
}

.image-popup-overlay .popup-swiper .swiper-slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.image-popup-overlay .popup-swiper .swiper-button-prev {
	left: 1px;
}

.image-popup-overlay .popup-swiper .swiper-button-next {
	right: 1px;
}

.image-popup-overlay .popup-swiper .swiper-button-prev,
.image-popup-overlay .popup-swiper .swiper-button-next {
	width: 38px;
	height: 38px;
}

.image-popup-overlay .popup-swiper .swiper-button-prev::after,
.image-popup-overlay .popup-swiper .swiper-button-next::after {
	display: none;
}
