/* board.css - 게시판 목록 및 상세 화면 스타일 */

/* =========================================
   1. 레이아웃 & 광고 영역 (Layout & Ads)
   ========================================= 
*/
/* .container와 결합하여 우선순위 확보 */
.container.boardWide {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

/* [New] 페이지 상하 여백 (인라인 대체) */
.board-page-container {
    margin-top: 24px;
    margin-bottom: 40px;
}

.boardLayoutCenter {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}

.boardCardWrap {
    width: 1000px;
    flex-shrink: 0;
    max-width: 96vw;
}

.adTall {
    position: sticky;
    top: 80px;
    width: 300px;
    height: 600px;
    flex-shrink: 0;
    z-index: 10;
}

/* [New] 광고 내부 텍스트 스타일 (인라인 대체) */
.ad-text-placeholder {
    font-size: 20px;
    color: #cbd5e1;
    font-weight: 700;
}

@media (max-width: 1700px) {
    .adTall {
        display: none;
    }

    .boardCardWrap {
        width: 100%;
        max-width: 1000px;
        padding: 0 16px;
        flex-shrink: 1;
    }
}

/* =========================================
   2. 게시판 카드 및 헤더 (Card & Header)
   ========================================= 
*/
.boardCardWrap .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: visible;
}

/* [New] 헤더 Flex 정렬 (인라인 대체) */
.board-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* [New] 헤더 설명 텍스트 (인라인 대체) */
.board-header-desc {
    font-size: 13px;
    margin-top: 4px;
    color: var(--muted);
}

/* =========================================
   3. 테이블 스타일 (Table)
   ========================================= 
*/
.boardTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.boardTable th,
.boardTable td {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.boardTable th {
    background: var(--surface-hover);
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
}

/* 컬럼 너비 클래스 (HTML style width 대체) */
.colNo {
    width: 60px;
}

.colTag {
    width: 80px;
}

.colWriter {
    width: 120px;
    color: var(--muted);
}

.colVotes {
    width: 60px;
}

.colViews {
    width: 70px;
}

.colTime {
    width: 100px;
}

/* 제목 셀 스타일 */
.boardTable td.postTitle {
    text-align: left;
    padding-left: 15px;
    width: auto;
}

a.postTitle {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
}

.boardTable tbody tr:hover {
    background-color: var(--surface-hover);
}

/* 활성 행 (공지사항 등) */
.boardTable tbody tr.active-row {
    background-color: var(--primary-bg);
}

.boardTable tbody tr.active-row .postTitle {
    color: var(--primary);
    font-weight: 800;
}

@media (max-width: 768px) {
    .colNo,
    .colViews,
    .colVotes {
        display: none;
    }

    .colTime {
        width: 70px;
        font-size: 11px;
        text-align: right;
    }
}

/* =========================================
   4. 페이지네이션 (Pagination)
   ========================================= 
*/
.pagerWrap {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.pager {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
}

.pager a {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
}

.pager a.active {
    background: var(--primary);
    color: white;
}

/* =========================================
   5. 검색창 및 필터 (Search Bar)
   ========================================= 
*/
.boardSearchBelow {
    display: flex;
    justify-content: center;
    padding-bottom: 60px;
    margin-top: 20px;
}

.boardSearchBar {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 12px;
    width: 100%;
    max-width: 420px;
    height: 44px;
    position: relative;
}

.boardSearchBar .boardSearchBtn {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
}

.boardSearchBar .boardSearchBtn svg {
    stroke: var(--muted);
}

.searchDivider {
    width: 1px;
    height: 16px;
    background: var(--line);
    margin: 0;
    flex-shrink: 0;
}

.boardSearchBar input {
    border: none;
    background: transparent;
    padding: 0 12px;
    height: 100%;
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    outline: none;
    color: var(--text);
}

/* 커스텀 셀렉트 (검색 타입) */
.custom-select {
    position: relative;
    height: 100%;
    width: 100px;
    margin-left: -12px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
}

.select-styled {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 12px;
    padding-right: 15px;
    color: var(--text);
    width: 100%;
    height: 100%;
    position: relative;
}

.select-styled::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-20%);
    border: 4.5px solid transparent;
    border-top-color: var(--muted);
}

.select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--line);
    border-radius: 10px;
    z-index: 10000;
    padding: 4px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin: 0;
}

html[data-theme="dark"] .select-options {
    background-color: #2d3748;
}

.select-options li {
    padding: 10px 0;
    cursor: pointer;
    list-style: none;
    text-align: center;
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
}