/* docs/css/float-toc.css */
/* 浮动按钮样式 仅在移动端显示 */
@media (max-width: 960px) {
    #float-toc-button {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        z-index: 99;
        width: 52px;
        height: 52px;
        border-radius: 19%;
        background: var(--md-primary-fg-color);
        color: var(--md-primary-bg-color);
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: var(--md-shadow-z3);
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: large;
    }
    #float-toc-button svg {
        fill: currentColor;
        width: 24px;
        height: 24px;
    }
}

/* 浮动按钮样式（所有设备显示） */
/* #float-toc-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--md-shadow-z3);
    cursor: pointer;
    transition: all 0.3s ease;
} */

/* 深色模式适配 */
[data-md-color-scheme="slate"] #float-toc-button {
    background: var(--md-primary-bg-color);
    color: var(--md-primary-fg-color);
}

/* 目录面板样式 */
#current-toc-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80vh;
    max-height: 500px;
    background: var(--md-default-bg-color);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 目录列表容器 */
.current-toc-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 目录项样式 */
.toc-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.toc-item a {
    color: var(--md-default-fg-color);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}

.toc-item a:hover {
    color: var(--md-primary-fg-color);
}

/* 层级缩进 */
.toc-item.level-2 {
    padding-left: 12px;
    font-size: large;
}
.toc-item.level-3 {
    padding-left: 16px;
}
.toc-item.level-4 {
    padding-left: 32px;
}
.toc-item.level-5 {
    padding-left: 48px;
}
.toc-item.level-6 {
    padding-left: 64px;
}

/* 空目录状态 */
.toc-empty {
    text-align: center;
    padding: 32px;
    color: var(--md-default-fg-color--light);
    font-size: xx-large;
}

/* 关闭按钮 */
.toc-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--md-default-fg-color);
    cursor: pointer;
}

/* 移动端优化 */
@media (max-width: 760px) {
    #current-toc-panel {
        height: auto;
        padding: 12px;
    }
}
