/* 배대지별 공지사항 게시판 스타일 */

/* 테이블 기본 설정 */
#bo_list table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  background: #fff !important;
}

/* 테이블 헤더 */
#bo_list thead {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%) !important;
}

#bo_list thead th {
  background: transparent !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 15px 8px !important;
  text-align: center !important;
  border: none !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}

/* 테이블 바디 */
#bo_list tbody tr {
  background: #fff !important;
  border-bottom: 1px solid #f1f3f4 !important;
}

#bo_list tbody tr:nth-child(even) {
  background: #fafbfc !important;
}

#bo_list td {
  padding: 12px 8px !important;
  vertical-align: middle !important;
  border: none !important;
  background: inherit !important;
}

/* 호버 효과 제거 */
#bo_list td:hover,
#bo_list th:hover {
  background: inherit !important;
  border: inherit !important;
  box-shadow: none !important;
  transform: none !important;
}

/* 컬럼별 너비 설정 */

/* 체크박스 컬럼 */
#bo_list .td_chk,
#bo_list th:first-child {
  width: 40px !important;
  min-width: 40px !important;
  text-align: center !important;
  padding: 12px 4px !important;
}

/* 번호 컬럼 - 더 넓게 */
#bo_list .td_num2,
#bo_list th:nth-child(2) {
  width: 80px !important;
  min-width: 80px !important;
  text-align: center !important;
  padding: 12px 8px !important;
}

/* 배대지 컬럼 - 더 넓게 */
#bo_list .td_category,
#bo_list .th_category {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  text-align: center !important;
  padding: 12px 8px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
}

/* 제목 컬럼 */
#bo_list .td_subject,
#bo_list th:nth-child(4) {
  width: auto !important;
  text-align: left !important;
  padding: 12px 8px !important;
}

/* 날짜 컬럼 */
#bo_list .td_datetime,
#bo_list th:last-child {
  width: 90px !important;
  min-width: 90px !important;
  text-align: center !important;
  padding: 12px 4px !important;
  font-size: 12px !important;
}

/* 배대지 뱃지 스타일 - 더 예쁘게 */
.cate-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 5px 12px !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3) !important;
  border: 1px solid rgba(0, 123, 255, 0.4) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
  transition: all 0.3s ease !important;
}

/* 체크박스 스타일 */
#bo_list .chk_box {
  display: table-cell !important;
  vertical-align: middle !important;
  text-align: center !important;
}

#bo_list .chk_box input[type='checkbox'] + label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

#bo_list .chk_box input[type='checkbox'] + label span {
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

/* 제목 영역 스타일 */
#bo_list .td_subject .bo_tit {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

#bo_list .td_subject a {
  color: #333 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

#bo_list .td_subject a:hover {
  color: #007bff !important;
  text-decoration: underline !important;
}

/* 아이콘들 */
#bo_list .bo_icons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: 6px !important;
}

/* 공지사항 스타일 */
.bo_notice td {
  background: #fff8f0 !important;
  border-bottom: 1px solid #ffe4b5 !important;
}

.notice_icon {
  display: inline-block !important;
  padding: 2px 6px !important;
  background: #ff6b35 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: bold !important;
  border-radius: 8px !important;
}

/* 반응형 디자인 */

/* 태블릿 */
@media (max-width: 1024px) {
  #bo_list .td_num2,
  #bo_list th:nth-child(2) {
    width: 70px !important;
    min-width: 70px !important;
  }

  #bo_list .td_category,
  #bo_list .th_category {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
  }

  .cate-badge {
    font-size: 11px !important;
    padding: 4px 10px !important;
    max-width: 100% !important;
  }

  #bo_list .td_datetime,
  #bo_list th:last-child {
    width: 80px !important;
    min-width: 80px !important;
    font-size: 11px !important;
  }
}

/* 모바일 */
@media (max-width: 768px) {
  #bo_list .td_num2,
  #bo_list th:nth-child(2) {
    width: 60px !important;
    min-width: 60px !important;
  }

  #bo_list .td_category,
  #bo_list .th_category {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    padding: 12px 6px !important;
  }

  .cate-badge {
    font-size: 10px !important;
    padding: 3px 8px !important;
    max-width: 100% !important;
    border-radius: 12px !important;
  }

  #bo_list .td_datetime,
  #bo_list th:last-child {
    width: 70px !important;
    min-width: 70px !important;
    font-size: 10px !important;
  }

  #bo_list .td_chk,
  #bo_list th:first-child {
    width: 35px !important;
    min-width: 35px !important;
  }

  #bo_list thead th {
    font-size: 12px !important;
    padding: 12px 4px !important;
  }

  #bo_list td {
    padding: 10px 4px !important;
    font-size: 13px !important;
  }

  /* 모바일에서 제목 길이 제한 */
  #bo_list .td_subject a {
    display: block !important;
    max-width: 200px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* 테이블 가로 스크롤 */
  #bo_list .tbl_wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #bo_list table {
    min-width: 500px !important;
  }
}

/* 작은 모바일 */
@media (max-width: 480px) {
  #bo_list .td_num2,
  #bo_list th:nth-child(2) {
    width: 50px !important;
    min-width: 50px !important;
  }

  #bo_list .td_category,
  #bo_list .th_category {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    padding: 10px 4px !important;
  }

  .cate-badge {
    font-size: 9px !important;
    padding: 2px 6px !important;
    max-width: 100% !important;
    border-radius: 10px !important;
  }

  #bo_list .td_datetime,
  #bo_list th:last-child {
    width: 60px !important;
    min-width: 60px !important;
    font-size: 9px !important;
  }

  #bo_list .td_chk,
  #bo_list th:first-child {
    width: 30px !important;
    min-width: 30px !important;
  }

  #bo_list thead th {
    font-size: 11px !important;
    padding: 10px 2px !important;
  }

  #bo_list td {
    padding: 8px 2px !important;
    font-size: 12px !important;
  }

  /* 매우 작은 화면에서 제목 더 짧게 */
  #bo_list .td_subject a {
    max-width: 150px !important;
  }

  #bo_list table {
    min-width: 450px !important;
  }
}

/* 호버 효과 */
#bo_list tbody tr:hover {
  background: #f8f9fa !important;
}

/* 배대지 뱃지 호버 효과 */

/* 배지 호버 시 크기 변화 제거 (겹침 방지) */
.cate-badge:hover {
  transform: none !important;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35) !important;
}

#bo_list tbody tr:hover .cate-badge {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.45) !important;
}
