/* =============================================
   그누보드 클래식 스타일 게시판
   키움바로뱅크 board.css
   ============================================= */

/* 게시판 전체 래퍼 */
.board-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 12px 60px;
  font-family: 'Noto Sans KR', '돋움', Dotum, Verdana, sans-serif;
  font-size: 13px;
  color: #333;
}

/* 게시판 제목 헤더 */
.board-title-bar {
  border-top: 2px solid #1e9bd4;
  border-bottom: 1px solid #ccc;
  padding: 10px 0;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.board-title-bar h2 {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.board-title-bar h2 i {
  color: #1e9bd4;
  font-size: 14px;
}
.board-total {
  font-size: 12px;
  color: #666;
}
.board-total strong {
  color: #1e9bd4;
  font-weight: bold;
}

/* 검색 폼 */
.board-search-wrap {
  border: 1px solid #ddd;
  border-top: none;
  background: #f9f9f9;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}
.board-search-wrap select {
  height: 26px;
  border: 1px solid #ccc;
  font-size: 12px;
  padding: 0 4px;
  background: #fff;
  color: #333;
}
.board-search-wrap input[type="text"] {
  height: 26px;
  border: 1px solid #ccc;
  padding: 0 6px;
  font-size: 12px;
  width: 180px;
  color: #333;
}
.board-search-wrap input[type="text"]:focus {
  outline: none;
  border-color: #1e9bd4;
}
.btn-search {
  height: 26px;
  padding: 0 12px;
  background: #555;
  color: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
}
.btn-search:hover { background: #333; }

/* 게시판 목록 테이블 */
.board-list-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #1e9bd4;
}
.board-list-table thead th {
  background: #f5f5f5;
  border-bottom: 1px solid #ccc;
  border-top: none;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: bold;
  color: #555;
  text-align: center;
  white-space: nowrap;
}
.board-list-table tbody tr {
  border-bottom: 1px solid #e8e8e8;
  transition: background 0.1s;
}
.board-list-table tbody tr:hover {
  background: #f0f7fc;
}
.board-list-table tbody td {
  padding: 8px 6px;
  font-size: 13px;
  color: #333;
  vertical-align: middle;
}
.td-num {
  text-align: center;
  width: 55px;
  color: #888;
  font-size: 12px;
}
.td-title {
  text-align: left;
  padding-left: 10px !important;
}
.td-title a {
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.td-title a:hover {
  color: #1e9bd4;
  text-decoration: underline;
}
.td-author {
  text-align: center;
  width: 80px;
  color: #555;
  font-size: 12px;
}
.td-date {
  text-align: center;
  width: 90px;
  color: #888;
  font-size: 12px;
}
.td-views {
  text-align: center;
  width: 55px;
  color: #888;
  font-size: 12px;
}

/* 공지 행 */
.row-notice {
  background: #fffbf0 !important;
}
.row-notice:hover {
  background: #fff5d6 !important;
}
.badge-notice {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 2px;
  margin-right: 3px;
  vertical-align: middle;
  flex-shrink: 0;
}
.badge-new {
  display: inline-block;
  background: #1e9bd4;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-comment {
  color: #1e9bd4;
  font-size: 11px;
  margin-left: 3px;
}
.comment-count {
  color: #1e9bd4;
  font-size: 11px;
  font-weight: bold;
}

/* 빈 게시판 */
.board-empty {
  text-align: center;
  padding: 50px 0;
  color: #999;
  font-size: 13px;
  border-bottom: 1px solid #e8e8e8;
}
.board-empty i {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
  color: #ccc;
}

/* 페이지네이션 */
.board-paging {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin: 14px 0;
}
.board-paging a,
.board-paging span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #ddd;
  font-size: 12px;
  color: #555;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.board-paging a:hover {
  background: #f0f7fc;
  border-color: #1e9bd4;
  color: #1e9bd4;
}
.board-paging span.active {
  background: #1e9bd4;
  border-color: #1e9bd4;
  color: #fff;
  font-weight: bold;
}
.board-paging a.paging-arrow {
  font-size: 11px;
  color: #888;
}

/* 게시판 하단 버튼 영역 */
.board-btn-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.board-btn-right {
  display: flex;
  gap: 4px;
}

/* 공통 버튼 */
.btn-board {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 14px;
  font-size: 12px;
  border: 1px solid #ccc;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: #1e9bd4;
  border-color: #1e9bd4;
  color: #fff;
}
.btn-primary:hover {
  background: #1785b8;
  border-color: #1785b8;
  color: #fff;
}
.btn-default {
  background: #fff;
  border-color: #bbb;
  color: #555;
}
.btn-default:hover {
  background: #f5f5f5;
  color: #333;
}
.btn-danger {
  background: #e74c3c;
  border-color: #e74c3c;
  color: #fff;
}
.btn-danger:hover {
  background: #c0392b;
  border-color: #c0392b;
}
.btn-gray {
  background: #777;
  border-color: #777;
  color: #fff;
}
.btn-gray:hover {
  background: #555;
  border-color: #555;
}

/* =============================================
   글 상세보기 (view)
   ============================================= */
.view-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 12px 60px;
  font-family: 'Noto Sans KR', '돋움', Dotum, Verdana, sans-serif;
  font-size: 13px;
  color: #333;
}

/* 글 제목 */
.view-title-row {
  border-top: 2px solid #1e9bd4;
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 12px;
  background: #f9f9f9;
}
.view-title-row h2 {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  margin: 0 0 6px;
  line-height: 1.4;
  word-break: break-all;
}
.view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #888;
}
.view-meta span i {
  margin-right: 3px;
  color: #aaa;
}

/* 글 본문 */
.view-content-wrap {
  border-bottom: 1px solid #ddd;
  padding: 20px 12px;
  min-height: 160px;
  line-height: 1.8;
  font-size: 14px;
  color: #333;
  word-break: break-all;
  white-space: pre-wrap;
}

/* 글 하단 버튼 */
.view-btn-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
}
.view-btn-left, .view-btn-right {
  display: flex;
  gap: 4px;
}

/* 이전/다음 글 */
.view-prev-next {
  border: 1px solid #ddd;
  margin-bottom: 20px;
}
.view-prev-next-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 7px 10px;
  font-size: 12px;
  gap: 8px;
}
.view-prev-next-row:last-child {
  border-bottom: none;
}
.pn-label {
  width: 30px;
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
  text-align: center;
}
.pn-sep {
  color: #ddd;
  flex-shrink: 0;
}
.pn-title {
  flex: 1;
  color: #333;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pn-title:hover { color: #1e9bd4; text-decoration: underline; }
.pn-none { color: #aaa; font-size: 12px; }

/* =============================================
   댓글
   ============================================= */
.comment-section {
  margin-top: 0;
}
.comment-title {
  font-size: 13px;
  font-weight: bold;
  color: #444;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.comment-title i { color: #1e9bd4; }
.comment-count-badge {
  background: #1e9bd4;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
}

/* 댓글 입력 */
.comment-form-wrap {
  border: 1px solid #ddd;
  border-top: 2px solid #aaa;
  padding: 10px;
  background: #fafafa;
  margin-bottom: 0;
}
.comment-form-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}
.comment-form-row label {
  font-size: 12px;
  color: #666;
  width: 50px;
  flex-shrink: 0;
}
.comment-form-row input[type="text"] {
  height: 28px;
  border: 1px solid #ccc;
  padding: 0 7px;
  font-size: 12px;
  font-family: inherit;
  width: 140px;
}
.comment-form-row input:focus,
.comment-textarea:focus {
  outline: none;
  border-color: #1e9bd4;
}
.comment-textarea {
  width: 100%;
  height: 70px;
  border: 1px solid #ccc;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  color: #333;
}
.comment-form-bottom {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* 댓글 목록 */
.comment-list {
  border: 1px solid #e8e8e8;
  border-top: none;
}
.comment-item {
  border-bottom: 1px solid #eee;
  padding: 10px 12px;
  background: #fff;
}
.comment-item:last-child { border-bottom: none; }
.comment-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.comment-author {
  font-size: 12px;
  font-weight: bold;
  color: #444;
}
.comment-author i {
  color: #1e9bd4;
  margin-right: 3px;
}
.comment-date {
  font-size: 11px;
  color: #aaa;
}
.comment-delete {
  margin-left: auto;
  font-size: 11px;
  color: #aaa;
  background: none;
  border: 1px solid #ddd;
  cursor: pointer;
  padding: 1px 7px;
  font-family: inherit;
}
.comment-delete:hover { color: #e74c3c; border-color: #e74c3c; }
.comment-text {
  font-size: 13px;
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}
.comment-empty {
  padding: 20px 0;
  text-align: center;
  color: #bbb;
  font-size: 12px;
  border: 1px solid #e8e8e8;
  border-top: none;
}

/* =============================================
   글쓰기 / 수정 폼
   ============================================= */
.write-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 12px 60px;
  font-family: 'Noto Sans KR', '돋움', Dotum, Verdana, sans-serif;
  font-size: 13px;
  color: #333;
}
.write-title-bar {
  border-top: 2px solid #1e9bd4;
  border-bottom: 1px solid #ccc;
  padding: 10px 0;
  margin-bottom: 0;
}
.write-title-bar h2 {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.write-title-bar h2 i { color: #1e9bd4; }

/* 입력 폼 테이블 */
.write-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #1e9bd4;
  margin-top: 0;
}
.write-table tr {
  border-bottom: 1px solid #e0e0e0;
}
.write-table th {
  background: #f5f5f5;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: bold;
  color: #555;
  text-align: left;
  width: 100px;
  vertical-align: top;
  padding-top: 13px;
  white-space: nowrap;
}
.write-table td {
  padding: 8px 10px;
}
.write-input {
  width: 100%;
  height: 32px;
  border: 1px solid #ccc;
  padding: 0 8px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  color: #333;
}
.write-input:focus {
  outline: none;
  border-color: #1e9bd4;
}
.write-textarea {
  width: 100%;
  height: 300px;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.7;
  color: #333;
}
.write-textarea:focus {
  outline: none;
  border-color: #1e9bd4;
}
.write-btn-wrap {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 0;
  border-top: 1px solid #ddd;
  margin-top: 0;
}

/* 관리자 비밀번호 모달 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: #fff;
  border-top: 3px solid #1e9bd4;
  padding: 24px 28px 20px;
  width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.modal-title {
  font-size: 14px;
  font-weight: bold;
  color: #222;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-title i { color: #1e9bd4; }
.modal-desc {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}
.modal-input {
  width: 100%;
  height: 34px;
  border: 1px solid #ccc;
  padding: 0 10px;
  font-size: 13px;
  box-sizing: border-box;
  margin-bottom: 6px;
}
.modal-input:focus {
  outline: none;
  border-color: #1e9bd4;
}
.modal-error {
  color: #e74c3c;
  font-size: 11px;
  height: 16px;
  margin-bottom: 10px;
}
.modal-btn-wrap {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* 알림 토스트 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 13px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: #27ae60; }
.toast.error   { background: #e74c3c; }

/* 로딩 스피너 */
.loading-row td {
  text-align: center;
  padding: 40px 0;
  color: #aaa;
}
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid #e0e0e0;
  border-top-color: #1e9bd4;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   에디터 툴바
   ============================================= */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-bottom: none;
  padding: 5px 8px;
}
.editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #bbb;
  color: #444;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.editor-btn:hover {
  background: #1e9bd4;
  border-color: #1e9bd4;
  color: #fff;
}
.editor-toolbar-tip {
  font-size: 11px;
  color: #aaa;
}

/* 본문 내 앵커 링크 스타일 */
.view-content-wrap a.content-link {
  color: #1e9bd4;
  text-decoration: underline;
  word-break: break-all;
}
.view-content-wrap a.content-link:hover {
  color: #1572a3;
}

/* =============================================
   반응형
   ============================================= */
@media (max-width: 640px) {
  .board-wrap, .view-wrap, .write-wrap {
    padding: 10px 6px 40px;
  }
  .td-author, .td-date, .td-views {
    display: none;
  }
  .board-list-table thead th.th-author,
  .board-list-table thead th.th-date,
  .board-list-table thead th.th-views {
    display: none;
  }
  .board-search-wrap input[type="text"] {
    width: 120px;
  }
  .view-meta {
    gap: 8px;
  }
  .write-table th {
    width: 70px;
    font-size: 11px;
    padding: 10px 6px;
  }
  .write-textarea {
    height: 200px;
  }
  .view-prev-next-row {
    font-size: 11px;
  }
  .comment-form-row input[type="text"] {
    width: 100px;
  }
}
