/* Коментари + гласуване (/css/ai_comments.css) */

.ai-comments { width: 100%; }

.ai-comment-item {
    position: relative;
    margin-bottom: 15px;
}

.ai-comment-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
}

.ai-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.ai-comment-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #495057;
    flex-shrink: 0;
}

.ai-comment-name {
    font-weight: 600;
    color: #212529;
}

.ai-comment-date {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.ai-comment-text {
    color: #343a40;
    line-height: 1.6;
    font-size: 15px;
}

.ai-comment-children {
    margin-left: 45px;
    margin-top: 12px;
    padding-left: 20px;
    border-left: 3px solid #dee2e6;
}

.ai-comment-children .ai-comment-card {
    background: #f8f9fa;
}

/* Гласуване */
.ai-comment-votes {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ai-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: #495057;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 20px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.ai-vote-btn:hover:not(:disabled) { background: #f1f3f5; }

.ai-vote-btn:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.ai-vote-btn:disabled { cursor: default; }

/* след гласуване: неизбраният бутон избледнява */
.ai-comment-votes.is-voted .ai-vote-btn:not(.is-active) { opacity: .55; }

.ai-vote-btn.is-active.ai-vote-up   { color: #198754; border-color: #198754; background: #e8f5ee; }
.ai-vote-btn.is-active.ai-vote-down { color: #dc3545; border-color: #dc3545; background: #fdecee; }

.ai-comment-votes.is-loading { opacity: .6; pointer-events: none; }

.ai-comment-votes .ai-vote-error {
    font-size: 12px;
    color: #dc3545;
}

@media (max-width: 767px) {
    .ai-comment-header { align-items: flex-start; }

    .ai-comment-children {
        margin-left: 10px;
        padding-left: 12px;
    }
}
