@charset "UTF-8";

/* 메인 슬라이드 팝업 (include/main/popup.php) */
/* 화면 정중앙 · 관리자에서 정한 가로 × 세로(px), 화면보다 크면 같은 비율로 줄어듦 (아래 버튼 줄 56px 제외) */
.tpop {
	--tpop-foot: 56px;
	--tpop-k: 1; /* 관리자 크기에 곱하는 배율 (노트북 · 태블릿에서 줄임) */
	--tpop-gap: 32px; /* 화면 좌우 가장자리와 띄우는 여백 (양쪽 합) */
	--tpop-vgap: 32px; /* 화면 위아래 여백 (양쪽 합) */
	position: fixed;
	inset: 0;
	width: min(var(--tpop-w, 440px) * var(--tpop-k), 100% - var(--tpop-gap), (100vh - var(--tpop-vgap) - var(--tpop-foot)) * var(--tpop-r, 0.8));
	width: min(var(--tpop-w, 440px) * var(--tpop-k), 100% - var(--tpop-gap), (100dvh - var(--tpop-vgap) - var(--tpop-foot)) * var(--tpop-r, 0.8));
	height: fit-content;
	max-width: none;
	max-height: none;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: var(--text-color);
	overflow: hidden;
}

.tpop:focus {
	outline: none;
}

.tpop[open] {
	animation: tpop-in 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.tpop::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

@keyframes tpop-in {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
}

.tpop_media {
	position: relative;
}

.tpop_swiper {
	aspect-ratio: var(--tpop-r, 0.8);
	background: var(--surface-color);
}

.tpop_swiper .swiper-slide,
.tpop_swiper .swiper-slide > a {
	display: block;
	height: 100%;
}

.tpop_swiper img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
	user-select: none;
}

/* 넘김 버튼 · 쪽 번호 : 사진 아래쪽 가운데 */
.tpop_ctrl {
	position: absolute;
	left: 50%;
	bottom: 16px;
	z-index: 2;
	display: flex;
	align-items: center;
	height: 40px;
	padding: 0 4px;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.48);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	transform: translateX(-50%);
}

.tpop_prev,
.tpop_next {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: #fff;
	transition: background 0.2s;
}

.tpop_prev:hover,
.tpop_next:hover {
	background: rgba(255, 255, 255, 0.16);
}

.tpop_prev .ico,
.tpop_next .ico {
	width: 20px;
	height: 20px;
}

.tpop_prev .ico {
	transform: rotate(180deg);
}

.tpop_count {
	min-width: 48px;
	font-size: 14px;
	line-height: 1;
	text-align: center;
	color: rgba(255, 255, 255, 0.64);
	font-variant-numeric: tabular-nums;
}

.tpop_count b {
	font-weight: 700;
	color: #fff;
}

/* 아래 버튼 : 보지 않기 | 닫기 */
.tpop_foot {
	display: flex;
	border-top: 1px solid var(--line-color);
}

.tpop_foot button {
	flex: 1 1 0;
	height: 56px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	color: #444;
	transition: background 0.2s, color 0.2s;
}

.tpop_foot button + button {
	border-left: 1px solid var(--line-color);
}

.tpop_foot button:hover {
	background: var(--surface-color);
	color: var(--title-color);
}

/* 노트북: 80%로 줄이고 위아래 여백을 넉넉히 */
@media (max-width: 1440px) {
	.tpop {
		--tpop-k: 0.8;
		--tpop-vgap: 160px;
	}
}

/* 태블릿: 70%로 */
@media (max-width: 1024px) {
	.tpop {
		--tpop-k: 0.7;
	}
}

@media (max-width: 768px) {
	.tpop {
		--tpop-vgap: 80px;
	}

	.tpop {
		--tpop-foot: 48px;
		--tpop-gap: 80px;
	}

	.tpop_foot button,
	.tpop_foot .tpop_close {
		height: 48px;
		font-size: 14px;
		font-weight: 700;
		color: #444;
	}
}

/* 휴대폰: 배율 없이 양옆 40px 여백 기준으로 */
@media (max-width: 600px) {
	.tpop {
		--tpop-k: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tpop[open] {
		animation: none;
	}
}
