@charset "UTF-8";
/* 레이아웃 */
.write-container{
  max-width: 80%;
  margin: 0 auto;
  padding: 20px;
}
/* 작성/미리보기/본문 렌더링 공통 */
.content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.content,
.content > div,
.toastui-editor-defaultUI,
.toastui-editor-main,
.toastui-editor-md-container,
.toastui-editor-ww-container {
    min-width: 0;
}

.toastui-editor-contents img,
.toastui-editor-contents p img,
.toastui-editor-md-preview img,
.toastui-editor-ww-container img,
.content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}
.blog-post,
.blog-post .content {
    min-width: 0;
}

.blog-post .content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    word-break: break-word;
}

.blog-post .content * {
    max-width: 100%;
    box-sizing: border-box;
}

.blog-post .content img,
.blog-post .content p img,
.blog-post .content figure img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

/* 입력/선택 공통 */
.title-input,
.category-select,
.tags-input{
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: none;
  outline: none;
  box-shadow: none;
  background: #fff;
}

/* placeholder 컬러 살짝 연함 */
.title-input::placeholder,
.tags-input::placeholder{
  color: #9aa0a6;
}

/* 요소 간 간격 */
.title-input{ margin-bottom: 12px; font-size: 18px; }
.category-select{ margin-bottom: 10px; }
.editor-box{ margin-bottom: 10px; }
.tags-input{ margin-bottom: 20px; font-size: 12px; }

/* 버튼 영역 정렬 */
.actions{
  margin-top: 20px;
  text-align: right;
}

/* 버튼 공통 (pill) */
.btn{
  border-radius: 999px;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: filter .15s ease, background-color .15s ease, border-color .15s ease;
}

/* 임시저장: 흰 배경 + 옅은 테두리 */
.btn.save{
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
}
.btn.save:hover{ filter: brightness(0.97); }

/* 완료: 검정 배경 + 흰 글씨 */
.btn.submit{
  background: #000;
  color: #fff;
  margin-left: 8px;
}
.btn.submit:hover{ filter: brightness(1.05); }

/* 포커스 시 외곽선 제거 */
.btn:focus,
.title-input:focus,
.category-select:focus,
.tags-input:focus{
  outline: none;
  box-shadow: none;
}

/* (선택) Toast UI Editor 테두리 감추고 싶다면 주석 해제 */
.toastui-editor-defaultUI{
  border: none !important;
  box-shadow: none !important;
}

/*사이드 바 카테고리 출력 */
/* ===== Sidebar card ===== */
.sidebar-card {
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.sidebar-card-header {
    background: #f8f9fa;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

/* ===== Category tree ===== */
.category-tree,
.subcategory-tree {
    margin: 0;
    padding: 0;
}

.category-item {
    list-style: none;
}

.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.category-item:last-child > .category-row {
    border-bottom: none;
}

.category-row:hover {
    background: #fafafa;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    text-decoration: none;
    color: #1f3fb7;
    font-size: 15px;
    line-height: 1.4;
    flex: 1;
}

.category-link:hover {
    color: #0d6efd;
    text-decoration: none;
}

.category-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-mark {
    color: #9aa1a9;
    font-size: 13px;
    flex: 0 0 auto;
}

.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #6b7280;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 auto;
}

/* ===== Depth ===== */
.subcategory-tree {
    background: #fcfcfd;
}

.depth-1 > .category-row {
    padding-left: 30px;
}

.depth-2 > .category-row {
    padding-left: 46px;
}

.depth-3 > .category-row {
    padding-left: 62px;
}