/**
 * 게시글 상세보기 페이지 전용 스타일
 *
 * 접두사: pv- (post-view)
 * 적용 대상: pages/post/view.php 및 하위 위젯
 *
 * 이 파일은 pages/post/view.php 상단에서 로드됩니다.
 */

/* ==================== 1. 게시글 카드 외관 ==================== */

/* 게시글 메인 카드 */
.pv-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* ==================== 2. 제목 영역 (card-header) ==================== */

/* 카드 헤더 */
.pv-card > .card-header {
    background-color: #fff;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(to right, #e9ecef, #dee2e6, #e9ecef) 1;
    padding: 1.25rem 1.5rem;
}

/* 제목 텍스트 */
.pv-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.625rem;
    color: #1a1a1a;
}

/* 메타 정보 행 */
.pv-meta {
    color: #6b7280;
    font-size: 0.8125rem;
}

.pv-meta i {
    margin-right: 0.2rem;
}

/* ==================== 3. 내용 영역 ==================== */

.pv-card > .card-body {
    padding: 1.25rem 1.5rem;
}

/* ==================== 4. 하단 액션 바 (card-footer) ==================== */

.pv-card > .card-footer {
    background-color: #fafbfc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 1.5rem;
}

/* 좋아요/북마크 pill 버튼 스타일 */
.pv-action-btn {
    border-radius: 50rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.pv-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==================== 5. 댓글 카드 디자인 ==================== */

/* 댓글 article: card 스타일 -> 좌측 보더 라인 + 미묘한 배경 */
.pv-comment {
    border: none !important;
    border-left: 3px solid #e2e8f0 !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
    background-color: #f8f9fb;
    margin-bottom: 0.75rem !important;
    transition: background-color 0.2s ease;
}

.pv-comment:hover {
    background-color: #f0f2f5;
}

/* 댓글 내부 padding */
.pv-comment > .card-body {
    padding: 0.875rem 1rem !important;
}

/* 댓글 헤더 */
.pv-comment-header {
    margin-bottom: 0.5rem !important;
}

/* 아바타 크기: 24x24 -> 36x36 + 보더 */
.pv-comment-avatar {
    width: 36px !important;
    height: 36px !important;
    border: 2px solid #e2e8f0;
    object-fit: cover;
}

/* 작성자 이름 */
.pv-comment-author {
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    color: #1a1a1a !important;
}

/* 시간 텍스트 */
.pv-comment-time {
    color: #9ca3af !important;
    font-size: 0.75rem;
}

/* 댓글 내용 */
.pv-comment-body {
    padding: 0.25rem 0 0.375rem 0;
    line-height: 1.65;
    color: #374151;
}

/* ==================== 6. 대댓글 연결 라인 ==================== */

/* 대댓글 (depth > 0) */
.pv-comment-reply {
    position: relative;
    border-left-color: #cbd5e1 !important;
    background-color: #fcfcfd;
}

.pv-comment-reply:hover {
    background-color: #f5f6f8;
}

/* 대댓글 연결선 (부모 댓글과 시각적 연결) */
.pv-comment-reply::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 20px;
    width: 12px;
    border-top: 2px dashed #d1d5db;
}

/* ==================== 7. 댓글 액션 바 ==================== */

.pv-comment-actions {
    padding-top: 0.375rem;
    gap: 0.25rem !important;
}

/* 각 액션 버튼: 호버 시 배경색 */
.pv-comment-actions .btn-link {
    padding: 0.2rem 0.5rem !important;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
    font-size: 0.8125rem !important;
}

.pv-comment-actions .btn-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 좋아요 하트 아이콘 크기 */
.pv-like-icon {
    font-size: 0.9375rem;
}

/* ==================== 8. 댓글 입력 영역 ==================== */

.pv-comment-input {
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.pv-comment-input:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pv-comment-input .form-control {
    background-color: #f3f4f6 !important;
    border-radius: 50rem !important;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
}

/* 카메라 아이콘 색상 */
.pv-camera-icon {
    color: #9ca3af !important;
    transition: color 0.2s ease;
}

.pv-comment-input:hover .pv-camera-icon {
    color: #6b7280 !important;
}

/* ==================== 9. 빈 댓글 상태 ==================== */

.pv-empty-comments {
    padding: 2.5rem 1rem;
}

.pv-empty-comments i {
    font-size: 2.5rem !important;
    color: #d1d5db;
    margin-bottom: 0.75rem;
}

.pv-empty-comments span,
.pv-empty-comments p {
    font-size: 0.9375rem;
    color: #9ca3af;
}

/* ==================== 10. 댓글 섹션 헤더 ==================== */

.pv-comment-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.pv-comment-section-title .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3em 0.6em;
    border-radius: 50rem;
}

/* ==================== 11. 반응형 (모바일) ==================== */

@media (max-width: 767.98px) {
    /* 카드 패딩 축소 */
    .pv-card > .card-header,
    .pv-card > .card-body,
    .pv-card > .card-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* 제목 크기 축소 */
    .pv-title {
        font-size: 1.25rem;
    }

    /* 댓글 아바타 축소 */
    .pv-comment-avatar {
        width: 30px !important;
        height: 30px !important;
    }

    /* 대댓글 연결선 숨김 (좁은 화면) */
    .pv-comment-reply::before {
        display: none;
    }

    /* 댓글 액션 gap 축소 */
    .pv-comment-actions {
        gap: 0.125rem !important;
    }
}
