/* Modern Alert/Confirm/Prompt Popup */
#popup_overlay {
	position: fixed !important;
	z-index: 99998;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.45) !important;
	opacity: 1 !important;
}

#popup_container {
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	font-size: 14px;
	min-width: 320px;
	max-width: 400px;
	width: 90vw;
	background: #ffffff;
	border: none !important;
	border-radius: 0.875rem;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	color: #374151;
	padding: 0 !important;
	overflow: hidden;
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	margin: 0 !important;
	box-sizing: border-box;
}

#popup_title {
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	color: #111827;
	background: #ffffff;
	cursor: default;
	padding: 1.5rem 1.5rem 0 1.5rem;
	margin: 0;
	border: none;
}

#popup_content {
	background: #ffffff !important;
	padding: 1.25rem 1.5rem 1.75rem 1.5rem;
	margin: 0;
}

#popup_message {
	background: #ffffff;
	text-align: center;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	font-size: 0.95rem;
	font-weight: 500;
	color: #374151;
	line-height: 1.6;
	word-break: keep-all;
}

/* Alert - Single OK Button */
div#popup_ok {
	padding: 1rem 1.5rem;
	background: #f9fafb;
	text-align: center;
	border-top: 1px solid #e5e7eb;
}

div#popup_ok input {
	cursor: pointer;
	border: none !important;
	background: #4445DD !important;
	color: #ffffff !important;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	padding: 0.625rem 2rem !important;
	border-radius: 0.5rem !important;
	transition: background-color 0.15s;
	line-height: 1 !important;
	vertical-align: middle !important;
}
div#popup_ok input:hover {
	background: #3636b5;
}

/* Confirm / Prompt - Two Buttons */
.popup_buttons {
	display: flex;
	gap: 0.5rem;
	padding: 1rem 1.5rem;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
}

.popup_btn {
	flex: 1;
	cursor: pointer;
	border: none;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.625rem 0;
	border-radius: 0.5rem;
	transition: background-color 0.15s;
	text-align: center;
	line-height: 1 !important;
}

.popup_btn_cancel {
	background: #e5e7eb !important;
	color: #4b5563 !important;
}
.popup_btn_cancel:hover {
	background: #d1d5db !important;
}

.popup_btn_ok {
	background: #4445DD !important;
	color: #ffffff !important;
}
.popup_btn_ok:hover {
	background: #3636b5 !important;
}

/* Legacy table layout fallback (in case old confirm HTML is used) */
table.ale_btnbox {
	width: 100%;
	border: 0;
	border-top: 1px solid #e5e7eb;
	background: #f9fafb;
	border-collapse: collapse;
}
.ale_btnbox td {
	width: 50%;
	padding: 1rem 0.75rem;
	text-align: center;
}
td#popup_cancel input,
td#popup_ok input {
	cursor: pointer;
	border: none;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.625rem 0;
	width: 100%;
	max-width: 140px;
	border-radius: 0.5rem;
	transition: background-color 0.15s;
}
td#popup_cancel input {
	background: #e5e7eb;
	color: #4b5563;
}
td#popup_cancel input:hover {
	background: #d1d5db;
}
td#popup_ok input {
	background: #4445DD;
	color: #ffffff;
}
td#popup_ok input:hover {
	background: #3636b5;
}

/* Prompt Input */
#popup_prompt {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	margin-top: 1rem;
	outline: none;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	font-size: 0.9rem;
	box-sizing: border-box;
}
#popup_prompt:focus {
	border-color: #4445DD;
	box-shadow: 0 0 0 3px rgba(68, 69, 221, 0.08);
}

/* Mobile */
@media screen and (max-width: 768px) {
	#popup_container {
		min-width: auto;
		max-width: 90vw;
		width: 90vw;
	}
}
