/* ============================================================
   토닥 게시판 커뮤니티 (board/list·detail·form)
   @author 정경하  @since 2026.06.11
   - 통합 피드 + 카테고리 칩 + 작성자 역할 배지(상담사/회원)
   - style.css 변수(--primary/--accent/--bg/--border/--shadow/--text) 재사용
   Copyright Neosgen Co,Ltd.
   ============================================================ */

.brdc-wrap { max-width: 880px; margin: 0 auto; padding: 34px 16px 64px; }
.brdc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.brdc-title { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.brdc-write {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--primary); color: #fff; font-weight: 700; font-size: .88rem;
  padding: 10px 18px; border-radius: 10px;
}
.brdc-write:hover { filter: brightness(1.08); }

/* 카테고리 칩 */
.brdc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.brdc-chip {
  text-decoration: none; border: 1px solid var(--border); background: #fff; color: var(--primary);
  font-size: .85rem; font-weight: 700; padding: 8px 16px; border-radius: 999px;
}
.brdc-chip:hover { background: #faf2e3; }
.brdc-chip.on { background: linear-gradient(135deg, var(--accent), #c2974a); color: #fff; border-color: transparent; }

/* 피드 */
.brdc-list { background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.brdc-item { display: block; text-decoration: none; color: inherit; padding: 16px 20px; border-bottom: 1px solid var(--border); transition: background .15s; }
.brdc-item:last-child { border-bottom: none; }
.brdc-item:hover { background: var(--bg); }
.brdc-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.brdc-board { font-size: .74rem; font-weight: 700; color: var(--accent); }
.brdc-ptitle { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.brdc-snippet { font-size: .85rem; color: #888; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.brdc-meta { font-size: .76rem; color: #aaa; margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.brdc-meta i { margin-right: 3px; }

/* 역할 배지 */
.brdc-role { display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 20px; }
.brdc-role.counselor { background: rgba(150,90,200,.14); color: #8a3fb0; }
.brdc-role.user { background: rgba(107,58,31,.10); color: var(--primary); }
.brdc-role.admin { background: rgba(212,168,83,.20); color: #a9791f; }

.brdc-empty { text-align: center; padding: 56px 20px; color: #aaa; }

/* 페이지네이션 */
.brdc-paging { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.brdc-paging a, .brdc-paging span.now {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 9px; background: #fff; border: 1px solid var(--border); color: var(--primary);
  text-decoration: none; font-weight: 700; font-size: .85rem;
}
.brdc-paging a:hover { background: var(--accent); color: #fff; border-color: transparent; }
.brdc-paging a.disabled { opacity: .4; pointer-events: none; }
.brdc-paging span.now { background: var(--primary); color: #fff; border-color: transparent; }

/* 상세 */
.brdc-detail { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 28px 30px; }
.brdc-d-board { font-size: .8rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.brdc-d-title { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin-bottom: 12px; line-height: 1.3; }
.brdc-d-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: #999;
  padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.brdc-d-content { font-size: .95rem; line-height: 1.8; color: var(--text); white-space: pre-line; min-height: 120px; }
.brdc-d-actions { display: flex; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.brdc-btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 700; font-size: .85rem;
  padding: 9px 16px; border-radius: 9px; }
.brdc-btn:hover { background: var(--bg); }
.brdc-btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.brdc-btn.danger { color: #c0392b; } .brdc-btn.danger:hover { background: #fde8e8; border-color: #f0c4c4; }
.brdc-btn.ghost { margin-left: auto; }

/* 작성/수정 폼 */
.brdc-form { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 26px 28px; }
.brdc-field { margin-bottom: 16px; }
.brdc-field label { display: block; font-size: .83rem; font-weight: 700; color: #777; margin-bottom: 6px; }
.brdc-field select, .brdc-field input[type="text"], .brdc-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; font-family: inherit; font-size: .92rem; color: var(--text); background: #fff; }
.brdc-field select:focus, .brdc-field input:focus, .brdc-field textarea:focus { outline: none; border-color: var(--accent); }
.brdc-field textarea { resize: vertical; line-height: 1.6; }
.brdc-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.brdc-fixed-board { padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--primary); font-weight: 700; font-size: .9rem; }
.brdc-error { background: #fde8e8; border: 1px solid #f0c4c4; color: #c0392b; border-radius: 10px; padding: 11px 14px; font-size: .85rem; margin-bottom: 16px; }

@media (max-width: 600px) {
  .brdc-top { flex-direction: column; align-items: stretch; }
  .brdc-write { justify-content: center; }
}

/* ============================================================
   비공개(자물쇠) 배지 + 댓글 — 2026.06.24 추가
   [grep 확인] .brdc-lock / .brdc-comments / .brdc-c-* / .brdc-secret 기존 정의 없음(중복 0)
   [삭제 목록] 없음
   ============================================================ */
.brdc-lock { display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; font-weight: 800;
  padding: 2px 8px; border-radius: 20px; background: rgba(192,57,57,.12); color: #c0392b; margin-left: 4px; }

.brdc-comments { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 24px 26px; margin-top: 18px; }
.brdc-c-title { font-size: 1.05rem; font-weight: 800; color: var(--primary); margin-bottom: 18px; }
.brdc-c-empty { color: #9a8f86; font-size: .9rem; text-align: center; padding: 26px 0; }
.brdc-c-item { padding: 14px 16px; border-radius: 10px; background: #f6efe0;
  border: 1px solid #e6d8bf; margin-bottom: 12px; }
.brdc-c-head { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: #9a8f86; margin-bottom: 6px; }
.brdc-c-nick { font-weight: 700; color: var(--text); }
.brdc-c-time { color: #b3a89f; }
.brdc-c-del { background: none; border: none; color: #c0392b; cursor: pointer; font-size: .9rem; padding: 2px 6px; border-radius: 6px; }
.brdc-c-del:hover { background: rgba(192,57,57,.1); }
.brdc-c-body { font-size: .94rem; color: var(--text); line-height: 1.65; white-space: pre-wrap; }
.brdc-c-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; border-top: 1px solid var(--border); padding-top: 18px; }
.brdc-c-form textarea { flex: 1; resize: vertical; min-height: 48px; max-height: 220px;
  border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; font: inherit; line-height: 1.55;
  transition: border-color .15s, box-shadow .15s; }
.brdc-c-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,168,83,.18); }
.brdc-c-form .brdc-btn { flex: 0 0 auto; height: 48px; padding: 0 20px; border-radius: 12px; }
.brdc-secret { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px;
  background: rgba(192,57,57,.06); color: var(--text); font-size: .9rem; cursor: pointer; margin-bottom: 16px; }
.brdc-secret input { width: 16px; height: 16px; accent-color: var(--accent); }
.brdc-secret i { color: #c0392b; }

/* ===== 게시판 검색 + 번호형 페이지네이션 (v33) ===== */
.brdc-search { display:flex; align-items:center; gap:10px; margin-bottom:18px;
  background:#fff; border:1px solid var(--border); border-radius:12px; padding:9px 14px; }
.brdc-search > i { color:#9aa0ad; font-size:.9rem; }
.brdc-search input[type="text"]{ flex:1; min-width:0; background:transparent; border:none; outline:none;
  color:var(--text); font-size:.9rem; }
.brdc-search input[type="text"]::placeholder{ color:#9aa0ad; }
.brdc-search button{ flex:none; background:var(--primary); color:#fff; border:none; border-radius:8px;
  padding:8px 16px; font-weight:700; font-size:.85rem; cursor:pointer; }
.brdc-search button:hover{ filter:brightness(1.08); }
.brdc-search-clear{ flex:none; color:#9aa0ad; text-decoration:none; padding:0 4px; }
.brdc-search-clear:hover{ color:var(--text); }
.brdc-searchinfo{ margin:-6px 0 16px; color:#8a8f9c; font-size:.85rem; }
.brdc-searchinfo strong{ color:var(--accent); }
/* 번호형 페이저 — 현재페이지 강조 + 생략(…) + 비활성 엣지 */
.brdc-paging span.now{ background:linear-gradient(135deg, var(--accent), #c2974a); color:#fff; border-color:transparent; }
.brdc-paging span.gap{ display:inline-grid; place-items:center; min-width:24px; height:36px;
  color:#9aa0ad; background:transparent; border:none; font-weight:700; }
.brdc-paging span.disabled{ display:inline-grid; place-items:center; min-width:36px; height:36px;
  border-radius:9px; background:#fff; border:1px solid var(--border); color:var(--primary);
  opacity:.4; pointer-events:none; font-weight:700; }
