/* =========================================================
   /board/* list 공통 (공지/FAQ/QNA)
   JSP 구조 기준:
   .container.py-4.user-board
     - (section) .card > .card-header.tab-header > ul.nav-tabs
     - (section) .card > .card-body > form.row
     - (section) .card > .card-header + .table-responsive > table.table
   ========================================================= */

/* -----------------------------
   0) Base: 카드/레이아웃 톤
-------------------------------- */
.user-board .card {
  border: 0;
 
}



.user-board .card-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 16px;
}

/* 목록 카드 헤더(“공지사항 목록 (총 n건)”) 라인 */
.user-board section .card .card-header.bg-white {
  border-bottom: 1px solid #e5e7eb;
}


/* 탭 바 자체를 "하얀 띠"처럼 보이게 */
.user-board .card > .card-header.tab-header {
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 0 12px !important;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* Bootstrap nav-tabs 기본 테두리 제거 */
.user-board .card-header.tab-header .nav-tabs {
  border-bottom: 0 !important;
  margin-bottom: 0 !important;
  gap: 2px;
}

/* 기본 탭 링크 */
.user-board .card-header.tab-header .nav-tabs .nav-link {
  border: 0 !important;
  background: transparent !important;

  padding: 14px 18px !important;
  line-height: 1 !important;

  font-weight: 700 !important;
  color: #475569 !important;

  border-bottom: 3px solid transparent !important;

  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-board .card-header.tab-header .nav-tabs .nav-link:hover {
  color: #0f172a !important;
}

/* 활성 탭 */
.user-board .card-header.tab-header .nav-tabs .nav-link.active {
  color: #0d6efd !important;
  border-bottom-color: #0d6efd !important;
  font-weight: 800 !important;
}

/* 탭 아이콘 */
.user-board .card-header.tab-header .material-icons-outlined.small {
  font-size: 18px !important;
  line-height: 1 !important;
}

/* -----------------------------
   2) Search Card: 검색 영역 톤
-------------------------------- */
.user-board form.row .form-label {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 6px;
}

.user-board form.row .form-control {
  border-radius: 10px;
  padding: 1px 12px;
  border-color: #e5e7eb;
}

.user-board form.row .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.12);
}

.user-board form.row .btn {
 
  padding: 1px 12px;
  font-weight: 800;
}

/* -----------------------------
   3) Table: 목록 글꼴/간격/헤더 톤
-------------------------------- */
.user-board .table-responsive .table {
  margin-bottom: 0;
}

/* thead */
.user-board .table-responsive .table thead th {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: #0f172a;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 14px;
  white-space: nowrap;
}

/* tbody */
.user-board .table-responsive .table tbody td {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  padding: 14px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

/* hover */
.user-board .table-hover > tbody > tr:hover > * {
  background: #f8fafc;
}

/* 링크 */
.user-board .table-responsive .table tbody td a {
  color: #111827 !important;
  text-decoration: none !important;
}

.user-board .table-responsive .table tbody td a:hover {
  text-decoration: underline !important;
}

/* (A) 글자 세로 찢어짐 방지 */
.user-board .table-responsive table.table th,
.user-board .table-responsive table.table td {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

/* -----------------------------
   4) Pagination: 페이징 톤
-------------------------------- */
.user-board .pagination .page-link {
  border-radius: 10px;
  margin: 0 3px;
  border-color: #e5e7eb;
  color: #334155;
}

.user-board .pagination .page-item.active .page-link {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
}

/* =========================================================
   5) Mobile (<=768px): 테이블 -> 카드형 변환
   - JSP 수정 없이: nth-child 라벨 주입
   ========================================================= */
@media (max-width: 768px) {

  /* 탭 여백 미세 조정 */
  .user-board .card > .card-header.tab-header {
    padding: 0 8px !important;
  }

  .user-board .card-header.tab-header .nav-tabs .nav-link {
    padding: 14px 14px !important;
  }

  /* 1) THEAD 숨김 */
  .user-board .table-responsive table.table thead {
    display: none !important;
  }

  /* 2) table 구조 block 전환 */
  .user-board .table-responsive table.table,
  .user-board .table-responsive table.table tbody,
  .user-board .table-responsive table.table tr,
  .user-board .table-responsive table.table td {
    display: block !important;
    width: 100% !important;
  }

  /* 3) tr을 카드로 */
  .user-board .table-responsive table.table tbody tr {
    background: #fff !important;
    margin: 10px 12px !important;
    padding: 12px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  /* 4) td = 라벨(좌) + 값(우) */
  .user-board .table-responsive table.table tbody td {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;

    padding: 8px 0 !important;
    border: 0 !important;
    text-align: left !important;

    font-size: 14px !important;
    font-weight: 500 !important;
    color: #111827 !important;

    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  /* 5) 라벨 */
  .user-board .table-responsive table.table tbody td::before {
    content: "" !important;
    flex: 0 0 76px !important;
    font-weight: 900 !important;
    color: #64748b !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
    padding-top: 2px !important;
  }

  /* 6) 값 영역 overflow 방지 */
  .user-board .table-responsive table.table tbody td,
  .user-board .table-responsive table.table tbody td > * {
    min-width: 0 !important;
  }

  .user-board .table-responsive table.table tbody td:nth-child(2) {
    max-width: none !important;
    width: 100% !important;
  }
  .user-board .table-responsive table.table tbody td:nth-child(2).text-truncate {
    overflow: visible !important;
    text-overflow: unset !important;
    white-space: normal !important;
  }

  /* 제목만 줄바꿈 허용 */
  .user-board .table-responsive table.table tbody td:nth-child(2),
  .user-board .table-responsive table.table tbody td:nth-child(2) a {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }

  /* 나머지는 기본 1줄 */
  .user-board .table-responsive table.table tbody td:not(:nth-child(2)) {
    white-space: nowrap !important;
  }

  /* 7) 라벨 주입 (현재 JSP 컬럼 순서 기준) */
  .user-board .table-responsive table.table tbody td:nth-child(1)::before { content: "번호" !important; }
  .user-board .table-responsive table.table tbody td:nth-child(2)::before { content: "제목" !important; }
  .user-board .table-responsive table.table tbody td:nth-child(3)::before { content: "작성자" !important; }
  .user-board .table-responsive table.table tbody td:nth-child(4)::before { content: "조회수" !important; }
  .user-board .table-responsive table.table tbody td:nth-child(5)::before { content: "등록일" !important; }

  /* 8) 모바일에서 검색 버튼/인풋 간격 */
  .user-board form.row .btn {
    padding: 10px 12px;
  }
}
