/* board-list.css */

/* 공통 컨테이너 + 제목 */
.board-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.board-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* 검색 + 글쓰기 버튼 영역 */
.board-list-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.board-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.board-search-input {
  padding: 0 8px;
  min-width: 220px;
  height: 36px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* 검색 버튼 */
.btn-search {
  height: 36px;
  padding: 0 12px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  background-color: white;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-search:hover {
  background-color: #f2f2f2;
  color: #000;
}

/* 글쓰기 버튼 */
.board-write-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  text-decoration: none;
  background-color: white;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.board-write-btn:hover {
  background-color: #f2f2f2;
  color: #000;
}

.board-reset-link {
  font-size: 0.9rem;
  margin-left: 6px;
}

/* 글쓰기/내가쓴글 버튼 오른쪽 정렬용 */
.board-list-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 글쓰기/내가쓴글 버튼(a태그)도 검색 버튼 스타일 사용 */
.board-action-btn {
  text-decoration: none;
}

/* 게시판 테이블형 리스트 */
.board-table-wrapper {
  margin-top: 12px;
  border-top: 2px solid #333;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.board-table thead th {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
}

.board-table tbody td {
  padding: 7px 6px;
  border-bottom: 1px solid #f0f0f0;
}

.board-table tbody tr:hover {
  background: #fafafa;
}

.board-table .col-title {
  width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-table .col-writer {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.board-table .col-date {
  width: 30%;
  text-align: center;
}

.board-table a.board-link {
  text-decoration: none;
  color: inherit;
}

.board-meta {
  margin-left: 6px;
  font-size: 0.8rem;
  color: #666;
}

/* 댓글 수 [0] 전체 연한 빨간 + 굵게 */
.board-comment-count {
  color: #ff7676;
  font-weight: 700;
}

/* 게시판 타입별 색상 */
body.board-music  .board-title { color: #1db954; }
body.board-news   .board-title { color: #c62828; }
body.board-notice .board-title { color: #1565c0; }

/* 공통 입력 요소 (리스트에서도 검색창 등에 사용) */
input[type="text"],
textarea {
  font-size: 1rem;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* 반응형 (상단 영역 정리) */
@media (max-width: 768px) {

  .board-container {
    padding: 12px;
  }

  .board-list-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 12px 0;
  }

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

  .board-search-input {
    flex: 1;
    min-width: 0;
    width: 100%;
  }

  .board-search-form .btn-search {
    width: 44px;
    padding: 0;
    font-size: 0;
    position: relative;
  }

  .board-search-form .btn-search::before {
    content: "🔍";
    font-size: 16px;
  }

  .board-reset-link {
    margin-left: 0;
    white-space: nowrap;
  }

  .board-list-actions {
    margin-left: 0;
    width: 100%;
  }

  .board-list-actions .board-action-btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
  }

}

/* 반응형 (모바일 전용)    */
@media (max-width: 600px) {

  /* 리스트 테이블을 카드형으로ㅗ */
  .board-table thead {
    display: none;
  }

  .board-table,
  .board-table tbody,
  .board-table tr,
  .board-table td {
    display: block;
    width: 100%;
  }

  .board-table tbody tr {
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
  }

  .board-table tbody td {
    padding: 4px 2px;
  }

  .board-table .col-title,
  .board-table .col-writer,
  .board-table .col-date {
    width: auto;
    text-align: left;
  }

  .board-table .col-date {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
  }
}
