/* 툴바 완전 제거 */
#wp-bbp_topic_content-wrap .quicktags-toolbar,
#wp-bbp_reply_content-wrap .quicktags-toolbar { display:none !important; }

/* 본문 textarea 상단 border 복원 */
#bbp_topic_content, #bbp_reply_content {
    border-radius: 8px !important;
    border: 1.5px solid #e2e8f0 !important;
}

/* 글씨 크기 통일 + 줄 맞춤 */
#new-post { font-size: 14px; }
#new-post legend,
#new-post p,
#new-post label,
#new-post input[type=text],
#new-post textarea,
#new-post input[type=checkbox] + *,
.bbp-topic-form-notify label { font-size: 13px !important; line-height: 1.5 !important; }

/* 체크박스 줄 정렬 */
.bbp-topic-form-notify {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 8px 0 !important;
}
.bbp-topic-form-notify label { margin: 0 !important; }
/* 제목 라벨 색상 통일 */
#new-post label[for="bbp_topic_title"] {
    color: #374151 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* 체크박스 크기 통일 */
#new-post input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    flex-shrink: 0;
    vertical-align: middle;
}

/* 체크박스 행 정렬 통일 */
#new-post p.bbp-topic-form-notify,
#new-post p.im-private-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 8px 0 !important;
    font-size: 13px !important;
    color: #6b7280 !important;
}

/* 관리자공개 체크박스 크기 강제 통일 */
#new-post input[name="im_private_topic"] {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
}
/* (선택) 텍스트 수직 정렬 */
#new-post p span[style*="9ca3af"],
#new-post .im-opt {
    vertical-align: middle !important;
    line-height: 1 !important;
    font-size: 12px !important;
}

/* Viewing X topics 텍스트 숨김 */
.bbp-forum-content > p,
.bbp-topics-pagination .bbp-pagination-count,
.bbp-replies-pagination .bbp-pagination-count {
    display: none !important;
}

/* Viewing X topics/topic 텍스트 숨김 */
.bbp-pagination-count,
.bbp-forum-content > p,
.bbp-topics-pagination > p,
.bbp-topic-pagination > p,
#bbpress-forums .bbp-pagination p,
#bbpress-forums > div > p,
#bbpress-forums p.bbp-pagination-count {
    display: none !important;
}

/* ====================================================
   bbPress 테이블 디자인 개선
   ==================================================== */

/* 테이블 전체 */
#bbpress-forums table.bbp-topics,
#bbpress-forums table.bbp-replies {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 6px rgba(0,0,0,.07) !important;
}

/* 헤더 */
#bbpress-forums table.bbp-topics thead tr,
#bbpress-forums table.bbp-replies thead tr {
    background: #2c7be5 !important;
}
#bbpress-forums table.bbp-topics thead th,
#bbpress-forums table.bbp-replies thead th {
    color: #fff !important;
    font-size: .82rem !important;
    font-weight: 600 !important;
    padding: 14px 16px !important;
    border: none !important;
}

/* 행 */
#bbpress-forums table.bbp-topics tbody tr,
#bbpress-forums table.bbp-replies tbody tr {
    background: #fff !important;
    transition: background .15s !important;
}
#bbpress-forums table.bbp-topics tbody tr:hover,
#bbpress-forums table.bbp-replies tbody tr:hover {
    background: #f4f8ff !important;
}
#bbpress-forums table.bbp-topics tbody tr:not(:last-child) td,
#bbpress-forums table.bbp-replies tbody tr:not(:last-child) td {
    border-bottom: 1px solid #e8edf4 !important;
}

/* 셀 */
#bbpress-forums table.bbp-topics td,
#bbpress-forums table.bbp-replies td {
    padding: 16px !important;
    font-size: .9rem !important;
    color: #1a1a2e !important;
    vertical-align: middle !important;
    border: none !important;
}

/* 제목 링크 */
#bbpress-forums .bbp-topic-title a,
#bbpress-forums .bbp-reply-title a {
    color: #2c7be5 !important;
    font-weight: 600 !important;
    font-size: .95rem !important;
    text-decoration: none !important;
    transition: color .15s !important;
}
#bbpress-forums .bbp-topic-title a:hover,
#bbpress-forums .bbp-reply-title a:hover {
    color: #2c7be5 !important;
}

/* 작성자 */
#bbpress-forums .bbp-topic-meta,
#bbpress-forums .bbp-reply-meta {
    font-size: .78rem !important;
    color: #7c8db0 !important;
    margin-top: 4px !important;
}

/* 숫자 컬럼 (참여자, 글수) */
#bbpress-forums .bbp-topic-voice-count,
#bbpress-forums .bbp-topic-reply-count,
#bbpress-forums .bbp-reply-count {
    text-align: center !important;
    font-weight: 600 !important;
    color: #2c7be5 !important;
}

/* 최근글 */
#bbpress-forums .bbp-topic-freshness a,
#bbpress-forums .bbp-reply-freshness a {
    color: #5a7fa8 !important;
    font-size: .82rem !important;
}

/* ====================================================
   모바일 레이아웃 (768px 이하)
   ==================================================== */
@media (max-width: 768px) {
    /* 참여자/글수 컬럼 숨김 */
    #bbpress-forums table.bbp-topics thead th.bbp-topic-voice-count,
    #bbpress-forums table.bbp-topics thead th.bbp-topic-reply-count,
    #bbpress-forums table.bbp-topics tbody td.bbp-topic-voice-count,
    #bbpress-forums table.bbp-topics tbody td.bbp-topic-reply-count {
        display: none !important;
    }

    /* 테이블 셀 패딩 축소 */
    #bbpress-forums table.bbp-topics td,
    #bbpress-forums table.bbp-replies td {
        padding: 12px 10px !important;
        font-size: .85rem !important;
    }

    /* 최근글 컬럼 폰트 축소 */
    #bbpress-forums .bbp-topic-freshness a {
        font-size: .75rem !important;
    }

    /* 새글 작성하기 버튼 전체 너비 */
    #bbpress-forums .bbp-topic-form,
    .im-new-topic-btn {
        width: 100% !important;
    }
}

/* 헤더 색상 강제 override */
#bbpress-forums table thead tr th,
#bbpress-forums table thead tr,
.bbp-topics thead tr,
.bbp-topics thead th {
    background: #2c7be5 !important;
    background-color: #2c7be5 !important;
    color: #fff !important;
}
.bbp-topics thead th a,
.bbp-topics thead th span {
    color: #fff !important;
}

/* 헤더 최강 override */
#bbpress-forums .bbp-topics thead tr th,
#bbpress-forums .bbp-topics thead tr,
#bbpress-forums table thead tr th {
    background-color: #2c7be5 !important;
    color: #ffffff !important;
    border-color: #2c7be5 !important;
}
#bbpress-forums table thead th * {
    color: #ffffff !important;
}
