/* ===== board-patch.css — 게시판 UX 개선 ===== */

/* 1. 목록으로 가기 버튼 (게시글 상단) */
.post-back-bar {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}
.btn-back-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #f5f6fa;
  border: 1px solid #ddd;
  border-radius: 10px;
  color: #555;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back-list:hover {
  background: #e8e8f0;
  border-color: #bbb;
  color: #333;
}
.back-arrow {
  font-size: 16px;
  font-weight: 700;
}

/* 목록 버튼 (수정/삭제 옆) */
.btn-list-inline {
  background: #f0f4ff !important;
  color: #4A90D9 !important;
  padding: 6px 16px !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 0.85em !important;
  font-family: 'Noto Sans KR', sans-serif !important;
  transition: background 0.2s !important;
}
.btn-list-inline:hover {
  background: #dbe8ff !important;
}

/* 2. 게시판 내 검색 */
.board-list-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}
.board-list-search input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.board-list-search input:focus {
  border-color: #4A90D9;
}
.board-list-search button {
  padding: 10px 18px;
  background: linear-gradient(135deg, #4A90D9, #357ABD);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}
.board-list-search button:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(74,144,217,0.3);
}
.board-list-search-count {
  display: none;
  text-align: center;
  color: #636e72;
  font-size: 14px;
  margin-bottom: 12px;
}
.board-list-search-count strong {
  color: #4A90D9;
}

/* 검색어 하이라이트 */
.search-hl {
  background: #ffeaa7;
  color: #2d3436;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

/* 5. 페이지 상단 이동 버튼 */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A90D9, #357ABD);
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(74,144,217,0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(74,144,217,0.45);
}

/* 다크 모드 */
body.dark .btn-back-list {
  background: #1e2a45;
  border-color: #2a3a5c;
  color: #b0b0b0;
}
body.dark .btn-back-list:hover {
  background: #2a3a5c;
  color: #e0e0e0;
}
body.dark .btn-list-inline {
  background: #1e2a45 !important;
  color: #60a5fa !important;
}
body.dark .btn-list-inline:hover {
  background: #2a3a5c !important;
}
body.dark .board-list-search input {
  background: #1e2a45;
  border-color: #2a3a5c;
  color: #e0e0e0;
}
body.dark .board-list-search input::placeholder {
  color: #666;
}
body.dark .board-list-search-count {
  color: #999;
}
body.dark .post-back-bar {
  border-bottom-color: #2a3a5c;
}

/* 모바일 대응 */
@media (max-width: 600px) {
  .board-list-search {
    flex-direction: column;
  }
  .board-list-search button {
    width: 100%;
  }
  .scroll-top-btn {
    bottom: 20px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
  .btn-back-list {
    padding: 6px 14px;
    font-size: 13px;
  }
}
