/* ==================================================
	공통 · 쇼츠 영역과 헤더
================================================== */
.shorts_section { width: 100%; overflow: hidden; }
.shorts_header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.shorts_header h2 { margin: 0; font-size: 24px; font-weight: 700; color: #222; }
.shorts_more { display: flex; align-items: center; gap: 20px; padding: 12px 18px; border: 1px solid #ddd; border-radius: 50px; font-size: 12px; color: #555; text-decoration: none; }
.shorts_more span { font-size: 16px; }

/* 슬라이더 · 카드의 가로 배치와 클릭 영역 */
.shorts_slider_wrap { width: 100%; }
.shorts_swiper { width: 100%; overflow: visible; }
.shorts_swiper .swiper-slide { height: auto; }
.shorts_card { display: block; width: 100%; height: 100%; color: #222; text-decoration: none; }

/* 썸네일 · 세로 비율과 이미지 확대 효과 */
.shorts_thumb { position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 10px; background: #111; }
.shorts_thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.shorts_card:hover .shorts_thumb > img { transform: scale(1.05); }
.shorts_dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); pointer-events: none; }

/* 로그인 안내 · 잠금 아이콘과 안내 문구 */
.shorts_lock { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; text-align: center; color: #fff; z-index: 2; }
.shorts_lock_icon { margin-bottom: 10px; font-size: 26px; }
.shorts_login_text { display: inline-block; padding: 4px 15px; border: 1px solid #fff; border-radius: 20px; font-size: 11px; }
.shorts_lock p { margin-top: 12px; font-size: 11px; line-height: 1.6; }

/* 재생 버튼 · 썸네일 중앙의 원형 버튼 */
.shorts_play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; width: 55px; height: 55px; border: 1px solid rgba(255,255,255,0.8); border-radius: 50%; background: rgba(0,0,0,0.35); color: #fff; transition: background 0.3s; }
.shorts_play span { margin-left: 3px; font-size: 18px; }
.shorts_card:hover .shorts_play { background: rgba(0,0,0,0.7); }

/* 제목 · 스크롤바 · 빈 목록 안내 */
.shorts_title { margin-top: 15px; font-size: 16px; font-weight: 600; line-height: 1.5; word-break: keep-all; color: #222; }
.shorts_scrollbar { position: relative; width: 100%; height: 2px; margin-top: 35px; background: #ddd; }
.shorts_scrollbar .swiper-scrollbar-drag { height: 100%; background: #333; border-radius: 0; }
.shorts_empty { padding: 60px 0; text-align: center; font-size: 15px; color: #999; }

/* ==================================================
	영상 팝업 · 화면 중앙 배치와 배경 처리
================================================== */
.main_bf_shorts_dialog {
	position: fixed;
	inset: 0;
	box-sizing: border-box;
	width: min(420px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 120px);
	max-height: calc(100dvh - 120px);
	margin: auto;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	background: #101114;
	color: #fff;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
	overflow: visible;
}
.main_bf_shorts_dialog::backdrop {
	background: rgba(8, 10, 15, 0.78);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* 닫기 영역 · 팝업 바깥 오른쪽 위에 배경 없이 표시합니다. */
.main_bf_shorts_dialog .shorts_popup_header {
	position: absolute;
	top: -52px;
	right: -8px;
	z-index: 2;
	display: flex;
	padding: 0;
	border: 0;
	background: transparent;
}

/* 닫기 버튼 · 배경과 원형 테두리 없이 X 아이콘만 표시합니다. */
.main_bf_shorts_dialog .shorts_popup_close {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	appearance: none;
	background: transparent;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.main_bf_shorts_dialog .shorts_popup_close::before,
.main_bf_shorts_dialog .shorts_popup_close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 25px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	pointer-events: none;
}
.main_bf_shorts_dialog .shorts_popup_close::before { transform: translate(-50%, -50%) rotate(45deg); }
.main_bf_shorts_dialog .shorts_popup_close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.main_bf_shorts_dialog .shorts_popup_close:hover { background: transparent; opacity: 0.8; transform: scale(1.08); }
.main_bf_shorts_dialog .shorts_popup_close:active { transform: scale(0.94); }
.main_bf_shorts_dialog .shorts_popup_close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }

/* 영상 프레임 · 화면 높이에 맞춰 팝업 안에 표시합니다. */
.main_bf_shorts_dialog .shorts_popup_frame {
	display: block;
	width: 100%;
	height: min(70vh, 720px, calc(100vh - 120px));
	height: min(70dvh, 720px, calc(100dvh - 120px));
	border: 0;
	background: #000;
	border-radius: inherit;
}

/* ==================================================
	1024px 이하 · 태블릿 제목 크기 조정
================================================== */
@media (max-width: 1024px) {
	.shorts_header h2 { font-size: 22px; }
	.shorts_title { font-size: 15px; }
}

/* ==================================================
	767px 이하 · 모바일 카드 간격과 팝업 크기 조정
================================================== */
@media (max-width: 767px) {
	/* 목록 · 제목과 더보기 버튼, 썸네일 및 스크롤바 */
	.shorts_header { margin-bottom: 20px; }
	.shorts_header h2 { font-size: 20px; }
	.shorts_more { padding: 8px 14px; font-size: 11px; }
	.shorts_thumb { border-radius: 8px; }
	.shorts_title { margin-top: 10px; font-size: 13px; }
	.shorts_scrollbar { margin-top: 25px; }

	/* 팝업 · 좁은 화면의 외곽 여백과 모서리 */
	.main_bf_shorts_dialog { width: min(420px, calc(100vw - 24px)); max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); border-radius: 16px; }
	.main_bf_shorts_dialog .shorts_popup_header { padding: 0; }
}

/* 접근성 · 모션 최소화 설정에서는 닫기 버튼 전환 효과를 끕니다. */
@media (prefers-reduced-motion: reduce) {
	.main_bf_shorts_dialog .shorts_popup_close { transition: none; }
}
