/* static/css/docs.css */

/* Layout */
.docs-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
}

.docs-sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-content {
    padding: 2rem;
}

.sidebar-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

.docs-main {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 1000px;
}

/* Navigation */
.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin: 1.5rem 0 0.75rem;
}

.nav-group {
    margin-bottom: 1rem;
}

.nav-group h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 1rem 0 0.5rem;
}

.nav-item, .nav-subitem {
    display: block;
    padding: 0.375rem 0;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-subitem {
    padding-left: 1rem;
    font-size: 0.8125rem;
}

.nav-item:hover, .nav-subitem:hover {
    color: #4a9d6f;
}

/* Sections */
.doc-section {
    margin-bottom: 3rem;
    scroll-margin-top: 2rem;
}

.doc-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #111827;
}

.doc-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.doc-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: #374151;
}

.doc-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem;
    color: #4b5563;
}

.lead {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Info Box */
.info-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 2rem;
}

.info-item {
    font-size: 0.875rem;
    color: #4b5563;
}

.info-item strong {
    color: #111827;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.feature-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.feature-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Models Grid */
.models-grid {
    margin: 1.5rem 0;
}

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

.provider-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151;
}

.model-list {
    display: grid;
    gap: 0.5rem;
}

.model-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.model-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.model-openai {
    background: #dbeafe;
    color: #1e40af;
}

.model-anthropic {
    background: #fef3c7;
    color: #92400e;
}

.model-deepseek {
    background: #e9d5ff;
    color: #6b21a8;
}

.model-info {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Code Tabs */
.code-tabs {
    margin: 1.5rem 0;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: -1px;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    color: #4a9d6f;
    border-bottom-color: #4a9d6f;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Code Blocks */
pre {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.875rem;
}

/* Inline code */
p code, li code, td code {
    background: #f1f5f9;
    color: #475569;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
}

/* Endpoints */
.endpoint {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.method {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.method-get {
    background: #dbeafe;
    color: #1e40af;
}

.method-post {
    background: #d1fae5;
    color: #065f46;
}

.method-patch {
    background: #fef3c7;
    color: #92400e;
}

.method-delete {
    background: #fee2e2;
    color: #991b1b;
}

.endpoint-path {
    font-family: 'Courier New', monospace;
    font-size: 0.9375rem;
    color: #4b5563;
}

/* Tables */
.params-table, .error-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.params-table th, .error-table th {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
}

.params-table td, .error-table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    color: #4b5563;
}

.error-table tr.success {
    background: #f0fdf4;
}

.error-table tr.warning {
    background: #fef3c7;
}

.error-table tr.error {
    background: #fef2f2;
}

/* Response Blocks */
.response-block {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

.status-code {
    display: inline-block;
    background: #4b5563;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.response-desc {
    font-size: 0.875rem;
    color: #6b7280;
}

.response-example {
    margin: 1rem 0 1.5rem 0;
}

.response-example h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.response-example p {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* Boxes */
.warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #92400e;
}

.support-box {
    background: linear-gradient(135deg, #4a9d6f 0%, #357a54 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: white;
}

.support-box h2 {
    color: white;
    border: none;
    margin-bottom: 0.5rem;
}

.support-box p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: white;
    color: #4a9d6f;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.docs-sidebar::-webkit-scrollbar-track {
    background: #f9fafb;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .docs-wrapper {
        flex-direction: column;
    }
    
    .docs-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .docs-main {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}