/* Disable scrolling on the main page body */
body,
html {
    overflow: auto;
    height: 100%;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar,
html::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Hide scrollbar for Firefox */
body,
html {
    scrollbar-width: none;
}

/* Hide scrollbar for IE/Edge */
body,
html {
    -ms-overflow-style: none;
}

.docs-wrapper {
    display: flex;
    min-height: 100vh;
    margin-top: 80px;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.docs-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    padding: 2rem 0;
    z-index: 100;
    margin-top: 0;
    left: 0;
    right: auto;
    transform: translateX(0);
    will-change: transform;
    /* Sidebar scrolling */
    overflow-y: auto;
    height: 100%;
}

/* Custom scrollbar for sidebar */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

.docs-content {
    flex: 1;
    padding: 3rem;
    /* max-width: 900px; */
    /* Content scrolling */
    overflow-y: auto;
    height: 100%;
}

/* Custom scrollbar for content */
.docs-content::-webkit-scrollbar {
    width: 8px;
}

.docs-content::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.docs-content::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.docs-content::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Sidebar header styles */
.docs-sidebar-header {
    padding: 0 1.5rem 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.docs-sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.docs-sidebar-header p {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

/* Category styles */
.docs-category {
    margin-bottom: 1.5rem;
}

.docs-category-title {
    padding: 0 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

/* Navigation items */
.docs-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.docs-nav-item i {
    width: 1.25rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    transition: color 0.2s ease;
}

.docs-nav-item:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.docs-nav-item:hover i {
    color: var(--primary-color);
}

.docs-nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.docs-nav-item.active i {
    color: var(--primary-color);
}

.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.docs-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.docs-content p {
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.docs-content ul,
.docs-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.docs-content li {
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.docs-content code {
    background: var(--gray-100);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.docs-content pre {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.docs-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.docs-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--gray-50);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.docs-content blockquote p {
    margin-bottom: 0;
    color: var(--gray-700);
}

.docs-content img {
    max-width: 100%;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.docs-content hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 2rem 0;
}

.docs-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.docs-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.docs-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.docs-nav-link:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.docs-nav-link.prev {
    flex-direction: row;
}

.docs-nav-link.next {
    flex-direction: row-reverse;
    margin-left: auto;
}

.mobile-docs-toggle {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    /* Increase touch target size visually */
    transition: all 0.2s ease;
}

.mobile-docs-toggle:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-md);
}

.mobile-docs-toggle:hover,
.mobile-docs-toggle:focus {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 1024px) {
    .docs-wrapper {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        min-width: 100%;
        height: calc(100vh - 80px);
        position: fixed;
        top: 80px;
        left: 0;
        z-index: 998;
        background: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-xl);
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .docs-content {
        padding: 1.5rem;
        margin-top: 0;
        height: calc(100vh - 80px);
    }

    .docs-content h1 {
        font-size: 1.75rem;
    }

    .docs-content h2 {
        font-size: 1.375rem;
    }

    .mobile-docs-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-docs-toggle i {
        pointer-events: none;
    }
}

/* Reset all possible underline sources */
.docs-navigation a,
.docs-navigation a *,
.docs-navigation a *::before,
.docs-navigation a *::after {
    text-decoration: none !important;
    border-bottom: none !important;
    text-underline-offset: none !important;
    text-decoration-thickness: 0 !important;
}