/* ============================================================
   notice.css — 공시안내 게시판 전용 스타일
   ============================================================ */

/* ── 테이블 행 호버 ── */
#board-tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease;
  cursor: pointer;
}

#board-tbody tr:hover {
  background-color: #f8f9ff;
}

#board-tbody tr:last-child {
  border-bottom: none;
}

#board-tbody td {
  padding: 14px 16px;
  vertical-align: middle;
}

#board-tbody .post-title-link {
  color: #1f2937;
  transition: color 0.15s ease;
}

#board-tbody tr:hover .post-title-link {
  color: #1A237E;
}

/* ── 카테고리 뱃지 ── */
.category-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
}

.category-badge.공시 {
  background-color: #fef2f2;
  color: #dc2626;
}

.category-badge.안내 {
  background-color: #eff6ff;
  color: #2563eb;
}

.category-badge.이벤트 {
  background-color: #fefce8;
  color: #ca8a04;
}

.category-badge.기타 {
  background-color: #f3f4f6;
  color: #6b7280;
}

/* ── 페이지네이션 ── */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  transition: all 0.15s ease;
  cursor: pointer;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  border-color: #1A237E;
  color: #1A237E;
  background-color: #f8f9ff;
}

.pagination-btn.active {
  background-color: #1A237E;
  border-color: #1A237E;
  color: white;
  font-weight: 700;
}

.pagination-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── 모달 애니메이션 ── */
#write-modal.show,
#view-modal.show {
  display: flex !important;
}

#write-modal .relative,
#view-modal .relative {
  animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── 게시글 내용 내 링크 ── */
#view-content a {
  color: #1A237E;
  text-decoration: underline;
}

/* ── 반응형 테이블 ── */
@media (max-width: 639px) {
  #board-tbody td {
    padding: 12px 8px;
  }

  #board-tbody .post-title-link {
    font-size: 0.8rem;
  }

  .pagination-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  #write-modal .relative,
  #view-modal .relative {
    max-height: 95vh;
    border-radius: 16px;
  }
}

/* ── 검색 하이라이트 ── */
.search-highlight {
  background-color: #fef08a;
  padding: 0 2px;
  border-radius: 2px;
}