/* ============================================
   콘텐츠관리 (Contents) — 전용 CSS
   common.css → components.css → contents.css
   이 파일은 콘텐츠관리 페이지에만 필요한 스타일
   ============================================ */

/* ── FAQ 카테고리 라벨 ── */
.cnt-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.cnt-category--payment { background: rgba(51,157,238,0.08);  color: var(--primary); }   /* 결제 */
.cnt-category--care    { background: rgba(46,204,113,0.08);  color: var(--success); }   /* 돌봄 */
.cnt-category--refund  { background: rgba(245,166,35,0.08);  color: var(--warning); }   /* 환불 */
.cnt-category--member  { background: rgba(0,0,0,0.04);       color: var(--text-weak); } /* 회원 */
.cnt-category--kg      { background: var(--badge-pink-bg);    color: var(--role-kindergarten); } /* 유치원 */

/* ── 순서 변경 화살표 → order-arrows 사용 (components.css) ── */

/* ── 배너 썸네일 (목록) ── */
.cnt-thumb {
  width: 72px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--surface-base);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cnt-thumb__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-weak);
  background: var(--surface-base);
  border: 1px dashed rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
}

/* ── 링크 셀 (목록 테이블) ── */
.cnt-link-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── 고정 핀 셀 ── */
.cnt-pin-cell {
  text-align: center;
  font-size: 14px;
}

/* ── 이미지 업로드 프리뷰 (educations.css 동일 패턴) ── */
.edu-img-preview {
  width: 320px;
  height: 180px;
  border-radius: var(--radius-sm);
  background: var(--surface-base);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.edu-img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edu-img-preview__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-weak);
  font-size: 12px;
}

.edu-img-preview__placeholder svg {
  width: 32px;
  height: 32px;
  fill: var(--text-weak);
  opacity: 0.5;
}

.edu-img-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.edu-img-actions__btn {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: none;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.edu-img-actions__btn:hover {
  background: rgba(51, 157, 238, 0.06);
}

.edu-img-actions__btn--delete {
  color: var(--text-weak);
  border-color: rgba(0, 0, 0, 0.12);
}

.edu-img-actions__btn--delete:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(224, 90, 58, 0.04);
}

/* Banner image preview size override */
#bannerImgPreview.edu-img-preview,
#editBannerImgPreview.edu-img-preview {
  width: 360px;
  height: 100px;
}

/* ── 폼 인풋/셀렉트/라디오/체크박스/텍스트에리어는 components.css 의 form-* 사용 ── */

/* ── 파일 업로드 행 ── */
.cnt-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cnt-file-name {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* ── full-width info-grid 오버라이드 (본문, 답변 등 넓은 필드) ── */
.cnt-full-width {
  grid-column: 1 / -1 !important;
}

/* ── 버전 이력 (약관 상세) — mini-table 확장 ── */
/* mini-table 은 components.css 에 정의되어 있으므로
   여기서는 약관 전용 간격만 조정 */

/* ── 모달 변형 스타일은 components.css 에 통합 ── */

/* ── 첨부파일 목록 ── */
.cnt-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cnt-attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

/* ── 공지 본문 렌더링 영역 ── */
.notice-content-render img {
  max-width: 100%;
  height: auto;
}

.notice-content-render p {
  margin: 0 0 8px;
}

/* 조회 모드 — common.css 전역 리셋(ul,ol {list-style:none}) 오버라이드 */
.notice-content-render ul {
  list-style: disc;
  padding-left: 1.5em;
}

.notice-content-render ol {
  list-style: decimal;
  padding-left: 1.5em;
}

.notice-content-render li {
  padding-left: 0;
}

/* 편집 모드(Quill) — 글머리기호/번호 들여쓰기 간격 축소 */
.ql-editor ul,
.ql-editor ol {
  padding-left: 1.5em;
}

/* ── disabled 버튼 ── */
.btn-action--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Quill 에디터 컨테이너 높이 ── */
#noticeEditorContainer .ql-editor,
#faqEditorContainer .ql-editor,
#faqDetailEditorContainer .ql-editor {
  min-height: 200px;
}

#termsEditorContainer .ql-editor,
#termsDetailEditorContainer .ql-editor,
#versionEditorContainer .ql-editor {
  min-height: 320px;
}

/* ── Quill 들여쓰기 간격 축소 (약관 문서에 적합하게) ── */
.ql-editor .ql-indent-1  { padding-left:  1.5em !important; }
.ql-editor .ql-indent-2  { padding-left:  3.0em !important; }
.ql-editor .ql-indent-3  { padding-left:  4.5em !important; }
.ql-editor .ql-indent-4  { padding-left:  6.0em !important; }
.ql-editor .ql-indent-5  { padding-left:  7.5em !important; }
.ql-editor .ql-indent-6  { padding-left:  9.0em !important; }
.ql-editor .ql-indent-7  { padding-left: 10.5em !important; }
.ql-editor .ql-indent-8  { padding-left: 12.0em !important; }

/* ── 대형 모달 (약관 버전 본문 보기 등) ── */
.modal.modal--large {
  width: 720px;
  max-width: 90vw;
}

.modal__body-scroll {
  max-height: 60vh;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

/* ── 약관 본문 렌더링 영역 (보기 모드) ── */
.terms-content-render img {
  max-width: 100%;
  height: auto;
}

.terms-content-render p {
  margin: 0 0 8px;
}

.terms-content-render ul {
  list-style: disc;
  padding-left: 1.5em;
}

.terms-content-render ol {
  list-style: decimal;
  padding-left: 1.5em;
}

.terms-content-render li {
  padding-left: 0;
}

/* ── FAQ 답변 보기 모드 렌더링 ── */
.faq-content-render li {
  padding-left: 0;
}

/* ── 목록 table scroll wrapper → components.css 에 정의됨 ── */

/* ── 배너 테이블 이미지 컬럼 최소 폭 ── */
.data-table-wrap--scroll .data-table td .cnt-thumb {
  margin: 0 auto;
}
