/* ========================================================
   RankMath 100 AI Optimizer - Universal Frontend Table of Contents
   Clean, Modern, Accessible & Responsive Styles
   ======================================================== */

.rm100-toc-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #4f46e5;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 28px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    font-family: inherit;
    box-sizing: border-box;
    max-width: 100%;
    clear: both;
}

.rm100-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 14px;
}

.rm100-toc-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    line-height: 1.3;
}

.rm100-toc-title svg,
.rm100-toc-icon {
    color: #4f46e5;
    flex-shrink: 0;
    vertical-align: middle;
}

.rm100-toc-toggle {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.rm100-toc-toggle:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.rm100-toc-list-wrap nav ul.rm100-toc-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rm100-toc-list-wrap nav ul.rm100-toc-list li {
    margin: 8px 0 !important;
    padding: 0 !important;
    line-height: 1.5;
    position: relative;
}

.rm100-toc-list-wrap nav ul.rm100-toc-list li.rm100-toc-level-2 {
    font-weight: 600;
}

.rm100-toc-list-wrap nav ul.rm100-toc-list li.rm100-toc-level-3 {
    margin-left: 22px !important;
    font-size: 0.95em;
    font-weight: 400;
}

.rm100-toc-list-wrap nav ul.rm100-toc-list li a {
    color: #334155;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-block;
}

.rm100-toc-list-wrap nav ul.rm100-toc-list li a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

html {
    scroll-behavior: smooth;
}

/* Offset for fixed / sticky navigation bars on all themes */
[id^="toc-"] {
    scroll-margin-top: 90px;
}

@media (max-width: 640px) {
    .rm100-toc-container {
        padding: 14px 16px;
        margin: 20px 0;
    }
    .rm100-toc-title {
        font-size: 1.05rem;
    }
    .rm100-toc-list-wrap nav ul.rm100-toc-list li.rm100-toc-level-3 {
        margin-left: 14px !important;
    }
}
