/* PhyNetPy Documentation - Sphinx-like Styling */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #404040;
    background: #fcfcfc;
}

/* Layout */
.document {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    min-height: 100vh;
}

.documentwrapper {
    flex: 1;
    padding: 20px 30px;
    max-width: 900px;
}

.sphinxsidebar {
    width: 260px;
    background: #f8f8f8;
    border-left: 1px solid #d4d4d4;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Header */
.header {
    background: #2b7489;
    color: white;
    padding: 20px 30px;
    margin-bottom: 0;
    position: relative;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.header p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.back-link {
    position: absolute;
    top: 15px;
    right: 30px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.back-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Navigation */
.sphinxsidebar h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2b7489;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #2b7489;
}

.sphinxsidebar ul {
    list-style: none;
    margin-bottom: 20px;
}

.sphinxsidebar ul li {
    margin: 5px 0;
}

.sphinxsidebar ul li a {
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    padding: 3px 0;
    transition: color 0.15s ease;
}

.sphinxsidebar ul li a:hover {
    color: #2b7489;
}

.sphinxsidebar ul li a.current {
    color: #2b7489;
    font-weight: 600;
}

/* Main Content */
.body {
    padding: 20px 0;
}

.body h1 {
    font-size: 1.75rem;
    color: #2b7489;
    border-bottom: 2px solid #2b7489;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-weight: 500;
}

.body h2 {
    font-size: 1.35rem;
    color: #333;
    margin-top: 35px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.body h3 {
    font-size: 1.1rem;
    color: #444;
    margin-top: 25px;
    margin-bottom: 10px;
}

.body p {
    margin-bottom: 15px;
}

/* Module Info Box */
.module-info {
    background: #f0f7fa;
    border: 1px solid #d0e4ed;
    border-left: 4px solid #2b7489;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.module-info dt {
    font-weight: 600;
    color: #333;
    display: inline;
}

.module-info dd {
    display: inline;
    margin-left: 5px;
    margin-right: 20px;
}

/* Class and Function Definitions */
.class-def, .function-def {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.class-header, .function-header {
    background: #e8e8e8;
    padding: 12px 15px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    border-bottom: 1px solid #d0d0d0;
}

.class-header .keyword, .function-header .keyword {
    color: #008000;
    font-weight: 600;
}

.class-header .name, .function-header .name {
    color: #0000ff;
    font-weight: 600;
}

.class-header .params, .function-header .params {
    color: #606060;
}

.class-body, .function-body {
    padding: 15px 20px;
}

.class-body p, .function-body p {
    margin-bottom: 12px;
}

/* Parameter Tables */
.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.85rem;
}

.param-table th {
    background: #f0f0f0;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #333;
}

.param-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.param-table tr:nth-child(even) {
    background: #fafafa;
}

.param-name {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #0000ff;
    font-weight: 500;
}

.param-type {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #008000;
    font-size: 0.85em;
}

/* Code Blocks */
pre {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px 15px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 15px 0;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
    background: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
    color: #c7254e;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Admonitions */
.note, .warning, .tip {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.note {
    background: #e7f2fa;
    border-left: 4px solid #6ab0de;
}

.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.tip {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.note-title, .warning-title, .tip-title {
    font-weight: 600;
    margin-bottom: 5px;
}

/* Exception Classes */
.exception-def {
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    border-left: 4px solid #dc3545;
}

.exception-def .class-header {
    background: #fce4e4;
    border-bottom: 1px solid #f5c6c6;
}

/* Constants */
.constant-def {
    background: #f8f0ff;
    border: 1px solid #e0d0f0;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
}

.constant-name {
    color: #6f42c1;
    font-weight: 600;
}

/* Module Index Table */
.module-index {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.module-index th {
    background: #2b7489;
    color: white;
    text-align: left;
    padding: 12px 15px;
    font-weight: 500;
}

.module-index td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.module-index tr:hover {
    background: #f5f5f5;
}

.module-index a {
    color: #2b7489;
    text-decoration: none;
    font-weight: 500;
}

.module-index a:hover {
    text-decoration: underline;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #2b7489;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Method List */
.method-list {
    list-style: none;
    margin: 15px 0;
}

.method-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.method-list li:last-child {
    border-bottom: none;
}

.method-list a {
    color: #2b7489;
    text-decoration: none;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
}

.method-list a:hover {
    text-decoration: underline;
}

/* Returns Section */
.returns {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.returns-label {
    font-weight: 600;
    color: #333;
}

/* Raises Section */
.raises {
    margin-top: 15px;
    padding: 10px 15px;
    background: #fff8e5;
    border-radius: 4px;
}

.raises-label {
    font-weight: 600;
    color: #856404;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .document {
        flex-direction: column;
    }
    
    .sphinxsidebar {
        width: 100%;
        height: auto;
        position: relative;
        order: -1;
    }
    
    .documentwrapper {
        max-width: 100%;
    }
}

/* Highlight for Method Names */
.method-name {
    color: #0066cc;
    font-weight: 500;
}

/* Attribute Definitions */
.attr-def {
    background: #fffbf0;
    border: 1px solid #f0e0c0;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
}

.attr-name {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #996600;
    font-weight: 600;
}

/* See Also Section */
.see-also {
    background: #f0f8ff;
    border: 1px solid #d0e8ff;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.see-also h4 {
    margin-bottom: 10px;
    color: #2b7489;
}

.see-also ul {
    margin-left: 20px;
}

/* Quick Navigation */
.toc {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 15px 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.toc h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #333;
}

.toc ul {
    list-style: none;
    margin: 0;
}

.toc ul li {
    margin: 5px 0;
}

.toc ul li a {
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
}

.toc ul li a:hover {
    color: #2b7489;
}

/* Version Badge */
.version-badge {
    display: inline-block;
    background: #2b7489;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 10px;
}

