/* =========================
   Layout
========================= */

.talk-wrapper {
  max-width: 900px;
  margin: 40px auto 60px;
  padding: 0 24px;
}

/* 페이지 헤더 */

.talk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.talk-head h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.talk-desc {
  font-size: 13px;
  color: #777;
}

.talk-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #005bff10;
  color: #005bff;
  border: 1px solid #005bff33;
}

/* 작성 폼 카드 */

.talk-editor {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
  padding: 18px 18px 14px;
  margin-bottom: 28px;
  border: 1px solid #e7e7e7;
}

.talk-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 9px 11px;
  font-size: 13px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.talk-input:focus {
  outline: none;
  border-color: #005bff;
  box-shadow: 0 0 0 1px #005bff22;
}

.talk-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #ddd;
  padding: 10px 11px;
  font-size: 13px;
  resize: vertical;
  box-sizing: border-box;
  min-height: 160px;
  line-height: 1.5;
}

.talk-textarea::placeholder {
  color: #b0b8c0;
  font-size: 13px;
}

.talk-textarea:focus {
  outline: none;
  border-color: #005bff;
  box-shadow: 0 0 0 1px #005bff22;
}

/* 폼 하단 (비공개 + 버튼) */

.talk-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.private-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #555;
}

.private-check input {
  width: 14px;
  height: 14px;
}

/* 저장 버튼 */

.save-btn {
  border: none;
  background: #005bff;
  color: #fff;
  padding: 7px 18px;
  font-size: 13px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.save-btn:hover {
  background: #0048cc;
}

.save-btn:active {
  transform: translateY(1px);
}

/* =========================
   Post List
========================= */

.talk-list-section h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  border: 1px solid #e7e7e7;
  padding: 14px 16px 12px;
}

/* 제목 줄 */

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

.post-title {
  font-size: 15px;
  font-weight: 600;
}

.post-private-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #ff3b3b33;
  color: #ff3b3b;
  background: #ff3b3b0f;
}

/* 메타 정보 */

.post-meta {
  font-size: 11px;
  color: #777;
  margin-bottom: 8px;
}

/* 본문 */

.post-body {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap; /* 줄바꿈 유지 */
  margin-bottom: 10px;
}

/* 비공개 안내 */

.post-body-private {
  font-size: 13px;
  color: #999;
  font-style: italic;
  margin-bottom: 10px;
}

/* 상단 버튼(수정/삭제) */

.post-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.post-btn {
  border: none;
  background: #f3f5f8;
  color: #555;
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
}

.post-btn:hover {
  background: #e6e9f0;
}

/* 댓글 영역 */

.comment-block {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-item {
  font-size: 12px;
  line-height: 1.4;
}

.comment-meta {
  color: #888;
  margin-bottom: 1px;
}

.comment-text {
  white-space: pre-wrap;
}

.comment-delete {
  border: none;
  background: none;
  color: #c33;
  font-size: 11px;
  cursor: pointer;
}

/* 댓글 작성 폼 */

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-form-top {
  display: flex;
  gap: 6px;
}

.comment-author-input {
  flex: 0 0 120px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid #ddd;
  padding: 5px 8px;
  box-sizing: border-box;
}

.comment-textarea {
  flex: 1;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 6px 8px;
  resize: vertical;
  min-height: 40px;
  box-sizing: border-box;
}

.comment-submit {
  align-self: flex-end;
  border: none;
  background: #005bff;
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 2px;
}

/* =========================
   Pagination
========================= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.page-btn {
  border: 1px solid #d0d7e2;
  background: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.page-info {
  font-size: 12px;
  color: #777;
}
