@charset "UTF-8";

/* TOP / SEARCH */
.board-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.board-top p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.board-top strong {
    color: #222;
}

.board-search {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.board-search select,
.board-search input {
    height: 42px;
    border: 1px solid #ddd;
    background: #fff;
    padding: 0 12px;
    outline: none;
    font-size: 13px;
}

.board-search select {
    width: 100px;
}

.board-search input {
    width: 300px;
}

.board-search button {
    height: 42px;
    padding: 0 20px;
    border: none;
    background: #222;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.board-list {
    background: #fff;
}

.board-header,
.board-row {
    display: grid;
    /* 번호 / 제목 / 첨부 / 작성자 / 공개 여부 / 상태 / 작성일 */
    grid-template-columns:
        70px minmax(0, 1fr) 90px 140px 100px 120px 130px;
    align-items: center;
}

.board-header {
    min-height: 55px;
    background: #222;
    color: #fff;
    font-size: 13px;
}

.board-row {
    min-height: 68px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 14px;
}

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

.board-cell {
    padding: 0 18px;
}

.board-no,
.board-writer,
.board-public,
.board-status,
.board-date {
    text-align: center;
}

.board-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-subject a {
    text-decoration: none;
}

.board-subject a:hover {
    text-decoration: underline;
}

.board-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 50px;
}

.board-pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #777;
    text-decoration: none;
    font-size: 13px;
}

.board-pagination a.active {
    background: #222;
    color: #fff;
}

.board-write {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

/* ==============================
   첨부파일 컬럼
============================== */

.board-file {
    text-align: center;
}

/* 아이콘 + 파일 개수 */
.file-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: default;
}

/* 클립 아이콘 */
.file-icon {
    font-size: 15px;
    line-height: 1;
}

/* 첨부파일 개수 */
.file-count {
    font-size: 13px;
    font-weight: 500;
}

/* 실제 이미지 아이콘을 사용하는 경우 */
.file-info img.file-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

@media (max-width: 700px) {
    .board-top {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 20px;
    }

    .board-top form,
    .board-search {
        width: 100%;
    }

    .board-search {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr) auto;
    }

    .board-search select,
    .board-search input {
        width: 100%;
        min-width: 0;
        padding: 0 10px;
    }

    .board-search button {
        padding: 0 14px;
        white-space: nowrap;
    }

    .board-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: transparent;
    }

    .board-header {
        display: none;
    }

    .board-row {
        min-width: 0;
        min-height: 0;
        padding: 16px 14px;
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        gap: 10px 8px;
        align-items: center;
        border: 1px solid #e7e7e7;
        background: #fff;
        font-size: 13px;
    }

    .board-cell {
        min-width: 0;
        padding: 0;
    }

    .board-no {
        grid-column: 1;
        grid-row: 1 / 4;
        color: #999;
        font-size: 12px;
    }

    .board-subject {
        grid-column: 2;
        grid-row: 1;
        font-size: 15px;
        font-weight: 700;
    }

    .board-subject a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .board-writer {
        grid-column: 2;
        grid-row: 2;
        overflow: hidden;
        color: #666;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .board-writer::before {
        content: "作成者 ";
        color: #999;
    }

    .board-date {
        grid-column: 2;
        grid-row: 3;
        color: #888;
        text-align: left;
        white-space: nowrap;
    }

    .board-public {
        grid-column: 3;
        grid-row: 2;
        color: #777;
        white-space: nowrap;
    }

    .board-status {
        grid-column: 3;
        grid-row: 1;
        white-space: nowrap;
    }

    .status-badge {
        max-width: 100%;
        padding: 5px 9px;
        font-size: 10px;
    }

    .board-file {
        grid-column: 3;
        grid-row: 3;
    }

    .file-info {
        padding: 0;
    }

    .board-pagination {
        flex-wrap: wrap;
        margin-top: 32px;
    }

    .board-write {
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    .board-search {
        grid-template-columns: 82px minmax(0, 1fr) 50px;
    }

    .board-search button {
        padding: 0 8px;
    }

    .board-row {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        padding: 14px 10px;
    }
}
