/* 레이어 팝업 — 브라우저 window.open 아님 */
.cl-popup-root {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.cl-popup-root.is-open {
	display: flex;
}

.cl-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.cl-popup-stack {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	max-width: 100%;
}

.cl-popup-item {
	position: relative;
	background: #fff;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	box-sizing: border-box;
}

/* 크기 미지정: 이미지 원본에 맞춤 */
.cl-popup-item.is-auto-size {
	width: auto;
	max-width: 92vw;
}

/* 가로 지정 시 JS에서 width 설정, 화면 넘치면 축소 */
.cl-popup-item.is-fixed-width {
	max-width: 92vw;
}

.cl-popup-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #111 !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #fff !important;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	font-weight: 700;
	font-style: normal;
	line-height: 1;
	letter-spacing: 0;
	text-indent: 0;
	text-shadow: none;
	text-decoration: none;
	text-transform: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	opacity: 0.85;
}

.cl-popup-close:hover,
.cl-popup-close:focus {
	background: #000 !important;
	background-image: none !important;
	color: #fff !important;
	opacity: 1;
	outline: none;
	box-shadow: none !important;
}

.cl-popup-close span {
	display: block;
	line-height: 1;
	transform: translateY(-1px);
}

.cl-popup-media {
	display: block;
	line-height: 0;
}

.cl-popup-media a {
	display: block;
}

.cl-popup-media img {
	display: block;
	height: auto;
	max-width: 100%;
}

.cl-popup-item.is-auto-size .cl-popup-media img {
	width: auto;
	max-width: 92vw;
	max-height: 80vh;
}

.cl-popup-item.is-fixed-width .cl-popup-media img {
	width: 100%;
}

.cl-popup-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	background: #f6f7f7;
	border-top: 1px solid #e2e4e7;
	font-size: 13px;
	color: #2c3338;
}

.cl-popup-hide-today {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	user-select: none;
}

.cl-popup-close-text {
	border: 0;
	background: transparent;
	color: #2271b1;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 0;
}

.cl-popup-close-text:hover {
	text-decoration: underline;
}

@media (max-width: 640px) {
	.cl-popup-item.is-auto-size,
	.cl-popup-item.is-fixed-width {
		width: min(100%, 92vw) !important;
		max-width: 92vw !important;
	}

	.cl-popup-stack .cl-popup-item + .cl-popup-item {
		display: none;
	}
}
