/* blog/assets/css/post-view-styles.css */

.post-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.post-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.post-header h1 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin: 0;
}

.post-meta {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #888;
}

/* 마크다운 콘텐츠 스타일 */
.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.post-body h1, .post-body h2, .post-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.3;
}

.post-body p {
    margin-bottom: 1.2em;
}

.post-body a {
    color: #333;
    text-decoration: none;
}
.post-body a:hover {
    text-decoration: underline;
}

.post-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
}

.post-body code {
    background-color: #f5f5f5;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.post-body pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
}

.post-body blockquote {
    border-left: 4px solid #ccc;
    padding-left: 15px;
    margin-left: 0;
    color: #666;
}

/* 글 수정/삭제 버튼 */
.post-actions {
    padding-top: 20px; /* 위쪽 패딩으로 간격 조절 */
    padding-bottom: 20px; /* 아래쪽 패딩 추가 */
    border-bottom: 1px solid #eee; /* 블록 하단에만 선 추가 */
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-edit { background-color: #6c757d; }
.btn-edit:hover { background-color: #5a6268; }

.btn-delete { background-color: #666; }
.btn-delete:hover { background-color: #555; }

.back-to-list {
    display: inline-block;
    margin-top: 30px;
    color: #333;
    text-decoration: none;
}
.back-to-list:hover {
    background-color: transparent;
    text-decoration: underline;
}

/* --- 투표 섹션 스타일 --- */
.post-voting {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-top: 20px; /* 위쪽 패딩 */
    border-top: 1px solid #eee; /* 블록 상단에만 선 표시 */
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 25px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vote-btn:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

/* 사용자가 투표한 버튼 스타일 */
.vote-btn.voted {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

#votes-up-count,
#votes-down-count {
    font-weight: bold;
    color: #333;
}

/* --- 설문조사(Poll) 스타일 --- */
.poll-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    background-color: #f9f9f9;
    color: #333; /* 글자색 명시적 지정 */
}
.poll-container.error {
    background-color: #fff0f0;
    border-color: #ffc9c9;
    color: #d9534f;
}
.poll-container h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: #000; /* 제목 색상 명시적 지정 */
}
.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.poll-option {
    padding: 12px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
}
/* 투표 버튼 스타일 */
button.poll-option.vote {
    width: 100%;
    text-align: left;
    background-color: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 1rem;
    color: #333; /* 버튼 글자색 명시적 지정 */
}
button.poll-option.vote:hover {
    background-color: #f0f8ff;
}
/* 투표 결과 스타일 */
.poll-option.result {
    position: relative;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #333;
}
.option-text {
    z-index: 2;
    font-weight: 500;
}
.option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #aed6f1;
    border-radius: 5px;
    z-index: 1;
}
.option-info {
    z-index: 2;
    font-size: 0.9em;
    color: #555;
}
.poll-total-votes {
    text-align: right;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}