/* ============================================
   AZEL Smart Schema Pro - جدول المحتويات (النسخة الجديدة/المبسّطة) - by الجيوشي
   كلاسات مستقلة تمامًا (azel-toc-modern-*) عشان محدش يتعارض مع
   كلاسات النظام الكلاسيكي (toc-schema-*) ولا مع أي ".toc" جاي من القالب نفسه.
   ============================================ */

.azel-toc-modern {
    margin: 30px 0 40px;
    max-width: 100%;
}

.azel-toc-modern[dir="rtl"] {
    text-align: right;
}

.azel-toc-modern[dir="ltr"] {
    text-align: left;
}

.azel-toc-modern-title {
    margin: 0 0 15px;
    font-size: 21px;
    line-height: 1.5;
    font-weight: 700;
    color: #222222;
}

/* صندوق الروابط — بيبقى فيه سكرول داخلي لو العناوين كترت، بدل ما ياخد مساحة زيادة */
.azel-toc-modern-box {
    max-height: 285px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 15px 0 5px;
    scrollbar-width: thin;
    scrollbar-color: #c9c9c9 transparent;
}

.azel-toc-modern[dir="rtl"] .azel-toc-modern-box {
    border-right: 1px solid #e5e5e5;
    border-left: none;
}

.azel-toc-modern[dir="ltr"] .azel-toc-modern-box {
    border-left: 1px solid #e5e5e5;
    border-right: none;
    padding: 0 5px 0 15px;
}

.azel-toc-modern-box::-webkit-scrollbar {
    width: 5px;
}

.azel-toc-modern-box::-webkit-scrollbar-track {
    background: transparent;
}

.azel-toc-modern-box::-webkit-scrollbar-thumb {
    background: #c9c9c9;
    border-radius: 10px;
}

/* ---- الروابط ---- */
.azel-toc-modern-box a {
    display: block;
    padding: 7px 0;
    color: #999999;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.65;
    transition: color .15s ease;
}

/* لون التحويم + الحالة النشطة أثناء التمرير بييجوا من --toc-accent
   (متحكَّم فيه من الإعدادات — لون واحد بس بدل 4 ألوان زي القديم) */
.azel-toc-modern-box a:hover,
.azel-toc-modern-box a.azel-toc-active {
    color: var(--toc-accent, #444444);
}

.azel-toc-modern-box a.azel-toc-active {
    font-weight: 600;
}

/* H3 داخل الجدول */
.azel-toc-modern-box a.sub {
    padding-right: 20px;
    padding-left: 0;
    font-size: 15px;
}

[dir="ltr"] .azel-toc-modern-box a.sub {
    padding-left: 20px;
    padding-right: 0;
}

/* ---- تمييز العنوان عند النقر ---- */
.azel-toc-modern-highlight {
    animation: azel-toc-modern-flash .6s ease-in-out 2;
}

@keyframes azel-toc-modern-flash {
    0%, 100% { background: transparent; }
    50%       { background: #fff3cd; }
}

.azel-toc-modern-heading-anchor {
    scroll-margin-top: 80px;
}

html {
    scroll-behavior: smooth;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .azel-toc-modern-title {
        font-size: 18px;
    }

    .azel-toc-modern-box {
        max-height: 240px;
    }

    .azel-toc-modern-box a {
        font-size: 15px;
    }

    .azel-toc-modern-box a.sub {
        font-size: 14px;
    }
}
