/*
 * 게시글 본문 콘텐츠 스타일 (자체 작성).
 * CKEditor로 작성된 기존 글의 마크업(figure.image, image_resized, text-align 등)이
 * 상세/편집 화면에서 동일하게 보이도록 하는 규칙. GPL 산출물(CKEditor CSS) 미사용.
 * 클래스명 .ck-content 는 기존 렌더 래퍼와의 호환을 위해 유지한다.
 */

/* 블록 이미지: 가운데 배치 + 문단 간격 */
.ck-content figure.image {
	display: table;
	clear: both;
	text-align: center;
	margin: 0.9em auto;
	min-width: 50px;
}
.ck-content figure.image img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	min-width: 100%;
	height: auto;
}
/* 크기 조절된 이미지(figure에 width 인라인 스타일) */
.ck-content figure.image.image_resized {
	max-width: 100%;
	display: block;
	box-sizing: border-box;
}
.ck-content figure.image.image_resized img {
	width: 100%;
}
/* 좌우 배치 스타일(과거 글 호환) */
.ck-content figure.image.image-style-align-left { float: left; margin-right: 1.5em; }
.ck-content figure.image.image-style-align-right { float: right; margin-left: 1.5em; }
/* 인라인 이미지 */
.ck-content img.image_resized { max-width: 100%; height: auto; }
.ck-content p img { max-width: 100%; height: auto; vertical-align: middle; }

.ck-content figcaption {
	display: table-caption;
	caption-side: bottom;
	padding: 0.6em;
	font-size: 0.75em;
	color: #333;
	background-color: #f7f7f7;
	word-break: break-word;
}

/* 인용구 */
.ck-content blockquote {
	overflow: hidden;
	margin-left: 0;
	margin-right: 0;
	padding-left: 1.5em;
	padding-right: 1.5em;
	font-style: italic;
	border-left: 5px solid #ccc;
}

/* 표 (figure.table 래퍼가 있는 기존 글 + 래퍼 없는 새 글 모두) */
.ck-content figure.table {
	display: table;
	margin: 0.9em auto;
}
.ck-content table {
	border-collapse: collapse;
	border-spacing: 0;
	width: 100%;
	height: 100%;
	border: 1px double #b3b3b3;
}
.ck-content table td,
.ck-content table th {
	min-width: 2em;
	padding: 0.4em;
	border: 1px solid #bfbfbf;
	overflow-wrap: break-word;
}
.ck-content table th {
	font-weight: 700;
	background: rgba(0, 0, 0, 0.05);
	text-align: center;
}
.ck-content > table {
	margin: 0.9em 0;
	width: auto;
	min-width: 320px;
}

/* 할일 목록(과거 글 호환) */
.ck-content .todo-list { list-style: none; padding-left: 0; }
.ck-content .todo-list li { margin-bottom: 5px; }
.ck-content .todo-list .todo-list__label > input { margin-right: 8px; }

/* 미디어 임베드 */
.ck-content .media,
.ck-content oembed {
	display: block;
	clear: both;
	margin: 0.9em 0;
	min-width: 15em;
}
.ck-content iframe { max-width: 100%; }

/* 정렬/들여쓰기/글자 스타일은 인라인 style 속성으로 저장되므로 별도 규칙 불필요 */
