@charset "UTF-8";
/* =====================================================================
 * 에디터(CKEditor5) 본문 표시 — 관리자 미리보기·사용자 화면 공용 (.editor-content 안에서만 적용)
 *
 * 미리보기가 에디터 편집 화면과 같은 모양이 되도록 CKEditor5 기본 본문 스타일(.ck-content)의
 * 표·목록·인용·이미지·미디어 규칙을 옮겼다. 관리자 reset_ad.css·사용자 reset 이 목록 기호·인용 여백을 지우고,
 * Bootstrap 이 figure.table(클래스 "table")에 목록 표 스타일을 얹으므로 그 위에서 다시 정한다.
 * 글자 크기·색·줄 간격은 감싸는 화면(관리자 모달·사용자 KRDS 본문)을 그대로 따른다. 선·바탕 색은 KRDS 토큰이 있으면
 * 그 값을(사용자 화면 — 고대비 모드에서도 토큰을 따라 바뀐다), 없으면(관리자) CKEditor 기본값을 쓴다.
 * 사용자 화면의 좁은 화면 표 가로 스크롤은 hmpg-responsive.css 가 .editor-content 에도 준다(이 파일 다음에 불러온다).
 * 동영상(<figure class="media"><oembed url>)은 editorContent.js 가 재생기(iframe)로 바꾼다.
 * 원본: boot·cms·cms-thymeleaf css/editor-content.css — 세 파일은 내용이 같다.
 *       SPA(cms-react·cms-vue)는 src/shared/styles/editor-content.css 가 이 파일의 복사본이다.
 * ===================================================================== */

.editor-content {
	overflow-wrap: anywhere;
}

.editor-content::after {
	content: "";
	display: block;
	clear: both;
}

.editor-content p {
	margin: 0 0 1em;
}

.editor-content h2,
.editor-content h3,
.editor-content h4 {
	margin: 1.2em 0 0.6em;
	font-weight: 700;
	line-height: 1.4;
}

.editor-content h2 { font-size: 1.6em; }
.editor-content h3 { font-size: 1.35em; }
.editor-content h4 { font-size: 1.15em; }

.editor-content > :first-child {
	margin-top: 0;
}

.editor-content strong { font-weight: 700; }
.editor-content i,
.editor-content em { font-style: italic; }

.editor-content a {
	color: var(--krds-primary-hover, #0b50d0);
	text-decoration: underline;
}

/* 목록 — reset 이 지운 기호·들여쓰기를 되살린다(중첩 목록은 기호 모양을 바꾼다) */
.editor-content ul,
.editor-content ol {
	margin: 0 0 1em;
	padding-left: 2em;
}

.editor-content ul { list-style: disc outside; }
.editor-content ul ul { list-style-type: circle; }
.editor-content ul ul ul { list-style-type: square; }
.editor-content ol { list-style: decimal outside; }
.editor-content ol ol { list-style-type: lower-latin; }
.editor-content ol ol ol { list-style-type: lower-roman; }

.editor-content li {
	display: list-item;
	list-style: inherit;
}

.editor-content li > ul,
.editor-content li > ol {
	margin-bottom: 0;
}

/* 인용 */
.editor-content blockquote {
	margin: 1em 0;
	padding: 0.2em 0 0.2em 1.5em;
	border-left: 5px solid var(--krds-border, #ccc);
	font-style: italic;
	overflow: hidden;
}

.editor-content blockquote p:last-child {
	margin-bottom: 0;
}

.editor-content hr {
	margin: 1em 0;
	border: 0;
	border-top: 1px solid var(--krds-border, #ccc);
}

/* 표 — <figure class="table"><table>. Bootstrap .table(폭 100%·행 테두리·셀 패딩 변수)을 되돌리고
 * 에디터와 같은 격자 테두리를 그린다. 넓은 표는 figure 안에서 가로로 스크롤된다 */
.editor-content figure.table {
	display: block;
	width: auto;
	max-width: 100%;
	margin: 1em 0;
	overflow-x: auto;
	color: inherit;
	background: none;
	vertical-align: baseline;
}

.editor-content figure.table > table,
.editor-content > table {
	width: 100%;
	height: 100%;
	margin: 0;
	border: 1px double var(--krds-border-strong, #b3b3b3);
	border-collapse: collapse;
	border-spacing: 0;
}

/* 사용자 화면(.krds) — KRDS 표(krds-components.css .krds-table)와 같은 모양: 둥근 테두리 틀 · 회색 머리행 · 가로줄만.
 * 예전에는 칸이 글자 단위로 쪼개지지 않게 표를 내용 폭(max-content)으로 두었는데, 그러면 긴 문장 칸이 한 줄로
 * 늘어나 넓은 화면에서도 표가 본문 밖으로 밀렸다(CMS 개요 1313px > 본문 1092px, 2026-11-13).
 * 지금은 본문 폭(100%)에 맞추고 줄은 단어 단위(keep-all)로만 바꾼다 — "담당자"가 "담/당자"로 쪼개지지 않고,
 * 가장 긴 단어들조차 들어가지 않는 좁은 화면에서만 figure 안에서 가로로 스크롤한다.
 * 특이도: hmpg-responsive.css 5절(.editor-content figure.table > table — max-content)과
 * 아래 CKEditor 기본 규칙(… > tr > * 배경 투명)보다 높아야 한다. */
.krds .editor-content figure.table {
	border: 1px solid var(--krds-border, #cdd1d5);
	border-radius: var(--krds-radius-lg, 12px);
	background: var(--krds-canvas, #fff);
}

.krds .editor-content figure.table > table {
	width: 100%;
	min-width: 100%;
	border: 0;
	word-break: keep-all;
	overflow-wrap: break-word;
}

.krds .editor-content figure.table > table > * > tr > th,
.krds .editor-content figure.table > table > * > tr > td {
	padding: 14px 16px;
	border: 0;
	border-top: 1px solid var(--krds-border-weak, #e6e8ea);
	line-height: 1.6;
}

.krds .editor-content figure.table > table > thead > tr > th {
	border-top: 0;
	border-bottom: 1px solid var(--krds-border, #cdd1d5);
	background-color: var(--krds-surface, #f4f5f6);
	color: var(--krds-text, #464c53);
	font-size: 0.9375em;
	white-space: nowrap;
}

.krds .editor-content figure.table > table > thead + tbody > tr:first-child > * {
	border-top: 0;
}

/* 행 머리(tbody 의 th — 에디터 '머리 열') — 구분 칸. 짧은 이름이라 꺾지 않는다(좁은 화면은 figure 가 가로 스크롤) */
.krds .editor-content figure.table > table > tbody > tr > th {
	background-color: var(--krds-surface, #f4f5f6);
	color: var(--krds-text-strong, #1e2124);
	white-space: nowrap;
}

.editor-content figure.table > table > * > tr,
.editor-content figure.table > table > * > tr > * {
	box-shadow: none;
	background-color: transparent;
}

.editor-content table td,
.editor-content table th {
	min-width: 2em;
	padding: 0.4em;
	border: 1px solid var(--krds-border, #bfbfbf);
	color: inherit;
	text-align: left;
	vertical-align: top;
}

.editor-content table th {
	background-color: var(--krds-surface, rgba(0, 0, 0, 0.05));
	font-weight: 700;
}

.editor-content figure.table > figcaption,
.editor-content figure.image > figcaption {
	padding: 0.6em;
	background-color: var(--krds-surface, #f7f7f7);
	color: inherit;
	font-size: 0.75em;
	text-align: center;
	caption-side: bottom;
}

/* 이미지 — 블록 이미지는 가운데, image-style-* 는 에디터의 정렬 버튼 값 */
.editor-content img {
	max-width: 100%;
	height: auto;
}

.editor-content figure.image {
	display: table;
	clear: both;
	margin: 0.9em auto;
	text-align: center;
}

.editor-content figure.image img {
	display: block;
	margin: 0 auto;
	min-width: 100%;
}

.editor-content figure.image > figcaption {
	display: table-caption;
}

.editor-content .image-style-side,
.editor-content .image-style-align-right {
	float: right;
	max-width: 50%;
	margin-left: 1.5em;
}

.editor-content .image-style-align-left {
	float: left;
	max-width: 50%;
	margin-right: 1.5em;
}

.editor-content .image-style-block-align-left {
	margin-left: 0;
}

.editor-content .image-style-block-align-right {
	margin-right: 0;
}

.editor-content img.image_resized,
.editor-content figure.image_resized img {
	width: 100%;
}

/* 미디어(동영상) — 16:9 반응형 재생기. 재생기를 만들 수 없는 주소는 링크로 남는다 */
.editor-content figure.media {
	display: block;
	clear: both;
	margin: 1em 0;
	min-width: 15em;
}

.editor-content .editor-media__frame {
	position: relative;
	height: 0;
	padding-bottom: 56.25%;
	overflow: hidden;
	background: #000;
}

.editor-content .editor-media__frame > iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.editor-content .editor-media__link {
	display: block;
	padding: 1em;
	border: 1px dashed var(--krds-border, #b3b3b3);
	background: var(--krds-surface, #f7f7f7);
	word-break: break-all;
}
