/* docs.css - Dark Cyberpunk Documentation Styles */

/* Ensure proper page layout with footer at bottom for docs pages */
body.docs-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.docs-layout {
    display: flex;
    flex: 1;
    margin-top: 64px;
}

/* Sidebar Navigation */
.docs-sidebar {
    width: 280px;
    background: rgba(10, 0, 20, 0.95);
    border-right: 2px solid rgba(0, 240, 255, 0.3);
    position: fixed;
    height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 4px 0 20px rgba(0, 240, 255, 0.15);
}

.docs-nav {
    padding: 2rem 1.5rem;
}

.docs-nav h3 {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0, 240, 255, 0.3);
}

.docs-nav .nav-section {
    margin-bottom: 2rem;
}

.docs-nav .nav-section h4 {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 0.25rem;
}

.docs-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-nav li {
    margin-bottom: 0.5rem;
}

.docs-nav .nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    background: rgba(0, 240, 255, 0.05);
}

.docs-nav .nav-item:hover {
    color: var(--color-primary);
    background: rgba(0, 240, 255, 0.15);
    border-left-color: var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    transform: translateX(4px);
}

.docs-nav .nav-item.active {
    color: var(--color-primary);
    background: rgba(0, 240, 255, 0.2);
    border-left-color: var(--color-primary);
    font-weight: 600;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
}

#docs-sidebar-content {
    display: none;
}

/* Mobile Docs Menu Toggle Button */
.docs-mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 80px;
    left: 1rem;
    z-index: 1001;
    background: rgba(0, 240, 255, 0.1);
    border: 2px solid var(--color-primary);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.docs-mobile-menu-toggle .icon-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-primary);
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
}

.docs-mobile-menu-toggle .menu-text {
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
}

.docs-mobile-menu-toggle:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.5);
}

.docs-mobile-menu-toggle.active .icon-bar:nth-child(1) {
    transform: rotate(45deg) translateY(7px);
}

.docs-mobile-menu-toggle.active .icon-bar:nth-child(2) {
    opacity: 0;
}

.docs-mobile-menu-toggle.active .icon-bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-7px);
}

/* Mobile Sidebar Overlay */
.docs-sidebar-overlay {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* Ensure footer appears at bottom - works for both static and dynamic footers */
footer,
#footer-content {
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
}

/* Additional styling for dynamically loaded footer */
#footer-content {
    width: 100%;
}

/* Ensure the footer content gets proper styling when loaded */
#footer-content footer {
    margin-top: auto;
    width: 100%;
}

.docs-main {
    flex: 1;
    margin-left: 280px;
    background: transparent;
}

.docs-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.docs-content h1 {
    color: var(--color-primary);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* Section organization */
.docs-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid rgba(0, 240, 255, 0.2);
}

.docs-section:last-child {
    border-bottom: none;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title-main {
    color: var(--color-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    padding: 1rem 0;
    text-shadow: 0 0 25px rgba(255, 0, 255, 0.5);
    border-bottom: 3px solid rgba(255, 0, 255, 0.3);
}

.docs-content h2 {
    color: var(--color-text);
    font-size: 2rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.docs-content h3 {
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.docs-content p {
    color: var(--color-text);
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.docs-content ul,
.docs-content ol {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.docs-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.docs-content a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}

.docs-content a:hover {
    color: var(--color-cyan);
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
}

.docs-content code {
    background: rgba(0, 240, 255, 0.1);
    color: var(--color-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9375rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.docs-content pre {
    background: rgba(5, 0, 8, 0.8);
    color: var(--color-text);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.15);
}

.docs-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: rgba(10, 0, 20, 0.6);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.15);
}

.docs-content th {
    background: rgba(0, 240, 255, 0.1);
    color: var(--color-primary);
    font-weight: 600;
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 2px solid rgba(0, 240, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.docs-content td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    color: var(--color-text);
}

.docs-content tr:last-child td {
    border-bottom: none;
}

.docs-content tr:hover {
    background: rgba(0, 240, 255, 0.05);
}

.docs-content td strong {
    color: var(--color-text-secondary);
    font-weight: 600;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .docs-sidebar {
        width: 240px;
    }

    .docs-main {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    /* Show mobile toggle button */
    .docs-mobile-menu-toggle {
        display: flex;
    }

    /* Hide sidebar by default on mobile */
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 1000;
    }

    /* Show sidebar when active */
    .docs-sidebar.mobile-active {
        transform: translateX(0);
    }

    /* Show overlay when menu is open */
    .docs-sidebar-overlay.active {
        display: block;
    }

    .docs-main {
        margin-left: 0;
    }

    .docs-content {
        padding: 2rem 1rem;
    }

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

    .section-title-main {
        font-size: 1.75rem;
    }

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

    .docs-content h3 {
        font-size: 1.25rem;
    }

    .docs-content p {
        font-size: 1rem;
    }

    /* Make tables horizontally scrollable on mobile */
    .docs-content table {
        font-size: 0.875rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .docs-content th,
    .docs-content td {
        padding: 0.75rem;
        white-space: nowrap;
    }

    /* Ensure code blocks are scrollable */
    .docs-content pre {
        padding: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .docs-content code {
        font-size: 0.875rem;
        word-break: break-word;
    }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 480px) {
    .docs-layout {
        margin-top: 56px;
    }

    .docs-content {
        padding: 1.5rem 0.75rem;
    }

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

    .section-title-main {
        font-size: 1.5rem;
    }

    .docs-content h2 {
        font-size: 1.25rem;
        margin-top: 2rem;
    }

    .docs-content h3 {
        font-size: 1.125rem;
    }

    .docs-content p,
    .docs-content li {
        font-size: 0.9375rem;
        line-height: 1.7;
    }

    .docs-content th,
    .docs-content td {
        padding: 0.5rem;
        font-size: 0.8125rem;
    }

    .docs-content pre {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }

    .docs-section {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
    }
}

/* Scrollbar Styling */
.docs-content::-webkit-scrollbar,
.docs-sidebar::-webkit-scrollbar {
    width: 8px;
}

.docs-content::-webkit-scrollbar-track,
.docs-sidebar::-webkit-scrollbar-track {
    background: rgba(10, 0, 20, 0.5);
}

.docs-content::-webkit-scrollbar-thumb,
.docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 4px;
}

.docs-content::-webkit-scrollbar-thumb:hover,
.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.5);
}
