/* static/css/board_style.css에 추가하거나 수정할 내용 */

/* 로고 스타일링 */
.logo-svg {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 15px;
}

/* 게시판 컨테이너 */
.board-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 15px;
}

/* 통합 카드 스타일 */
.integrated-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  transition: transform 0.2s;
  overflow: hidden;
}

.integrated-card:hover {
  transform: translateY(-2px);
}

/* 게시글 본문 영역 */
.post-content {
  padding: 25px 25px 15px;
}

/* 게시글 제목 */
.post-title {
  font-size: 1.6em;
  color: #2c3e50;
  margin-bottom: 12px;
  word-wrap: break-word;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 12px;
}

/* 게시글 메타 정보 */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #7f8c8d;
  font-size: 0.85em;
  margin-bottom: 15px;
}

.post-meta span {
  display: flex;
  align-items: center;
}

.post-meta i {
  margin-right: 5px;
  color: #3498db;
}

/* 게시글 내용 */
.post-body {
  color: #34495e;
  line-height: 1.6;
  font-size: 1em;
  margin-bottom: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

/* 액션 버튼 (좋아요, 신고, 삭제) */
.action-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s;
  gap: 5px;
}

.like-btn {
  background-color: #e8f4fc;
  color: #3498db;
  border: 1px solid #bde0f8;
}

.like-btn:hover {
  background-color: #d1eafc;
}

.report-btn {
  background-color: #fef1f0;
  color: #e74c3c;
  border: 1px solid #fadbd8;
}

.report-btn:hover {
  background-color: #fde3e1;
}

.delete-btn {
  background-color: #f5f5f5;
  color: #7f8c8d;
  border: 1px solid #e0e0e0;
}

.delete-btn:hover {
  background-color: #e0e0e0;
}

#like-icon.liked {
  color: #e74c3c;
}

#report-icon.reported {
  color: #e74c3c;
}

/* 삭제 폼 애니메이션 관련 스타일 */
.delete-form-container {
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  opacity: 0;
  background-color: #f9f9f9;
  border-radius: 5px;
  border: 1px solid #ececec;
  border-width: 0;
}

.delete-form-container.active {
  margin: 10px 0;
  padding: 10px;
  height: auto;
  opacity: 1;
  border-width: 1px;
}

.delete-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-group i {
  position: absolute;
  left: 8px;
  color: #7f8c8d;
  font-size: 0.9em;
  pointer-events: none;
}

/* 이 부분이 핵심 */
.password-input-group input {
  padding: 6px 8px 6px 28px;  /* ← 왼쪽 아이콘 공간 확보 */
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
}

.confirm-delete-btn, .cancel-delete-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.confirm-delete-btn {
  background-color: #e74c3c;
  color: white;
}

.confirm-delete-btn:hover {
  background-color: #c0392b;
}

.cancel-delete-btn {
  background-color: #ecf0f1;
  color: #7f8c8d;
}

.cancel-delete-btn:hover {
  background-color: #bdc3c7;
}

.confirm-delete-btn.small, .cancel-delete-btn.small {
  padding: 4px 8px;
  font-size: 0.8em;
}

/* 게시글 하단 */
.post-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 0;
  border-top: 1px solid #f1f1f1;
  margin-top: 10px;
}

.back-to-list {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7f8c8d;
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.2s;
}

.back-to-list:hover {
  color: #2c3e50;
}

/* 댓글 섹션 */
.comments-section {
  padding: 5px 25px 25px;
  background-color: #fcfcfc;
  border-top: 1px solid #f1f1f1;
}

.comments-section h2 {
  font-size: 1.3em;
  color: #2c3e50;
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-section h2 i {
  color: #3498db;
}

.no-comments {
  text-align: center;
  color: #95a5a6;
  padding: 20px 0;
  font-style: italic;
}

/* 댓글 */
.comment {
  border: 1px solid #ececec;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
  background-color: white;
  position: relative;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  color: #7f8c8d;
  font-size: 0.85em;
  margin-bottom: 8px;
  padding-right: 30px; /*  삭제 버튼과 겹치지 않게 확보 */
  position: relative;
}

.comment-content {
  color: #34495e;
  line-height: 1.5;
  font-size: 0.95em;
  margin-bottom: 5px;
  word-wrap: break-word;
  padding-right: 30px; /* 삭제 버튼 공간 확보 */
}

.delete-comment-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #bdc3c7;
  cursor: pointer;
  padding: 0;
  font-size: 0.9em;
  transition: color 0.2s;
}


.delete-comment-toggle:hover {
  color: #e74c3c;
}

/* 댓글 삭제 폼 애니메이션 */
.delete-comment-form {
  height: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  margin: 0;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #ececec;
  border-width: 0;
  transition: all 0.3s ease-in-out;
}

.delete-comment-form.active {
  height: auto;
  margin-top: 10px;
  padding: 8px;
  opacity: 1;
  border-width: 1px;
}

.delete-comment-form form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.password-input-group.small i {
  left: 6px;
  font-size: 0.85em;
}

.password-input-group.small input {
  padding: 4px 6px 4px 24px;  /* ← 더 작은 아이콘 공간 확보 */
  font-size: 0.85em;
  width: 90px;
}

/* 댓글 작성 */
.write-comment {
  margin-top: 20px;
}

.write-comment h3 {
  font-size: 1.1em;
  color: #2c3e50;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.write-comment h3 i {
  color: #3498db;
}

.comment-form {
  display: flex;
  flex-direction: column;
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.95em;
  resize: none;
  height: 100px;
  margin-bottom: 12px;

  /* 핵심 속성 */
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.form-actions .password-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 30%;
  max-width: 180px;
}

.form-actions .password-input-group i {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8c8d;
  font-size: 0.9em;
  pointer-events: none;
}

.form-actions .password-input-group input {
  padding: 8px 8px 8px 30px;
  font-size: 0.9em;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.comment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9em;
  gap: 6px;
}

.comment-btn:hover {
  background-color: #27ae60;
}

/* 플로팅 패널 */
.floating-panel {
  position: fixed;
  bottom: 60px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #3498db;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  position: relative;
}

.floating-btn:hover {
  transform: translateY(-2px);
}

.floating-btn .tooltip {
  position: absolute;
  right: 55px;
  background-color: #2c3e50;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.floating-btn:hover .tooltip {
  opacity: 1;
}

.floating-btn.write-btn {
  background-color: #2ecc71;
}

.floating-btn.comment-btn {
  background-color: #9b59b6;
}

.floating-btn.list-btn {
  background-color: #34495e;
}

.floating-btn.random-btn {
  background-color: #e67e22;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .post-title {
    font-size: 1.4em;
  }

  .post-meta {
    flex-direction: column;
    gap: 6px;
  }

  .action-buttons {
    flex-wrap: wrap;
  }

  .action-btn {
    flex: 1;
    justify-content: center;
  }

  .delete-form {
    flex-wrap: wrap;
  }

  .password-input-group input {
    width: 100%;
  }

  .confirm-delete-btn, .cancel-delete-btn {
    flex: 1;
  }

  .floating-panel {
    bottom: 15px;
    right: 15px;
    gap: 8px;
  }

  .floating-btn {
    width: 40px;
    height: 40px;
  }
}

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
  color: #2c3e50;
}

.post-author .ip-address {
  font-size: 0.85em;
  color: #999;
}

