/* ===== 댓글 영역 ===== */
.comment-section {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 제목 */
.comment-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 18px;
}

/* ===== 댓글 작성폼 ===== */
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.comment-form input[type="text"],
.comment-form input[type="password"],
.comment-form textarea {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
    background: #fff;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #888;
}

.comment-form textarea {
    min-height: 80px;
    line-height: 1.5;
}

.comment-form .comment-submit {
    align-self: flex-end;
    background: #6b7280;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.comment-form .comment-submit:hover {
    background: #52575e;
}

/* ===== 댓글 목록 ===== */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item,
.reply-item {
    border-top: 1px solid #f1f1f1;
    padding: 12px 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.comment-header b {
    color: #111;
}

.comment-header .time {
    color: #999;
    font-size: 13px;
}

.comment-body {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    margin-left: 4px;
}

/* 답글 버튼, 삭제 버튼 */
.reply-btn,
.delete-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.reply-btn:hover,
.delete-btn:hover {
    color: #111;
}

/* ===== 대댓글 ===== */
.reply-list {
    list-style: none;
    margin-top: 8px;
    margin-left: 20px;
    padding-left: 10px;
}

/* ===== 대댓글 작성폼 ===== */
.reply-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-left: 15px;
}

.reply-form input[type="text"],
.reply-form input[type="password"],
.reply-form textarea {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #fafafa;
}

.reply-form textarea {
    min-height: 60px;
    resize: none;
    line-height: 1.4;
}

.reply-form button {
    align-self: flex-end;
    background: #6b7280;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-form button:hover {
    background: #52575e;
}

/* ===== 모바일 ===== */
@media (max-width: 768px) {
    .comment-section {
        padding-top: 15px;
    }

    .comment-form input,
    .comment-form textarea {
        font-size: 13px;
        padding: 8px;
    }

    .comment-form .comment-submit {
        font-size: 13px;
        padding: 6px 14px;
    }

    .reply-form {
        padding-left: 10px;
    }

    .reply-form input,
    .reply-form textarea {
        font-size: 12.5px;
        padding: 6px;
    }

    .reply-form button {
        font-size: 12.5px;
        padding: 5px 12px;
    }
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 좌-우 정렬 */
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

/* 왼쪽 영역 (닉네임 + 시간) */
.comment-header b {
    color: #111;
    margin-right: 6px;
}

.comment-header .time {
    color: #999;
    font-size: 13px;
}

/* 오른쪽 버튼 그룹 */
.comment-header .btn-group {
    display: flex;
    gap: 6px; /* 삭제 / 답글 간격 */
}

.reply-btn,
.delete-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.reply-btn:hover,
.delete-btn:hover {
    color: #111;
}
