/* 카테고리 탭 · 고르는 칸 — 모든 게시판 스킨이 함께 쓴다
   (_category_tabs.php · _category_select.php) */

.bct-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.bct-tab {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: #475569;
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.bct-tab:hover { border-color: #94a3b8; color: #0f172a; }
.bct-tab.is-on {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    font-weight: 600;
}

/* 글쓰기의 고르는 칸 — 네모칸 여럿 (글 하나가 카테고리 여럿을 가질 수 있다) */
.bcs-field { margin: 0 0 16px; }
.bcs-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: .8125rem;
    font-weight: 600;
}
.bcs-label i { color: #94a3b8; margin-right: 3px; }
.bcs-hint { margin-left: 6px; color: #94a3b8; font-size: .75rem; font-style: normal; font-weight: 400; }
.bcs-box { display: flex; flex-wrap: wrap; gap: 8px; }
/* 네모칸을 알약 꼴로 감싼다 — 누를 자리가 넓어 손가락으로도 고르기 쉽다 */
.bcs-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: #fff;
    color: #475569;
    font-size: .8125rem;
    cursor: pointer;
    user-select: none;
}
.bcs-pick:hover { border-color: #94a3b8; }
.bcs-pick input { margin: 0; cursor: pointer; }
/* 고른 것은 눈에 띄게 — 네모칸만으로는 한눈에 안 들어온다 */
.bcs-pick:has(input:checked) {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .bct-bar { gap: 5px; margin-bottom: 12px; padding-bottom: 10px; }
    .bct-tab { height: 30px; padding: 0 11px; font-size: .78125rem; }
    .bcs-box { gap: 6px; }
    .bcs-pick { height: 34px; padding: 0 12px; }
}

/* 목록·글보기의 카테고리 표 (_category_tag.php · _category_view.php).
   댓글 수 뱃지(.comment-badge)는 둥근 알약에 굵은 숫자다 — 그것과 갈리도록
   각진 모서리에 우물정을 앞세운다. 색도 파랑 계열로 따로 둔다. */
.bcg-tag {
    display: inline-block;
    margin: 0 2px 0 4px;
    padding: 1px 6px;
    border: 1px solid #dbeafe;
    border-radius: 3px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.4;
    vertical-align: middle;
    text-decoration: none;
    /* 좁은 화면에서 줄을 밀어내지 않게 같은 잣대로 자른다 */
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* 우물정은 글자가 아니라 꾸밈이라 CSS 로 붙인다 —
   그래야 검색·복사에 섞이지 않는다 */
.bcg-tag::before { content: '#'; opacity: .55; margin-right: 1px; }
a.bcg-tag:hover { background: #dbeafe; border-color: #bfdbfe; color: #1e40af; }

/* 그림 위에 얹는 표 (_category_over.php) — 그림이 어떤 색이든 읽히도록
   어두운 반투명 바탕에 흰 글자를 쓴다. 공지 뱃지는 위쪽에 있으므로 아래에 둔다. */
.bco-wrap {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: calc(100% - 16px);
    pointer-events: none;
}
.bco-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: .6875rem;
    font-weight: 500;
    line-height: 1.5;
    /* 이름이 길면 그림 밖으로 나가지 않게 자른다.
       min-width: 0 이 없으면 flex 아이템이 글 길이 아래로 줄지 않는다. */
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bco-tag::before { content: '#'; opacity: .6; margin-right: 1px; }

@media (max-width: 768px) {
    .bco-wrap { left: 6px; bottom: 6px; gap: 3px; }
    .bco-tag { padding: 1px 6px; font-size: .65rem; }
}

/* ============================================================
   게시물 태그 뱃지 (목록·상세 공통)
   ============================================================ */
.post-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 4px 0 2px;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}
.post-tag-badge i {
    font-size: .6875rem;
}
