/* Antigravity Design System */
:root {
    --wpst-glass-bg: rgba(255, 255, 255, 0.7);
    --wpst-glass-border: rgba(255, 255, 255, 0.3);
    --wpst-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --wpst-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* TOC Container */
.wpst-toc-container {
    background: var(--wpst-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--wpst-glass-border);
    border-radius: 5px;
    padding: 15px;
    margin: 0px 0;

    font-size: var(--wpst-font-size);
    color: var(--wpst-text);
    width: var(--wpst-width, 100%);
    max-width: 100%;
    transition: var(--wpst-transition);
}

.wpst-toc-container.wpst-collapsed {
    width: max-content;
    display: inline-block;
}

.wpst-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--wpst-glass-border);
    padding-bottom: 12px;
}

.wpst-collapsed .wpst-toc-header {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.wpst-toc-title {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--wpst-accent);
}

.wpst-toc-toggle {
    background: none;
    border: 1px solid var(--wpst-accent);
    color: var(--wpst-accent);
    padding: 4px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    transition: var(--wpst-transition);
    margin-left: 10px;
}

.wpst-toc-toggle:hover {
    background: var(--wpst-accent);
    color: #fff;
}

.wpst-toc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wpst-toc-item {
    margin: 2px 0;
    line-height: 1.3;
    transition: var(--wpst-transition);
}

.wpst-toc-item a {
    text-decoration: none;
    color: inherit;
    opacity: 0.8;
    transition: var(--wpst-transition);
    display: inline-flex;
    align-items: baseline;
}

.wpst-node-num {
    font-weight: 600;
    margin-right: 8px;
    opacity: 0.7;
    font-size: 0.9em;
    color: var(--wpst-accent);
}

.wpst-toc-item a:hover,
.wpst-toc-item.active a {
    opacity: 1;
    color: var(--wpst-accent);
    transform: translateX(5px);
}

.wpst-collapsed .wpst-toc-list {
    display: none;
}

/* Sticky Trigger */
#wpst-sticky-trigger {
    position: fixed;
    z-index: 9999;
    display: flex;
    align-items: center;
    background: var(--wpst-glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--wpst-glass-border);
    box-shadow: var(--wpst-shadow);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--wpst-transition);
    color: var(--wpst-text);
}

#wpst-sticky-trigger:hover {
    transform: scale(1.05);
    background: var(--wpst-accent);
    color: #fff;
}

.wpst-sticky-label {
    margin-right: 8px;
    font-weight: 600;
}

/* Sticky Positions */
.wpst-sticky-position-bottom-right {
    bottom: 30px;
    right: 30px;
}

.wpst-sticky-position-bottom-left {
    bottom: 30px;
    left: 30px;
}

.wpst-sticky-position-top-right {
    top: 30px;
    right: 30px;
}

.wpst-sticky-position-top-left {
    top: 30px;
    left: 30px;
}

/* Modal Overlay */
#wpst-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--wpst-transition);
}

#wpst-modal-overlay.wpst-modal-visible {
    opacity: 1;
    visibility: visible;
}

.wpst-modal-content {
    background: var(--wpst-bg);
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 5px;
    padding: 0px;
    position: relative;
    box-shadow: var(--wpst-shadow);
}

#wpst-modal-overlay.wpst-modal-visible .wpst-modal-content {
    transform: translateY(0);
}

#wpst-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--wpst-text);
}

/* Mobile "Peek-a-boo" Mode */
@media (max-width: 768px) {
    #wpst-sticky-trigger {
        padding: 8px 12px;
        border-radius: 0 40px 40px 0;
        left: -5px;
        bottom: 50%;
        transform: translateY(50%);
    }

    .wpst-sticky-label {
        display: none;
    }

    #wpst-sticky-trigger:hover {
        left: 0;
    }
}