/* ===================================
   Web3S AIO – High-End Table of Contents
   =================================== */

.w3aio-toc {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 0;
    margin: 30px 0;
    box-shadow: 0 4px 25px rgba(0,0,0,0.03);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    border-left: 4px solid #ff5722;
}

.w3aio-toc:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.w3aio-toc-title {
    background: #fff;
    padding: 18px 24px;
    font-weight: 800;
    font-size: 1.15rem;
    color: #1a1a2e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.w3aio-toc-toggle {
    font-size: 0.9rem;
    color: #ff5722;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff3f0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.w3aio-toc-list {
    margin: 0;
    padding: 0 0 20px 0;
    list-style: none;
    max-height: 2000px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.w3aio-toc-list.collapsed {
    max-height: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.w3aio-toc-list li {
    padding: 6px 24px;
    position: relative;
    line-height: 1.4;
}

.w3aio-toc-list li a {
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
    display: inline-block;
    position: relative;
}

.w3aio-toc-list li a:hover {
    color: #ff5722;
    padding-left: 8px;
}

.w3aio-toc-list li a.toc-active {
    color: #ff5722;
    font-weight: 700;
}

.w3aio-toc-list li a.toc-active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff5722;
    border-radius: 2px;
}

/* Scroll Offset for headings */
#w3aio-toc-content h1,
#w3aio-toc-content h2,
#w3aio-toc-content h3,
#w3aio-toc-content h4,
#w3aio-toc-content h5,
#w3aio-toc-content h6 {
    scroll-margin-top: 110px;
}

/* Dark Mode */
[data-theme="dark"] .w3aio-toc {
    background: #1e1e2e;
    border-color: #2e2e3e;
    border-left-color: #ff5722;
}
[data-theme="dark"] .w3aio-toc-title {
    background: #1e1e2e;
    color: #f1f5f9;
}
[data-theme="dark"] .w3aio-toc-list li a {
    color: #94a3b8;
}
[data-theme="dark"] .w3aio-toc-toggle {
    background: rgba(255,87,34,0.15);
}
