/* Custom CSS for clean, modern documentation */

/* Root variables for consistent theming */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #0f172a;
    --background-color: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --code-background: #f1f5f9;
    --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius: 6px;
}

/* Main content area */
.wy-nav-content {
    background: var(--background-color);
    line-height: 1.6;
    max-width: 1200px !important;
    /* Increased from default 800px for wider content */
}

.wy-nav-content-wrap {
    background: var(--background-color);
}

/* Typography improvements */
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.rst-content h1 {
    font-size: 2.25rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.rst-content h2 {
    font-size: 1.875rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

.rst-content h3 {
    font-size: 1.5rem;
}

.rst-content h4 {
    font-size: 1.25rem;
}

.rst-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Code blocks - Clean and readable */
.highlight {
    background: var(--code-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.highlight pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Inline code */
.rst-content code.literal {
    background: var(--code-background);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 6px;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Method/function signatures */
.sig-prename {
    color: var(--text-muted);
    font-weight: 400;
}

.sig-name {
    color: var(--accent-color);
    font-weight: 600;
}

.sig-paren {
    color: var(--text-muted);
}

/* Parameters styling */
.field-list dt {
    background-color: var(--code-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--accent-color);
}

.field-list dd {
    margin-left: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Clean admonitions */
.admonition {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin: 1.5rem 0;
    background: var(--background-color);
    box-shadow: var(--shadow-subtle);
}

.admonition-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.admonition.note {
    border-left: 4px solid #3b82f6;
    background-color: #eff6ff;
}

.admonition.warning {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}

.admonition.error {
    border-left: 4px solid #ef4444;
    background-color: #fef2f2;
}

/* Blockquotes */
.rst-content blockquote {
    border-left: 4px solid var(--border-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
    background: var(--code-background);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
}

/* Tables - Clean and modern */
.rst-content table.docutils {
    border-collapse: collapse;
    margin: 1.5rem 0;
    width: 100%;
    background: var(--background-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.rst-content table.docutils td,
.rst-content table.docutils th {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.rst-content table.docutils th {
    background-color: var(--code-background);
    font-weight: 600;
    color: var(--accent-color);
}

.rst-content table.docutils tr:nth-child(even) {
    background-color: var(--code-background);
}

/* Links - Consistent and clean */
.rst-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.rst-content a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Search results */
.search li {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-subtle);
    transition: box-shadow 0.2s ease;
}

.search li:hover {
    box-shadow: var(--shadow-card);
}

/* Documentation sections - Clean visual hierarchy */
.rst-content .class {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    background: var(--code-background);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem;
}

.rst-content .function {
    border-left: 3px solid #10b981;
    padding-left: 1rem;
    margin: 1.5rem 0;
    background: var(--code-background);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem;
}

.rst-content .method {
    border-left: 3px solid #8b5cf6;
    padding-left: 1rem;
    margin: 1rem 0;
    background: var(--code-background);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.75rem;
}

.rst-content .attribute {
    border-left: 3px solid #f59e0b;
    padding-left: 1rem;
    margin: 1rem 0;
    background: var(--code-background);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.75rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .wy-nav-content {
        padding: 1rem;
    }

    .rst-content h1 {
        font-size: 1.875rem;
    }

    .rst-content h2 {
        font-size: 1.5rem;
    }
}

/* Enhanced focus states for accessibility */
.rst-content a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: auto;
}