/* 게시판 전용 스타일 */

/* 레이아웃 */
.board-container {
  padding: 56px 0;
}

.board-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.board-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.board-search {
  display: flex;
  gap: 8px;
}

.board-search input {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.board-filter select {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.96);
}

/* 테이블 */
.board-table-wrapper {
  overflow-x: auto;
}

.board-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-tiny);
  overflow: hidden;
}

.board-table th,
.board-table td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.board-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  background: var(--accent-soft);
}

.board-table tbody tr {
  cursor: pointer;
}

.board-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
}

.page-btn {
  border: none;
  background: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.16s ease, color 0.16s ease;
}

.page-btn:hover {
  background: var(--accent-soft);
}

.page-btn.active {
  background: var(--accent);
  color: #fff;
}

/* 모달 */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  width: 100%;
  /* 모달 크기를 기존보다 30% 확장 */
  max-width: 832px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  font-size: 20px;
  line-height: 1;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-sub);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

/* 폼 필드 */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-field label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.form-field input,
.form-field select,
.form-field textarea {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.96);
}

.form-field textarea {
  resize: vertical;
}

/* 버튼 확장: secondary, danger */
.btn.secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn.secondary:hover {
  background: #ffffff;
  box-shadow: var(--shadow-tiny);
}

.btn.danger {
  background: #c94b4b;
  color: #fff;
}

.btn.danger:hover {
  background: #b33d3d;
}

/* 댓글 영역 */
.comment-section {
  margin-top: 20px;
}

.comment-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 8px;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-item .comment-meta {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.comment-item .comment-content {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.comment-item .comment-actions {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}

.comment-item .comment-actions:hover {
  text-decoration: underline;
}

/* 푸터 링크 스타일 */
.footer-link {
  margin-left: 12px;
  color: var(--text-sub);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-main);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .board-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .board-search {
    width: 100%;
  }
  .board-search input {
    flex: 1;
    width: 100%;
  }
  .board-filter select {
    width: 100%;
  }
  .modal-content {
    max-width: 92vw;
  }
}