/* ═══════════════════════════════════════════════════════════
   NATAMAM-COMMENTS-REDESIGN — درخت + دکمه‌های مدرن
   ═══════════════════════════════════════════════════════════ */

/* ─── کانتینر کلی ─── */
.nat-cm {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    direction: rtl !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
.nat-cm__head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #eef1f3 !important;
    background: #fafbfc !important;
}
.nat-cm__head-title {
    font-size: .92rem !important;
    font-weight: 800 !important;
    color: #0f1419 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.nat-cm__head-count {
    background: #0f1419 !important;
    color: #fff !important;
    font-size: .68rem !important;
    font-weight: 800 !important;
    padding: 3px 10px !important;
    border-radius: 100px !important;
}

/* ─── فرم نوشتن اصلی ─── */
.nat-cm__compose {
    display: flex !important;
    gap: 10px !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #eef1f3 !important;
}
.nat-cm__avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #0F3641, #2A6E80) !important;
    color: #D99A2B !important;
    display: grid !important;
    place-items: center !important;
    font-weight: 900 !important;
    font-size: .88rem !important;
    flex-shrink: 0 !important;
}
.nat-cm__compose-body { flex: 1 !important; min-width: 0 !important; }
.nat-cm__compose-row {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}
.nat-cm__compose-row input {
    flex: 1 !important;
    padding: 9px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 100px !important;
    background: #f7f9f9 !important;
    font-family: inherit !important;
    font-size: .84rem !important;
    outline: none !important;
}
.nat-cm__compose-row input:focus {
    background: #fff !important;
    border-color: #1d9bf0 !important;
}
.nat-cm__compose-input {
    width: 100% !important;
    padding: 11px 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    background: #f7f9f9 !important;
    font-family: inherit !important;
    font-size: .88rem !important;
    line-height: 1.6 !important;
    resize: none !important;
    min-height: 48px !important;
    outline: none !important;
    color: #0f1419 !important;
    box-sizing: border-box !important;
}
.nat-cm__compose-input:focus {
    background: #fff !important;
    border-color: #1d9bf0 !important;
}
.nat-cm__compose-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 10px !important;
}
.nat-cm__compose-hint { font-size: .7rem !important; color: #8b98a5 !important; }
.nat-cm__compose-submit {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 20px !important;
    border-radius: 100px !important;
    background: #0f1419 !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: .8rem !important;
    font-weight: 800 !important;
}
.nat-cm__compose-submit:hover:not(:disabled) { background: #272c30 !important; }
.nat-cm__compose-submit:disabled { opacity: .5 !important; cursor: not-allowed !important; }

/* ═══════════════════════════════════════════════════════════
   لیست کامنت‌ها — ساختار درختی
   ═══════════════════════════════════════════════════════════ */
.nat-cm__list {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    position: relative !important;
}
.nat-cm__empty {
    padding: 40px 20px !important;
    text-align: center !important;
    color: #536471 !important;
    font-size: .88rem !important;
}

/* ─── آیتم کامنت — سطح ۰ ─── */
.nat-cm-item {
    display: flex !important;
    gap: 10px !important;
    padding: 14px 18px 14px 18px !important;
    background: #fff !important;
    position: relative !important;
    border: none !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}
.nat-cm-item:hover { background: #fafbfc !important; }

/* ─── آواتار ─── */
.nat-cm-item__avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #0F3641, #2A6E80) !important;
    color: #D99A2B !important;
    display: grid !important;
    place-items: center !important;
    font-weight: 900 !important;
    font-size: .88rem !important;
    flex-shrink: 0 !important;
}

/* ─── بدنه ─── */
.nat-cm-item__body { flex: 1 !important; min-width: 0 !important; }

/* ─── سرصفحه ─── */
.nat-cm-item__head {
    display: flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    font-size: .84rem !important;
    flex-wrap: wrap !important;
    margin-bottom: 2px !important;
}
.nat-cm-item__name { font-weight: 800 !important; color: #0f1419 !important; }
.nat-cm-item__dot { color: #8b98a5 !important; }
.nat-cm-item__time { color: #536471 !important; font-size: .74rem !important; }

/* ─── متن کامنت ─── */
.nat-cm-item__text {
    margin-top: 2px !important;
    font-size: .9rem !important;
    line-height: 1.7 !important;
    color: #0f1419 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
.nat-cm__mention { color: #1d9bf0 !important; font-weight: 700 !important; }
.nat-cm-item__audio {
    margin-top: 8px !important;
    padding: 8px !important;
    background: #f7f9f9 !important;
    border-radius: 12px !important;
}
.nat-cm-item__audio audio { width: 100% !important; height: 32px !important; }

/* ═══════════════════════════════════════════════════════════
   دکمه‌های کامنت — مدرن (شبیه اینستاگرام — بدون بیضی رنگی)
   ═══════════════════════════════════════════════════════════ */
.nat-cm-item__actions {
    display: flex !important;
    gap: 22px !important;
    align-items: center !important;
    margin-top: 8px !important;
    flex-wrap: wrap !important;
}
.nat-cm-act {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    color: #536471 !important;
    font-family: inherit !important;
    font-size: .78rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: color .15s ease !important;
    line-height: 1 !important;
    border-radius: 0 !important;
}
.nat-cm-act svg {
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    transition: all .15s ease !important;
}
/* لایک */
.nat-cm-act--like:hover { color: #f91880 !important; }
.nat-cm-act--like:hover svg { fill: rgba(249,24,128,.15) !important; }
.nat-cm-act--like.is-active { color: #f91880 !important; }
.nat-cm-act--like.is-active svg { fill: #f91880 !important; stroke: #f91880 !important; }
/* دیس‌لایک */
.nat-cm-act--dislike:hover { color: #ff6b00 !important; }
.nat-cm-act--dislike:hover svg { fill: rgba(255,107,0,.15) !important; }
.nat-cm-act--dislike.is-active { color: #ff6b00 !important; }
.nat-cm-act--dislike.is-active svg { fill: #ff6b00 !important; stroke: #ff6b00 !important; }
/* پاسخ */
.nat-cm-act--reply:hover { color: #1d9bf0 !important; }

/* ─── فرم پاسخ در خط ─── */
.nat-cm-reply-form {
    display: none !important;
    margin-top: 12px !important;
    padding: 10px 12px !important;
    background: #f7f9f9 !important;
    border-radius: 12px !important;
    flex-direction: column !important;
    gap: 8px !important;
}
.nat-cm-reply-form.is-open { display: flex !important; }
.nat-cm-reply-form input {
    padding: 8px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 100px !important;
    background: #fff !important;
    font-family: inherit !important;
    font-size: .8rem !important;
    outline: none !important;
}
.nat-cm-reply-form textarea {
    padding: 10px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #fff !important;
    font-family: inherit !important;
    font-size: .86rem !important;
    line-height: 1.6 !important;
    resize: none !important;
    min-height: 44px !important;
    outline: none !important;
}
.nat-cm-reply-form input:focus,
.nat-cm-reply-form textarea:focus { border-color: #1d9bf0 !important; }
.nat-cm-reply-form__actions {
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-end !important;
}
.nat-cm-reply-cancel,
.nat-cm-reply-submit {
    padding: 7px 18px !important;
    border-radius: 100px !important;
    border: none !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: .78rem !important;
    font-weight: 800 !important;
}
.nat-cm-reply-cancel { background: transparent !important; color: #536471 !important; border: 1px solid #cfd9de !important; }
.nat-cm-reply-cancel:hover { background: #eff3f4 !important; }
.nat-cm-reply-submit { background: #0f1419 !important; color: #fff !important; }
.nat-cm-reply-submit:hover { background: #272c30 !important; }

/* ═══════════════════════════════════════════════════════════
   ساختار درختی — تو‌رفتگی و spine
   ═══════════════════════════════════════════════════════════ */

/* سطح ۱ — تو‌رفتگی ۲۸px + خط عمودی */
.nat-cm-item[data-depth="1"] {
    padding-right: 52px !important;
    background: #fafbfc !important;
}
.nat-cm-item[data-depth="1"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 30px !important;
    width: 2px !important;
    background: #e5e7eb !important;
    border-radius: 0 !important;
}

/* سطح ۲ — تو‌رفتگی ۵۶px */
.nat-cm-item[data-depth="2"] {
    padding-right: 80px !important;
    background: #f7f9f9 !important;
}
.nat-cm-item[data-depth="2"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 30px !important;
    width: 2px !important;
    background: #e5e7eb !important;
}
.nat-cm-item[data-depth="2"]::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 58px !important;
    width: 2px !important;
    background: #e5e7eb !important;
    display: block !important;
}

/* سطح ۳ — تو‌رفتگی ۸۴px */
.nat-cm-item[data-depth="3"] {
    padding-right: 108px !important;
    background: #f4f6f7 !important;
}
.nat-cm-item[data-depth="3"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 30px !important;
    width: 2px !important;
    background: #e5e7eb !important;
}
.nat-cm-item[data-depth="3"]::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 86px !important;
    width: 2px !important;
    background: #e5e7eb !important;
    box-shadow: -28px 0 0 #e5e7eb !important;
}

/* سطح ۴ — تو‌رفتگی ۱۳۶px */
.nat-cm-item[data-depth="4"] {
    padding-right: 136px !important;
    background: #f1f3f4 !important;
}
.nat-cm-item[data-depth="4"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 30px !important;
    width: 2px !important;
    background: #e5e7eb !important;
}
.nat-cm-item[data-depth="4"]::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 114px !important;
    width: 2px !important;
    background: #e5e7eb !important;
    box-shadow: -28px 0 0 #e5e7eb, -56px 0 0 #e5e7eb !important;
}

/* ─── خط افقی بین کامنت‌های هم‌سطح ─── */
.nat-cm-item[data-depth="1"] + .nat-cm-item[data-depth="1"],
.nat-cm-item[data-depth="2"] + .nat-cm-item[data-depth="2"],
.nat-cm-item[data-depth="3"] + .nat-cm-item[data-depth="3"],
.nat-cm-item[data-depth="4"] + .nat-cm-item[data-depth="4"] {
    border-top: 1px dashed #e5e7eb !important;
}

/* ─── آواتار در سطوح پایین‌تر کوچک‌تر ─── */
.nat-cm-item[data-depth="1"] .nat-cm-item__avatar { width: 34px !important; height: 34px !important; min-width: 34px !important; font-size: .78rem !important; }
.nat-cm-item[data-depth="2"] .nat-cm-item__avatar { width: 30px !important; height: 30px !important; min-width: 30px !important; font-size: .72rem !important; }
.nat-cm-item[data-depth="3"] .nat-cm-item__avatar { width: 28px !important; height: 28px !important; min-width: 28px !important; font-size: .68rem !important; }
.nat-cm-item[data-depth="4"] .nat-cm-item__avatar { width: 26px !important; height: 26px !important; min-width: 26px !important; font-size: .64rem !important; }

/* ─── فونت‌ها در سطوح پایین‌تر ─── */
.nat-cm-item[data-depth="1"] .nat-cm-item__text { font-size: .87rem !important; }
.nat-cm-item[data-depth="2"] .nat-cm-item__text { font-size: .85rem !important; }
.nat-cm-item[data-depth="3"] .nat-cm-item__text { font-size: .83rem !important; }
.nat-cm-item[data-depth="4"] .nat-cm-item__text { font-size: .82rem !important; }

/* ═══════════════════════════════════════════════════════════
   نوار تعامل (بالای کامنت‌ها) — لایک/دیس‌لایک مطلب
   ═══════════════════════════════════════════════════════════ */
.engagement-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    margin: 16px 0 12px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
}
.engagement-bar__actions {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}
.engagement-bar__share {
    margin-right: auto !important;
    display: flex !important;
    gap: 6px !important;
}

/* ─── دکمه‌های اصلی لایک/دیس‌لایک — مدرن (بدون بیضی) ─── */
.react-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 14px !important;
    background: transparent !important;
    border: 1px solid #cfd9de !important;
    border-radius: 100px !important;
    color: #536471 !important;
    font-family: inherit !important;
    font-size: .82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all .15s !important;
    line-height: 1 !important;
}
.react-btn svg {
    width: 16px !important;
    height: 16px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
.react-btn:hover {
    border-color: #1d9bf0 !important;
    color: #1d9bf0 !important;
    background: rgba(29,155,240,.04) !important;
}
.react-btn__count { font-size: .74rem !important; font-weight: 800 !important; }
.react-btn.is-like.is-active {
    background: transparent !important;
    color: #f91880 !important;
    border-color: #f91880 !important;
}
.react-btn.is-like.is-active svg { fill: #f91880 !important; stroke: #f91880 !important; }
.react-btn.is-dislike.is-active {
    background: transparent !important;
    color: #ff6b00 !important;
    border-color: #ff6b00 !important;
}
.react-btn.is-dislike.is-active svg { fill: #ff6b00 !important; stroke: #ff6b00 !important; }

/* ─── دکمه‌های اشتراک‌گذاری ─── */
.share-btn {
    width: 36px !important;
    height: 36px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid #cfd9de !important;
    color: #536471 !important;
    cursor: pointer !important;
    transition: all .15s !important;
    text-decoration: none !important;
    padding: 0 !important;
}
.share-btn:hover {
    background: rgba(29,155,240,.10) !important;
    color: #1d9bf0 !important;
    border-color: #1d9bf0 !important;
    transform: translateY(-1px) !important;
}
.share-btn svg { width: 16px !important; height: 16px !important; }

/* ═══════════════════════════════════════════════════════════
   موبایل
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .nat-cm-item { padding: 12px 14px !important; }
    .nat-cm-item__text { font-size: .86rem !important; }
    .nat-cm-item__avatar { width: 34px !important; height: 34px !important; min-width: 34px !important; font-size: .8rem !important; }
    .nat-cm__compose-row { flex-direction: column !important; gap: 6px !important; }
    .nat-cm-item__actions { gap: 18px !important; }
    .nat-cm-act svg { width: 17px !important; height: 17px !important; }

    /* تو‌رفتگی کمتر در موبایل */
    .nat-cm-item[data-depth="1"] { padding-right: 38px !important; }
    .nat-cm-item[data-depth="1"]::before { right: 18px !important; }
    .nat-cm-item[data-depth="2"] { padding-right: 56px !important; }
    .nat-cm-item[data-depth="2"]::before { right: 18px !important; }
    .nat-cm-item[data-depth="2"]::after { right: 38px !important; }
    .nat-cm-item[data-depth="3"] { padding-right: 74px !important; }
    .nat-cm-item[data-depth="3"]::before { right: 18px !important; }
    .nat-cm-item[data-depth="3"]::after { right: 56px !important; box-shadow: -20px 0 0 #e5e7eb !important; }
    .nat-cm-item[data-depth="4"] { padding-right: 92px !important; }
    .nat-cm-item[data-depth="4"]::before { right: 18px !important; }
    .nat-cm-item[data-depth="4"]::after { right: 74px !important; box-shadow: -20px 0 0 #e5e7eb, -40px 0 0 #e5e7eb !important; }
}