/*
 * Hopet Diary - Board Stylesheet
 * 게시판 전용 스타일시트
 */

.board-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.board-table th, .board-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.board-table thead th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #333;
    border-top: 1px solid #ddd;
    border-bottom-width: 2px;
}

.board-table .col-title {
    text-align: left;
}

.board-table .col-title a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}
.board-table .col-title a:hover {
    text-decoration: underline;
}

.board-table .col-num { width: 8%; }
.board-table .col-author { width: 15%; }
.board-table .col-date { width: 12%; }
.board-table .col-views { width: 10%; }

.board-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 공지글 스타일 */
.board-table tr.is-notice {
    background-color: #fffbe6;
    font-weight: bold;
}
.board-table tr.is-notice td:first-child {
    color: #d97706;
}

/* 게시물 헤더의 메타 정보와 액션 버튼을 양쪽으로 정렬하기 위한 컨테이너 */
.post-meta-container {
    display: flex;
    justify-content: space-between; /* 양쪽 끝으로 정렬 */
    align-items: center; /* 세로 중앙 정렬 */
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
}

.post-meta span {
    margin-right: 15px;
}
.post-meta span:last-child {
    margin-right: 0;
}

.post-actions {
    display: flex;
    gap: 8px; /* 버튼 사이 간격 */
}

/* 기존 post-content의 상단 테두리는 이제 필요 없으므로 제거 또는 수정 */
.post-content {
    padding: 10px 0; /* 위아래 패딩 조정 */
    line-height: 1.7;
    border-top: none; /* 상단 테두리 제거 */
}
/* view.php */
.post-view-container { background: #fff; padding: 30px; border-radius: 8px; margin-bottom: 40px; }
.post-header h1 { margin-top: 0; }
.reply-section { margin-top: 40px; }
.reply-list .reply-item { background-color: #f8f9fa; padding: 15px; border-radius: 5px; margin-bottom: 10px; }

/* 답글 카드(reply-item) 구조 개선 */
.reply-item {
    display: flex;
    flex-direction: column; /* 헤더, 본문, 푸터를 세로로 정렬 */
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.reply-content {
    padding: 10px 0;
    line-height: 1.6;
    flex-grow: 1;
}
.reply-content p:first-child { margin-top: 0; }
.reply-content p:last-child { margin-bottom: 0; }


/* 답글 푸터 및 액션 버튼 (신규) */
.reply-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.reply-actions {
    display: flex;
    justify-content: flex-end; /* 버튼들을 오른쪽으로 정렬 */
    align-items: center;
    gap: 8px; /* 버튼 사이 간격 */
}


/* =================================================================
   게시물 및 답글 콘텐츠 공용 스타일
================================================================= */
.post-content,
.reply-content {
    line-height: 1.7;
}

/* 모든 하위 요소에 대한 기본 마진 설정 */
.post-content > *:first-child,
.reply-content > *:first-child {
    margin-top: 0;
}
.post-content > *:last-child,
.reply-content > *:last-child {
    margin-bottom: 0;
}

/* 목록(ul, ol) 태그 스타일 */
.post-content ul, .post-content ol,
.reply-content ul, .reply-content ol {
    /* [핵심] 목록이 안쪽으로 들어오도록 padding-left 추가 */
    padding-left: 25px;
    margin: 1em 0;
}

/* 이미지 스타일 */
.post-content img,
.reply-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1em 0;
}

/* 표(table) 스타일 */
.post-content table,
.reply-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #ccc;
}
.post-content th, .post-content td,
.reply-content th, .reply-content td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}
.post-content th,
.reply-content th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* 인용문(blockquote) 스타일 */
.post-content blockquote,
.reply-content blockquote {
    border-left: 4px solid #007bff;
    margin: 1.5em 0;
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #555;
}