/* 问答系统回复和点赞功能样式 */

/* 问答操作按钮 */
.question-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.question-like-btn,
.question-reply-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

.question-like-btn:hover,
.question-reply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.question-like-btn.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.question-like-btn.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.question-reply-btn.active {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* 问答回复框样式 */
.question-reply-box {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: none;
}

.question-reply-box h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 16px;
}

.question-reply-box .comment-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.question-reply-box .comment-list::-webkit-scrollbar {
    width: 8px;
}

.question-reply-box .comment-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.question-reply-box .comment-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.question-reply-box .comment-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.question-reply-box .comment-list li {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s ease;
}

.question-reply-box .comment-list li:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-reply-box .comment-list li:last-child {
    margin-bottom: 0;
}

.question-reply-box .comment-list header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.question-reply-box .comment-list .meta-author {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.question-reply-box .comment-list .meta-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.question-reply-box .comment-list .meta-author strong {
    font-size: 14px;
    color: #495057;
}

.question-reply-box .comment-list .meta-author small {
    font-size: 12px;
    color: #6c757d;
}

.question-reply-box .comment-list p {
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    margin: 0;
}

.question-reply-box .comment-form {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.question-reply-box .comment-form .input-group {
    border-radius: 6px;
    overflow: hidden;
}

.question-reply-box .comment-form .form-control {
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 10px 15px;
    font-size: 14px;
}

.question-reply-box .comment-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.question-reply-box .comment-form .go-question-comment-submit {
    border-radius: 0 6px 6px 0;
    white-space: nowrap;
    min-width: 100px;
    padding: 10px 20px;
    font-size: 14px;
}

/* 问答页面特定样式 */
.single-question .entry-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.single-question .entry-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.single-question .meta-comment a {
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
}

.single-question .meta-comment a:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .question-actions {
        flex-direction: column;
        gap: 6px;
        margin-top: 10px;
    }
    
    .question-like-btn,
    .question-reply-btn {
        font-size: 12px;
        padding: 5px 10px;
        width: 100%;
        justify-content: center;
    }
    
    .question-reply-box {
        padding: 15px;
        margin-top: 15px;
    }
    
    .question-reply-box .comment-list {
        max-height: 250px;
    }
    
    .question-reply-box .comment-form .form-control {
        font-size: 14px;
    }
    
    .question-reply-box .comment-form .go-question-comment-submit {
        min-width: 80px;
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .single-question .entry-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .single-question .entry-meta {
        width: 100%;
        justify-content: space-between;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-reply-box {
    animation: fadeInUp 0.3s ease;
}

.question-reply-box .comment-list li {
    animation: fadeInUp 0.3s ease;
}

/* 加载状态 */
.question-like-btn.disabled,
.question-reply-btn.disabled,
.go-question-comment-submit.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 点赞按钮激活状态 */
.question-like-btn.btn-primary .fa-thumbs-up {
    color: white;
}

.question-like-btn .fa-thumbs-up {
    transition: color 0.3s ease;
}

/* 空状态 */
.question-reply-box:empty {
    display: none;
}

/* 输入框焦点状态 */
.question-reply-box .comment-form input:focus {
    outline: none;
    border-color: #007bff;
}

/* 按钮悬停效果 */
.question-reply-box .go-question-comment-submit:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* 回复数量和点赞数量样式 */
.question-actions .like-count,
.question-actions .reply-count {
    font-weight: 600;
    margin-left: 4px;
}

/* 问答回复框与文章的分隔 */
.question-reply-box {
    border-top: 3px solid #007bff;
}

/* 移动端优化 */
@media (max-width: 576px) {
    .question-actions {
        width: 100%;
    }
    
    .question-like-btn,
    .question-reply-btn {
        flex: 1;
        text-align: center;
    }
    
    .question-reply-box h5 {
        font-size: 14px;
    }
    
    .question-reply-box .comment-list li {
        padding: 12px;
    }
    
    .question-reply-box .comment-list .meta-author img {
        width: 28px;
        height: 28px;
    }
}

/* 问答页面布局优化 */
.single-question article {
    position: relative;
}

.single-question .question-reply-box {
    width: 100%;
    box-sizing: border-box;
}

/* 确保回复框在文章内部 */
.single-question .posts-wrapper article {
    margin-bottom: 20px;
}

.single-question .posts-wrapper article:last-child {
    margin-bottom: 0;
} 