/* Popup notice administration */
.admin-status.popup {
	display: inline-block;
	margin-top: 4px;
	background: #e8f0fb;
	color: #315f92;
}

.admin-field .admin-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

.admin-field .admin-checkbox input {
	width: auto;
	margin: 0;
	padding: 0;
}

/* Main notice popup */
.homepage-popup-layer {
	position: fixed;
	z-index: 10000;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(24, 28, 20, .5);
	text-align: left;
}

.homepage-popup-layer.is-active {
	display: flex;
}

.homepage-popup-dialog {
	display: flex;
	flex-direction: column;
	width: 640px;
	max-width: calc(100% - 32px);
	max-height: 560px;
	max-height: min(560px, 78vh);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(20, 30, 10, .28);
	overflow: hidden;
}

.homepage-popup-dialog:focus {
	outline: none;
}

.homepage-popup-accent {
	flex: none;
	height: 4px;
	background: #668d31;
}

.homepage-popup-header {
	position: relative;
	flex: none;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 22px 24px 18px;
	background: #fff;
}

.homepage-popup-headline {
	flex: 1 1 auto;
	min-width: 0;
}

.homepage-popup-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	color: #9aa093;
	font-size: 12px;
}

.homepage-popup-badge {
	display: inline-block;
	padding: 3px 8px;
	background: #eef3e6;
	color: #4e6f24;
	font-size: 11px;
	font-weight: bold;
}

.homepage-popup-header h2 {
	margin: 0;
	color: #23291d;
	font-size: 18px;
	font-weight: bold;
	line-height: 1.45;
	letter-spacing: -.01em;
	word-break: break-word;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.homepage-popup-close {
	flex: none;
	width: 44px;
	height: 44px;
	margin: -8px -10px 0 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #7d8475;
	font-family: Arial, sans-serif;
	font-size: 28px;
	line-height: 44px;
	text-align: center;
	cursor: pointer;
}

.homepage-popup-close:hover {
	background: #f1f3ed;
	color: #3b4034;
}

.homepage-popup-close:focus-visible {
	outline: 2px solid #668d31;
	outline-offset: 2px;
}

.homepage-popup-body {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.homepage-popup-content {
	flex: 1 1 auto;
	min-height: 0;
	padding: 18px 24px 24px;
	border-top: 1px solid #edefe9;
	overflow-y: auto;
	box-sizing: border-box;
	color: #3b4034;
	font-size: 14px;
	line-height: 1.8;
	white-space: pre-wrap;
	word-break: break-word;
}

.homepage-popup-content::-webkit-scrollbar {
	width: 6px;
}

.homepage-popup-content::-webkit-scrollbar-thumb {
	background: #c9d1bf;
	border-radius: 3px;
}

.homepage-popup-content::-webkit-scrollbar-track {
	background: transparent;
}

.homepage-popup-fade {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 28px;
	background: linear-gradient(rgba(255, 255, 255, 0), #fff);
	pointer-events: none;
}

/* 팝업 첨부파일 - 푸터 위 고정 스트립 */
.homepage-popup-files {
	flex: none;
	box-sizing: border-box;
	max-height: 96px;
	padding: 12px 24px;
	border-top: 1px solid #edefe9;
	background: #f7f9f4;
	overflow-y: auto;
}

.homepage-popup-files::-webkit-scrollbar {
	width: 6px;
}

.homepage-popup-files::-webkit-scrollbar-thumb {
	background: #c9d1bf;
	border-radius: 3px;
}

.homepage-popup-files-title {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
	color: #6d7466;
	font-size: 11px;
	font-weight: bold;
}

.homepage-popup-clip {
	width: 12px;
	height: 12px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d7466' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/></svg>") no-repeat center;
}

.homepage-popup-file-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.homepage-popup-file-list li {
	display: flex;
	align-items: baseline;
	gap: 6px;
	padding: 2px 0;
	font-size: 12px;
	line-height: 1.4;
}

.homepage-popup-file-list a {
	color: #4e6f24;
	text-decoration: underline;
	word-break: break-all;
}

.homepage-popup-file-list a:hover {
	color: #3a5419;
}

.homepage-popup-file-list a:focus-visible {
	outline: 2px solid #668d31;
	outline-offset: 2px;
}

.homepage-popup-file-size {
	flex: none;
	color: #9aa093;
	font-size: 11px;
}

.homepage-popup-actions {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 24px;
	border-top: 1px solid #edefe9;
	background: #fafbf8;
}

.homepage-popup-hide-today {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #6d7466;
	font-size: 12px;
	cursor: pointer;
	user-select: none;
}

.homepage-popup-hide-today input {
	width: 14px;
	height: 14px;
	margin: 0;
	padding: 0;
	accent-color: #668d31;
	cursor: pointer;
}

.homepage-popup-hide-today input:focus-visible {
	outline: 2px solid #668d31;
	outline-offset: 2px;
}

.homepage-popup-buttons {
	display: flex;
	gap: 8px;
}

.homepage-popup-actions a,
.homepage-popup-actions button {
	display: inline-block;
	min-width: 76px;
	padding: 9px 16px;
	border: 1px solid #d3d8cc;
	border-radius: 4px;
	background: #fff;
	color: #545c4b;
	font-family: '맑은 고딕', "Malgun Gothic", sans-serif;
	font-size: 13px;
	line-height: 18px;
	text-align: center;
	cursor: pointer;
}

.homepage-popup-actions a:hover,
.homepage-popup-actions button:hover {
	border-color: #b9c2ae;
}

.homepage-popup-actions .homepage-popup-detail {
	border-color: #668d31;
	background: #668d31;
	color: #fff;
}

.homepage-popup-actions .homepage-popup-detail:hover {
	border-color: #587a2a;
	background: #587a2a;
}

.homepage-popup-actions a:focus-visible,
.homepage-popup-actions button:focus-visible {
	outline: 2px solid #668d31;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.homepage-popup-layer {
		padding: 16px;
	}

	.homepage-popup-dialog {
		width: 100%;
		max-height: 82vh;
	}

	.homepage-popup-header {
		padding: 18px 18px 14px;
	}

	.homepage-popup-header h2 {
		font-size: 16px;
	}

	.homepage-popup-content,
	.homepage-popup-files,
	.homepage-popup-actions {
		padding-right: 18px;
		padding-left: 18px;
	}

	.homepage-popup-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.homepage-popup-buttons {
		justify-content: flex-end;
	}
}
