/* استایل افزونه امتیازدهی به پاسخ‌های مدیر */

.aar-item {
    list-style: none;
    margin: 0 0 16px 0;
    direction: rtl;
}

.aar-box {
    border-radius: 10px;
    padding: 14px 18px;
    font-family: inherit;
    line-height: 1.8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* سوال کاربر */
.aar-question .aar-box {
    background: #f5f6f8;
    border: 1px solid #e2e4e8;
    border-right: 4px solid #8a8f98;
}

/* پاسخ مدیر */
.aar-answer .aar-box {
    background: #eef7f0;
    border: 1px solid #cfe8d5;
    border-right: 4px solid #2e9e4f;
    margin-right: 24px;
}

.aar-box-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.aar-role-badge {
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.aar-badge-question {
    background: #e5e7eb;
    color: #374151;
}

.aar-badge-answer {
    background: #d4f0dc;
    color: #1b6b34;
}

.aar-author {
    font-weight: 600;
    color: #222;
}

.aar-date {
    color: #888;
    margin-right: auto;
    font-size: 12px;
}

.aar-box-content {
    color: #2a2a2a;
    font-size: 15px;
    word-wrap: break-word;
}

.aar-vote-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #d3e6d8;
}

.aar-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.1s ease;
}

.aar-vote-btn:hover {
    transform: scale(1.08);
}

/* پیش‌فرض: فقط خطوط آیکون رنگ خاکستری خنثی دارند (رأی داده نشده) */
.aar-vote-btn .aar-icon-svg {
    stroke: #9aa0a6;
    fill: none;
    transition: stroke 0.15s ease;
}

/* وقتی رأی ثبت شده: فقط خطوط آیکون سبز/قرمز می‌شوند، بدون پس‌زمینه یا رنگ پرشده */
.aar-vote-btn.aar-like.active .aar-icon-svg {
    stroke: var(--aar-like-color, #22c55e);
}

.aar-vote-btn.aar-dislike.active .aar-icon-svg {
    stroke: var(--aar-dislike-color, #ef4444);
}

.aar-vote-btn.aar-like:hover .aar-icon-svg {
    stroke: var(--aar-like-color, #22c55e);
}

.aar-vote-btn.aar-dislike:hover .aar-icon-svg {
    stroke: var(--aar-dislike-color, #ef4444);
}

.aar-icon {
    font-size: 15px;
}

.aar-icon-svg {
    width: var(--aar-icon-size, 20px) !important;
    height: var(--aar-icon-size, 20px) !important;
    stroke-width: 2;
    vertical-align: middle;
    flex-shrink: 0;
}

.aar-vote-btn svg.aar-icon-svg {
    width: var(--aar-icon-size, 20px) !important;
    height: var(--aar-icon-size, 20px) !important;
}

.aar-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
}

.aar-badge-icon {
    width: 15px;
    height: 15px;
    margin-left: 3px;
}

.aar-count {
    font-weight: 600;
    min-width: 14px;
    text-align: center;
}

@media (max-width: 600px) {
    .aar-answer .aar-box {
        margin-right: 10px;
    }
    .aar-date {
        margin-right: 0;
        width: 100%;
    }
}

/* ===== پشتیبانی از سوال/پاسخ‌های تودرتو (نظرات تو در تو) ===== */
/* وردپرس به‌صورت پیش‌فرض به هر سطح از تودرتویی، خودش ul.children می‌دهد
   که تورفتگی را اضافه می‌کند. اینجا فقط مطمئن می‌شویم باکس‌ها و رنگ‌ها
   در هر عمقی از تودرتو ثابت بمانند و بهم نریزند. */
.comment-list .children {
    list-style: none;
    margin: 10px 0 0 0;
    padding-right: 20px;
    border-right: 2px dotted #d8d8d8;
}

/* صرف‌نظر از عمق، ظاهر باکس سوال/پاسخ همیشه یکسان می‌ماند */
.aar-item.aar-question .aar-box,
.aar-item.aar-answer .aar-box {
    box-sizing: border-box;
}

/* در تودرتوهای عمیق، فاصله سمت راست پاسخ کمی کمتر می‌شود تا از صفحه بیرون نزند */
.children .aar-answer .aar-box {
    margin-right: 12px;
}

.children .children .aar-answer .aar-box {
    margin-right: 6px;
}
