/* ═══════════════════════════════════════════════════════════
   nat-comments-cascade.css — v4
   ═══════════════════════════════════════════════════════════ */
.ncc-wrap{direction:rtl;font-family:'Vazirmatn',Tahoma,sans-serif;font-size:1rem;line-height:1.75;padding:14px 16px 20px;color:#1a1e22}
.ncc-empty{text-align:center;padding:44px 20px;color:#8a7d63;font-size:.9em}
.ncc-form{display:flex;gap:10px;padding:14px;background:#faf7ee;border:1px solid rgba(15,54,65,.08);border-radius:14px;margin-bottom:18px}
.ncc-form__avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#0F3641,#2A6E80);color:#D99A2B;display:grid;place-items:center;font-weight:800;font-size:1.1em;flex-shrink:0}
.ncc-form__body{flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}
.ncc-form__row{display:flex;gap:8px;flex-wrap:wrap}
.ncc-form__row input{flex:1;min-width:120px;padding:9px 14px;border:1px solid rgba(15,54,65,.15);border-radius:100px;font-family:inherit;font-size:.88em;outline:none;background:#fff;transition:border-color .2s}
.ncc-form__row input:focus{border-color:#2A6E80}
.ncc-form textarea{width:100%;padding:10px 14px;border:1px solid rgba(15,54,65,.15);border-radius:12px;font-family:inherit;font-size:.92em;min-height:60px;resize:vertical;outline:none;background:#fff;line-height:1.7;transition:border-color .2s}
.ncc-form textarea:focus{border-color:#2A6E80}
.ncc-form__submit{align-self:flex-end;padding:9px 22px;background:linear-gradient(135deg,#0F3641,#2A6E80);color:#fff;border:none;border-radius:100px;font-family:inherit;font-size:.88em;font-weight:800;cursor:pointer;transition:all .2s}
.ncc-form__submit:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,54,65,.25)}
.ncc-form__submit:disabled{opacity:.5;cursor:wait}

.ncc-list{display:flex;flex-direction:column;gap:10px}
.ncc-node{position:relative}
.ncc-node--reply{margin-top:6px}
.ncc-body{display:flex;gap:10px;padding:12px 14px;background:#fff;border:1px solid rgba(15,54,65,.08);border-radius:12px;transition:border-color .2s}
.ncc-body:hover{border-color:rgba(15,54,65,.16)}
.ncc-node--reply>.ncc-body{background:#fafbfc;border-color:rgba(15,54,65,.05)}
.ncc-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#0F3641,#2A6E80);color:#D99A2B;display:grid;place-items:center;font-weight:800;font-size:1em;flex-shrink:0;overflow:hidden}
.ncc-avatar img{width:100%;height:100%;object-fit:cover}
.ncc-main{flex:1;min-width:0}
.ncc-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.ncc-name{font-weight:800;color:#0F3641;font-size:.92em}
.ncc-time{font-size:.72em;color:#8a7d63}
.ncc-text{font-size:.92em;line-height:1.8;color:#1a1e22;word-wrap:break-word;margin-bottom:6px}
.ncc-text .ncc-mention{color:#2A6E80;font-weight:700;background:rgba(42,110,128,.08);padding:1px 5px;border-radius:4px}
.ncc-audio{margin:6px 0}
.ncc-audio audio{width:100%;height:34px}
.ncc-actions{display:flex;gap:8px;align-items:center}
.ncc-act{background:transparent;border:none;color:#5e6260;font-family:inherit;font-size:.78em;font-weight:700;cursor:pointer;padding:3px 8px;border-radius:6px;display:inline-flex;align-items:center;gap:4px;transition:all .18s}
.ncc-act:hover{background:rgba(15,54,65,.06);color:#0F3641}
.ncc-act.is-active{color:#a8271c}
.ncc-reply-form{display:none;margin-top:8px;padding:10px;background:#faf7ee;border-radius:10px}
.ncc-reply-form.is-open{display:block}
.ncc-reply-form textarea{width:100%;padding:9px 12px;border:1px solid rgba(15,54,65,.15);border-radius:10px;font-family:inherit;font-size:.85em;min-height:50px;resize:vertical;outline:none;background:#fff;line-height:1.7}
.ncc-reply-form textarea:focus{border-color:#2A6E80}
.ncc-reply-actions{display:flex;gap:6px;justify-content:flex-end;margin-top:6px}
.ncc-reply-actions button{padding:6px 16px;border-radius:8px;border:none;font-family:inherit;font-size:.82em;font-weight:700;cursor:pointer}
.ncc-cancel{background:rgba(15,54,65,.06);color:#5e6260}
.ncc-cancel:hover{background:rgba(15,54,65,.10)}
.ncc-send{background:linear-gradient(135deg,#0F3641,#2A6E80);color:#fff}
.ncc-send:hover:not(:disabled){box-shadow:0 4px 12px rgba(15,54,65,.25)}
.ncc-send:disabled{opacity:.5;cursor:wait}

/* ═══════════════════════════════════════════════════════════
   کاسکید — پاسخ‌ها
   ═══════════════════════════════════════════════════════════ */
.ncc-children{
    display:none;
    position:relative;
    margin-right:14px;
    padding-right:18px;
    border-right:2px solid #e5e2dc;
    margin-top:10px;
    flex-direction:column;
    gap:8px;
}
.ncc-children.is-open{ display:flex; }

/* خط افقی هر پاسخ */
.ncc-children>.ncc-node{position:relative}
.ncc-children>.ncc-node::before{
    content:'';
    position:absolute;
    top:22px;
    right:-20px;
    width:20px;
    height:2px;
    background:#e5e2dc;
    border-radius:2px;
}
/* آخرین فرزند → خط عمودی قطع شود */
.ncc-children>.ncc-node:last-child::after{
    content:'';
    position:absolute;
    top:24px;
    right:-20px;
    width:0;
    bottom:0;
    height:calc(100% + 8px);
    border-right:2px solid #fafbfc;
    background:#fafbfc;
}

/* کوچک‌تر شدن تدریجی */
.ncc-children .ncc-body{padding:10px 12px}
.ncc-children .ncc-avatar{width:34px;height:34px;font-size:.92em}
.ncc-children .ncc-name{font-size:.9em}
.ncc-children .ncc-text{font-size:.88em}

/* ═══════════════════════════════════════════════════════════
   دکمهٔ تگل — یک بار در هر کامنت سطح بالا
   ═══════════════════════════════════════════════════════════ */
.ncc-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    margin:10px auto 0;
    padding:6px 16px;
    width:fit-content;
    min-width:70px;
    background:rgba(42,110,128,.06);
    border:1.5px dashed rgba(15,54,65,.22);
    border-radius:100px;
    color:#0F3641;
    font-family:'Vazirmatn',Tahoma,sans-serif;
    font-size:.82rem;
    font-weight:800;
    cursor:pointer;
    transition:all .22s ease;
    line-height:1;
    user-select:none;
    box-sizing:border-box;
}
.ncc-toggle:hover{
    background:#0F3641;
    color:#fff;
    border-color:#0F3641;
    border-style:solid;
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(15,54,65,.25);
}
.ncc-toggle:active{ transform:translateY(0) scale(.97); }
.ncc-toggle.is-open{
    background:linear-gradient(135deg,#0F3641,#2A6E80);
    color:#fff;
    border-color:transparent;
    border-style:solid;
}
.ncc-toggle svg{
    display:block;
    flex-shrink:0;
    transition:transform .25s ease;
}
.ncc-toggle__count{
    display:inline-block;
    font-family:'Vazirmatn',Tahoma,sans-serif;
    font-size:.95em;
    font-weight:800;
    line-height:1;
    color:inherit;
    opacity:.9;
    direction:ltr;
    unicode-bidi:plaintext;
}
.ncc-toggle--main{
    display:flex;
    width:100%;
    margin-left:0;
    margin-right:0;
    background:rgba(15,54,65,.04);
    border-style:solid;
    border-radius:10px;
    padding:8px 14px;
    min-width:0;
}
.ncc-toggle--main:hover{
    background:#0F3641;
    color:#fff;
}
@media (max-width:640px){
  .ncc-wrap{padding:10px 12px 16px}
  .ncc-form{padding:10px}
  .ncc-form__avatar{width:34px;height:34px}
  .ncc-body{padding:10px 12px}
  .ncc-avatar{width:34px;height:34px}
  .ncc-children{margin-right:8px;padding-right:12px}
  .ncc-children>.ncc-node::before{right:-14px;width:14px}
  .ncc-toggle{padding:6px 12px;font-size:.78rem;min-width:60px}
}