/* VisioForge API Documentation - Custom Styles */

/* SEO and accessibility improvements */
:root {
    --visioforge-primary: #0066cc;
    --visioforge-secondary: #004499;
    --visioforge-accent: #00aaff;
}

/* Improve link accessibility for SEO */
a:focus {
    outline: 2px solid var(--visioforge-accent);
    outline-offset: 2px;
}

/* Better heading structure for SEO */
article h1 {
    font-size: 2rem;
    margin-top: 0;
    line-height: 1.2;
}

article h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

article h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

/* Improve code block visibility */
pre {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

code {
    font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
}

/* Breadcrumb styling for SEO */
.breadcrumb {
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 0.5rem;
}

/* API member styling */
.api-member {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

/* Namespace grouping */
.namespace-list {
    columns: 2;
    column-gap: 2rem;
}

@media (max-width: 768px) {
    .namespace-list {
        columns: 1;
    }
}

/* Search highlighting */
mark, .search-highlight {
    background-color: #fff3cd;
    padding: 0.1em 0.2em;
    border-radius: 2px;
}

/* Table of contents improvements */
.toc {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

/* Print styles for documentation */
@media print {
    .navbar, .sidebar, .affix, .breadcrumb {
        display: none !important;
    }
    
    article {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    a[href^="#"]::after,
    a[href^="javascript"]::after {
        content: "";
    }
}

/* Dark mode enhancements */
[data-bs-theme="dark"] {
    --visioforge-primary: #66b3ff;
    --visioforge-secondary: #3399ff;
    --visioforge-accent: #00ccff;
}

[data-bs-theme="dark"] pre {
    border-color: #444;
}

[data-bs-theme="dark"] article h2 {
    border-bottom-color: #444;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 9999;
    padding: 1rem;
    background: var(--visioforge-primary);
    color: white;
}

.skip-to-content:focus {
    left: 0;
}

/* Loading state for search */
.search-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Alert styling */
.alert {
    border-radius: 6px;
    margin: 1rem 0;
}

/* Version badge */
.version-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: #e7f3ff;
    color: var(--visioforge-primary);
    border-radius: 4px;
    margin-left: 0.5rem;
}
