/**
 * ArtO 팝업 (145차) — 프런트 템플릿 3종(기본·검정·띠). 관리 미리보기도 이 파일을 그대로 쓴다.
 *
 * 규칙
 * - 둥근 모서리·그림자 없음. 위치는 position:fixed (관리 미리보기는 transform 된 틀 안에 그려서 틀 기준이 된다).
 * - 사이트 전역(Elementor 킷)의 button·a·h2 규칙이 덮지 못하도록 선택자 특이도를 0-2-0 이상으로 둔다
 *   (126차 함정: 킷 button 규칙이 팝업 버튼을 덮음). 버튼류는 all:unset 뒤 명시 재설정.
 * - 모바일 배치는 미디어쿼리가 아니라 JS 가 붙이는 .oa-m 클래스로 정한다(미리보기 틀이 뷰포트와 다르므로).
 * - 퍼센트(%)는 position:fixed 에서 뷰포트(미리보기에서는 틀) 기준이다 — vw/vh 를 쓰지 않는 이유.
 */

/* ── 뒤 화면 ── */
.oa-pop-dim {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99989;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.45);
}

/* ── 상자 공통 ── */
.oa-pop {
	--oa-gap: 24px;
	--oa-w: 440px;
	--oa-bg: #fff;
	--oa-tc: #111;
	--oa-bc: #333;
	--oa-line: #ddd;
	--oa-foot: #555;
	position: fixed;
	z-index: 99990;
	box-sizing: border-box;
	width: var(--oa-w);
	max-width: calc(100% - 32px);
	max-height: calc(100% - 32px);
	margin: 0;
	padding: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 0;
	background: var(--oa-bg);
	color: var(--oa-bc);
	font-family: "Pretendard", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
	letter-spacing: normal;
	text-transform: none;
	word-break: keep-all;
	overflow-wrap: anywhere;
	-webkit-text-size-adjust: 100%;
}

.oa-pop[hidden] {
	display: none;
}

.oa-pop,
.oa-pop *,
.oa-pop *::before,
.oa-pop *::after {
	box-sizing: border-box;
}

.oa-pop .oa-pop__in {
	margin: 0;
	padding: 22px 22px 16px;
}

.oa-pop .oa-pop__t {
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--oa-tc);
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: inherit;
	word-break: keep-all;
}

.oa-pop .oa-pop__b {
	margin: 0;
	padding: 0;
	color: var(--oa-bc);
	line-height: 1.65;
	word-break: keep-all;
}

.oa-pop .oa-pop__b p {
	margin: 0 0 0.6em;
	padding: 0;
	color: inherit;
	font: inherit;
	line-height: inherit;
	text-align: inherit;
}

.oa-pop .oa-pop__b p:last-child {
	margin-bottom: 0;
}

.oa-pop .oa-pop__b a,
.oa-pop .oa-pop__b a:link,
.oa-pop .oa-pop__b a:visited,
.oa-pop .oa-pop__b a:hover,
.oa-pop .oa-pop__b a:focus {
	color: inherit;
	text-decoration: underline;
}

/* 버튼(링크) 0~2개 — 바탕·글자·테두리 색은 렌더러(arto-popup.js)가 인라인으로 넣는다(템플릿 기본색 + 사용자 지정).
   아래 색은 JS 없이 열었을 때를 위한 기본값일 뿐이다. */
.oa-pop .oa-pop__btns {
	display: flex;
	gap: 8px;
	margin: 16px 0 0;
	padding: 0;
}

.oa-pop .oa-pop__btns--col {
	flex-direction: column;
}

.oa-pop .oa-pop__btns--row {
	flex-direction: row;
	align-items: stretch;
}

.oa-pop .oa-pop__btns--row .oa-pop__btn {
	flex: 1 1 0;
	min-width: 0;
}

.oa-pop a.oa-pop__btn,
.oa-pop a.oa-pop__btn:link,
.oa-pop a.oa-pop__btn:visited,
.oa-pop a.oa-pop__btn:hover,
.oa-pop a.oa-pop__btn:focus,
.oa-pop a.oa-pop__btn:active {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid #111;
	border-radius: 0;
	background: #111;
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

.oa-pop a.oa-pop__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -4px;
}

/* 바닥줄(오늘 하루 보지 않기 / 닫기) */
.oa-pop .oa-pop__foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0;
	padding: 9px 22px;
	border-top: 1px solid var(--oa-line);
	color: var(--oa-foot);
	font-size: 12px;
	line-height: 1.4;
}

.oa-pop .oa-pop__foot .oa-pop__close:only-child {
	margin-left: auto;
}

/* 버튼 요소(바닥줄·× ) — 킷의 button 규칙(hover·focus 포함)을 이기려고 특이도를 올리고 all:unset 후 재설정 */
.oa-pop.oa-pop button.oa-pop__fb,
.oa-pop.oa-pop button.oa-pop__fb:hover,
.oa-pop.oa-pop button.oa-pop__fb:focus,
.oa-pop.oa-pop button.oa-pop__fb:active {
	all: unset;
	box-sizing: border-box;
	display: inline-block;
	margin: 0;
	padding: 2px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--oa-foot);
	font-family: inherit;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.oa-pop.oa-pop button.oa-pop__fb:hover {
	text-decoration: underline;
}

.oa-pop.oa-pop button.oa-pop__x,
.oa-pop.oa-pop button.oa-pop__x:hover,
.oa-pop.oa-pop button.oa-pop__x:focus,
.oa-pop.oa-pop button.oa-pop__x:active {
	all: unset;
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--oa-tc);
	font-family: inherit;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
}

.oa-pop.oa-pop button.oa-pop__fb:focus-visible,
.oa-pop.oa-pop button.oa-pop__x:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ── 템플릿 ── */
.oa-pop.oa-pop--basic {
	border: 1px solid #111;
}

.oa-pop.oa-pop--dark {
	--oa-bg: #111;
	--oa-tc: #fff;
	--oa-bc: #d0d0d0;
	--oa-line: #333;
	--oa-foot: #aaa;
}

/* 띠: 화면 위·아래 전체 폭 한 줄(뒤 화면을 막지 않음) */
.oa-pop.oa-pop--bar {
	--oa-bg: #111;
	--oa-tc: #fff;
	--oa-bc: #d0d0d0;
	--oa-foot: #aaa;
	left: 0;
	right: 0;
	width: 100%;
	max-width: none;
	max-height: 50%;
	transform: none;
}

.oa-pop.oa-pop--bar .oa-pop__in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	padding: 10px 44px 10px 16px;
}

.oa-pop.oa-pop--bar .oa-pop__t {
	margin: 0;
}

.oa-pop.oa-pop--bar .oa-pop__b {
	flex: 1;
	min-width: 120px;
}

.oa-pop.oa-pop--bar .oa-pop__b p {
	margin: 0;
}

.oa-pop.oa-pop--bar a.oa-pop__btn,
.oa-pop.oa-pop--bar a.oa-pop__btn:link,
.oa-pop.oa-pop--bar a.oa-pop__btn:visited,
.oa-pop.oa-pop--bar a.oa-pop__btn:hover,
.oa-pop.oa-pop--bar a.oa-pop__btn:focus,
.oa-pop.oa-pop--bar a.oa-pop__btn:active {
	padding: 6px 12px;
	font-size: 12px;
}

/* 띠 안 오른쪽 작은 글자 링크('오늘 하루 보지 않기') — × 는 이번 화면만 닫는다 */
.oa-pop.oa-pop.oa-pop--bar button.oa-pop__today {
	flex: none;
	font-size: 11px;
	text-decoration: underline;
	white-space: nowrap;
}

/* 띠는 레이아웃과 관계없이 작은 버튼이 한 줄로 나란히 */
.oa-pop.oa-pop--bar .oa-pop__btns {
	flex-direction: row;
	flex-wrap: wrap;
	margin: 0;
}

.oa-pop.oa-pop--bar .oa-pop__btns .oa-pop__btn {
	flex: none;
}

.oa-pop.oa-pop--bar.oa-pos-t {
	top: 0;
	bottom: auto;
}

.oa-pop.oa-pop--bar.oa-pos-b {
	top: auto;
	bottom: 0;
}

/* ── 위치 9칸(세로 t·m·b × 가로 l·c·r) ── */
.oa-pop.oa-v-t {
	top: var(--oa-gap);
}

.oa-pop.oa-v-m {
	top: 50%;
	transform: translateY(-50%);
}

.oa-pop.oa-v-b {
	bottom: var(--oa-gap);
}

.oa-pop.oa-h-l {
	left: var(--oa-gap);
}

.oa-pop.oa-h-c {
	left: 50%;
	transform: translateX(-50%);
}

.oa-pop.oa-h-r {
	right: var(--oa-gap);
}

.oa-pop.oa-h-c.oa-v-m {
	transform: translate(-50%, -50%);
}

/* ── 모바일(JS 가 .oa-m 을 붙임) ── */
.oa-pop.oa-m {
	--oa-gap: 16px;
}

/* 아래에서 올라오는 시트 */
.oa-pop.oa-sheet {
	top: auto;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	max-width: none;
	transform: none;
	border-width: 1px 0 0;
	padding-bottom: env(safe-area-inset-bottom, 0px); /* 아이폰 홈 표시줄에 닫기 줄이 가리지 않게 */
}

.oa-pop.oa-pop--dark.oa-sheet {
	border-width: 0;
}

/* 카드형은 좌우 16px 여백으로 전체 폭 */
.oa-pop.oa-m.oa-h-l,
.oa-pop.oa-m.oa-h-c,
.oa-pop.oa-m.oa-h-r {
	right: 16px;
	left: 16px;
	width: auto;
	max-width: none;
}

.oa-pop.oa-m.oa-v-t,
.oa-pop.oa-m.oa-v-b {
	transform: none;
}

.oa-pop.oa-m.oa-v-m {
	transform: translateY(-50%);
}

/* ── 움직임: 짧은 페이드(움직임 줄이기 설정이면 없음) ── */
@keyframes oa-pop-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.oa-pop.oa-anim,
	.oa-pop-dim.oa-anim {
		animation: oa-pop-in 0.15s ease-out;
	}
}

@media print {
	.oa-pop,
	.oa-pop-dim {
		display: none !important;
	}
}
