/* ==========================================================================
   게시판(bbs_list.php) 전용 스타일 - 새 디자인(1280px, Pretendard)에 맞춤
   .board-wrap 안에서만 적용되므로 다른 페이지에는 영향 없음
   화면 종류: .board-list(목록) / .board-view(상세) / .board-form(글쓰기·수정·비밀번호)
   ========================================================================== */

.board-wrap {
  max-width: 1280px;
  margin: 60px auto 100px;
  padding: 0 20px;
  box-sizing: border-box;
  font-family: "Pretendard", "Malgun Gothic", sans-serif;
  color: #222;
}

/* 게시판 제목 */
.board-wrap .board-head {
  margin-bottom: 28px;
}
.board-wrap .board-head h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.board-wrap .board-head h2:empty {
  display: none;
}

/* 예전 스킨의 빈 제목 칸(tmb) 숨김 */
.board-wrap td.tmb {
  display: none;
}

/* reset.css 의 appearance:none 때문에 사라진 체크박스·입력칸 복원 (모든 화면 공통) */
.board-wrap input[type="checkbox"],
.board-wrap input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: 16px;
  height: 16px;
  margin: 0 4px 0 14px;
  vertical-align: middle;
  cursor: pointer;
}
.board-wrap input[type="checkbox"]:first-of-type {
  margin-left: 0;
}
.board-wrap input[type="text"].input,
.board-wrap input[type="password"].input,
.board-wrap textarea {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  vertical-align: middle;
  background: #fff;
}
.board-wrap textarea {
  padding: 10px 12px;
}
.board-wrap input.input:focus,
.board-wrap textarea:focus {
  outline: none;
  border-color: #1a4fa0;
}

/* ==========================================================================
   목록 (.board-list)
   ========================================================================== */
.board-list table.menu {
  width: 100% !important;
  border-collapse: collapse;
  border-top: 2px solid #222;
}

/* 세로 구분선 이미지 칸(width=1) 숨김: 머리줄·본문 모두 같은 위치라 열이 어긋나지 않음 */
.board-list table.menu td[width="1"] {
  display: none;
}

/* 이미지가 좁은 칸에서 찌그러지지 않게 */
.board-list table.menu td img {
  max-width: none;
}
/* 번호 칸 */
.board-list table.menu td:first-child {
  min-width: 80px;
  text-align: center;
}

/* 머리줄 (번호/제목/이름/조회 이미지) */
.board-list table.menu tr:first-child td {
  background: #f7f8fa !important;
  height: 52px;
  border-bottom: 1px solid #ddd;
}
.board-list table.menu tr:first-child td p {
  margin: 0;
}

/* 본문 행 */
.board-list table.menu td {
  height: 58px;
  padding: 0 16px;
  font-size: 15px;
  border-bottom: 1px solid #e8e8e8 !important;
  white-space: nowrap;
  box-sizing: border-box;
}
/* 제목 칸은 줄바꿈 허용 */
.board-list table.menu td[align="left"] {
  white-space: normal;
  padding-left: 20px;
}
.board-list table.menu td[align="left"] a {
  color: #222;
  text-decoration: none;
}
.board-list table.menu td[align="left"] a:hover {
  color: #1a4fa0;
  text-decoration: underline;
}
.board-list table.menu tr:not(:first-child):hover td {
  background: #fafbfd;
}
/* "방금 읽던 글" 표시: 예전 >>> 이미지(reading.gif) 대신 줄 배경으로 강조 */
.board-list img[src*="reading.gif"] {
  display: none;
}
.board-list table.menu tr:has(img[src*="reading.gif"]) td {
  background: #eef3fb;
}
.board-list table.menu tr:has(img[src*="reading.gif"]) td[align="left"] a {
  color: #1a4fa0;
  font-weight: 600;
}
/* 이름·조회 칸 */
.board-list table.menu td.top_menu {
  min-width: 90px;
  color: #666;
  font-size: 14px;
}

/* 페이지 번호 */
.board-list td.cp {
  height: 70px !important;
  font-size: 15px;
}
.board-list td.cp a,
.board-list td.cp b {
  display: inline-block;
  min-width: 34px;
  height: 34px;
  line-height: 34px;
  margin: 0 2px;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  color: #555;
}
.board-list td.cp b {
  background: #222;
}
.board-list td.cp b font {
  color: #fff !important;
}

/* 검색: 예전 HTML 은 <form> 이 <table> 안에 잘못 들어 있어 브라우저가 form 을 밖으로 빼내므로
   form 기준 선택자가 맞지 않음 -> 검색 입력칸이 든 칸/표를 직접 지정 */
.board-list table:has(input[name="search_order"]) {
  margin: 10px auto 0;
}
.board-list td:has(> input[name="search_order"]) {
  font-size: 14px;
  color: #444;
  white-space: nowrap;
  padding: 0;
}
.board-list input[name="search_order"] {
  width: 240px;
  margin-left: 14px;
}
.board-list td:has(> input[name="search_order"]) a {
  display: inline-block;
  vertical-align: middle;
}
/* 예전 회색 "검색" 이미지 버튼 -> 새 디자인 버튼 */
.board-list td:has(> input[name="search_order"]) img {
  display: none;
}
.board-list td:has(> input[name="search_order"]) a::before {
  content: "검색";
  display: inline-block;
  height: 38px;
  line-height: 38px;
  padding: 0 22px;
  margin-left: 6px;
  border-radius: 4px;
  background: #222;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.board-list td:has(> input[name="search_order"]) a:hover::before {
  background: #1a4fa0;
}

/* ==========================================================================
   상세 (.board-view)
   예전 스킨은 표를 여러 겹 쓰고 bgcolor/height 속성으로 선을 그림 -> 정리해서 다시 그림
   ========================================================================== */
.board-view td {
  font-size: 15px;
}
/* 예전 1px 선 행(bgcolor 757575/dddddd)과 7px 이미지 선은 숨기고 테두리로 다시 그림 */
.board-view td[height="1"],
.board-view td[height="7"] {
  display: none;
}

/* 제목 줄 */
.board-view table.menu:has(td.main_idx) {
  border-top: 2px solid #222;
  border-bottom: 1px solid #ddd;
}
.board-view td.main_idx {
  width: 120px;
  background: #f7f8fa !important;
  padding: 20px 0;
  font-size: 15px;
}
.board-view td.main_idx + td {
  padding: 20px 20px !important;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
}

/* 이름·작성일·파일 줄 */
.board-view table.menu_bw {
  border-collapse: collapse;
  border-bottom: 1px solid #e5e5e5;
}
.board-view table.menu_bw td {
  height: auto !important;
  padding: 14px 16px;
  font-size: 14px;
  color: #555;
  vertical-align: middle;
}
.board-view table.menu_bw td[bgcolor] {
  width: 120px;
  background: #f7f8fa !important;
  color: #222;
  text-align: center;
}
.board-view table.menu_bw table td {
  padding: 0 !important;
  vertical-align: middle !important;
}
.board-view table.menu_bw a {
  color: #1a4fa0;
}

/* 본문 */
.board-view table[width="98%"] {
  width: 100% !important;
}
.board-view table[width="98%"] > tbody > tr > td {
  height: auto !important;
  min-height: 240px;
  padding: 50px 30px 60px;
  font-size: 16px;
  line-height: 1.9;
  color: #333;
  word-break: keep-all;
  background: #fff;
}
.board-view table[width="98%"] img {
  max-width: 100%;
  height: auto;
}
/* 본문 아래 구분선 */
.board-view table.menu:has(table[width="98%"]) {
  border-bottom: 1px solid #ddd;
}
/* 첨부 이미지 미리보기 */
.board-view td img[src*="../data/bbsData/"] {
  max-width: 100%;
  height: auto;
  margin: 20px 0 0;
}

/* 댓글 */
.board-view textarea[name="coment"] {
  width: 100%;
}
.board-view input[name="name"].input,
.board-view input[name="pwd"].input {
  width: 140px;
  margin: 2px 0;
}

/* 하단 버튼 (글목록/수정/삭제 등 이미지 버튼) */
.board-view table[height="35"] {
  margin-top: 24px;
}
.board-view table[height="35"] td {
  text-align: right;
}
.board-view table[height="35"] img {
  vertical-align: middle;
  margin-left: 4px;
}
/* 글목록 버튼 -> 새 디자인 버튼 */
.board-view a:has(> img[src*="bt_list."]) img {
  display: none;
}
.board-view a:has(> img[src*="bt_list."])::before {
  content: "목록";
  display: inline-block;
  height: 42px;
  line-height: 42px;
  padding: 0 30px;
  border-radius: 4px;
  background: #222;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.board-view a:has(> img[src*="bt_list."]):hover::before {
  background: #1a4fa0;
}

/* ==========================================================================
   글쓰기·수정·비밀번호 (.board-form)
   ========================================================================== */
/* 예전 7px 점선 이미지 행은 숨기고 테두리로 다시 그림 */
.board-form td[height="7"],
.board-form td[background*="pageleft_menu_line"] {
  display: none;
}
.board-form table.menu {
  width: 100% !important;
  border-collapse: collapse;
  border-top: 2px solid #222;
}
.board-form table.menu td {
  height: auto !important;
  padding: 12px 16px;
  font-size: 14px;
  color: #444;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: middle;
  text-align: left;
}
/* 항목 이름 칸 (카테고리/이름/비밀번호/제목/내용/파일/보안코드) */
.board-form td.menu_bw,
.board-form td.bbs1 {
  width: 130px !important;
  background: #f7f8fa !important;
  color: #222;
  font-size: 14px;
  font-weight: 600;
  text-align: center !important;
  white-space: nowrap;
}
/* 추가파일 행은 안쪽 표로 되어 있어 테두리 중복 제거 */
.board-form table.menu td[colspan="2"] {
  padding: 0;
  border-bottom: 0;
}
.board-form table.menu td[colspan="2"] table {
  border-collapse: collapse;
}

/* 입력칸 */
.board-form input[type="text"].input,
.board-form input[type="password"].input {
  width: 260px;
}
.board-form input[name="subject"].input {
  width: 100%;
  max-width: 760px;
}
.board-form input[type="file"].input {
  -webkit-appearance: none;
  appearance: none;
  min-height: auto;
  height: auto;
  padding: 6px 0;
  border: 0;
  font-size: 14px;
}
.board-form input[type="file"]::file-selector-button {
  height: 34px;
  padding: 0 14px;
  margin-right: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f7f8fa;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.board-form select {
  -webkit-appearance: auto;
  appearance: auto;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
}
.board-form input[name="imagecode"].input {
  width: 160px;
  margin-left: 8px;
}
.board-form td:has(> img[src*="chsignup.php"]) {
  white-space: nowrap;
}
.board-form img[src*="chsignup.php"] {
  vertical-align: middle;
  border: 1px solid #ddd;
  border-radius: 4px;
}
/* 에디터(cheditor) 칸은 왼쪽 정렬·여백 */
.board-form td:has(> textarea#content) {
  padding: 12px 16px;
}

/* 하단 등록/취소 버튼 -> 새 디자인 버튼 */
.board-form a:has(> img[src*="bt_reg."]) img,
.board-form a:has(> img[src*="bt_cancel."]) img {
  display: none;
}
.board-form a:has(> img[src*="bt_reg."])::before,
.board-form a:has(> img[src*="bt_cancel."])::before {
  display: inline-block;
  height: 46px;
  line-height: 46px;
  min-width: 120px;
  margin: 30px 4px 0;
  border-radius: 4px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}
.board-form a:has(> img[src*="bt_reg."])::before {
  content: "등록";
  background: #222;
  color: #fff;
}
.board-form a:has(> img[src*="bt_reg."]):hover::before {
  background: #1a4fa0;
}
.board-form a:has(> img[src*="bt_cancel."])::before {
  content: "취소";
  background: #fff;
  color: #444;
  border: 1px solid #ccc;
  box-sizing: border-box;
}
.board-form a:has(> img[src*="bt_cancel."]):hover::before {
  border-color: #888;
}

/* 비밀번호 확인 화면(수정/삭제 전) */
.board-form input[name="pwd"].input:only-of-type {
  margin: 0 6px;
}

/* ==========================================================================
   좁은 화면
   ========================================================================== */
@media (max-width: 768px) {
  .board-wrap {
    margin: 30px auto 60px;
    padding: 0 12px;
  }
  .board-wrap .board-head h2 {
    font-size: 22px;
  }
  .board-list table.menu td {
    padding: 0 8px;
    font-size: 14px;
  }
  .board-list td:has(> input[name="search_order"]) {
    white-space: normal;
  }
  .board-list input[name="search_order"] {
    width: 100%;
    margin: 8px 0 0;
  }
  .board-view td.main_idx,
  .board-view table.menu_bw td[bgcolor] {
    width: 80px;
  }
  .board-view table[width="98%"] > tbody > tr > td {
    padding: 30px 12px 40px;
    font-size: 15px;
  }
  .board-form td.menu_bw,
  .board-form td.bbs1 {
    width: 80px !important;
  }
  .board-form table.menu td {
    padding: 10px 8px;
  }
  .board-form input[type="text"].input,
  .board-form input[type="password"].input {
    width: 100%;
  }
}
