/* UCLCHEM Custom Styling - Leiden University Blue */

:root {
    /* Leiden University Blue as primary color */
    --pst-color-primary: #0c2577;
    --pst-color-primary-highlight: #1a3a9f;
    --pst-color-secondary: #4a7ba7;
    --pst-color-link: #0c2577;
    --pst-color-link-hover: #1a3a9f;
    
    /* Clean, less busy appearance */
    --pst-sidebar-width: 220px;
    --pst-font-size-base: 16px;
}

/* Version switcher improvements */
.version-switcher__button {
    padding: 0.2rem 0.4rem !important;
    margin: 0 !important;
    font-size: 0.85rem !important;
    border: 1px solid var(--pst-color-border) !important;
    border-radius: 4px !important;
}

.version-switcher__menu {
    min-width: 130px !important;
}

/* Navbar spacing and responsiveness adjustments */
.bd-navbar .navbar-nav {
    align-items: center;
    gap: 0.25rem;
    justify-content: flex-start !important;
    margin-left: 0 !important;
}

.bd-navbar .navbar-nav.bd-navbar-elements {
    justify-content: flex-start !important;
    margin-left: auto !important;
}

/* Reduce font and spacing in navbar items to prevent wrapping */
.bd-navbar .nav-link {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.9rem !important;
}

.bd-navbar .dropdown-toggle::after {
    margin-left: 0.2rem !important;
}

/* Compact version switcher button */
.version-switcher__button {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.85rem !important;
}

/* Dark mode adjustments for Leiden Blue */
html[data-theme="dark"] {
    --pst-color-primary: #5a8fd3;
    --pst-color-primary-highlight: #7aa8e0;
    --pst-color-link: #5a8fd3;
    --pst-color-link-hover: #7aa8e0;
}

/* Cleaner navigation - less busy */
.bd-sidebar-primary {
    border-right: 1px solid var(--pst-color-border);
}

.bd-sidebar-secondary {
    border-left: 1px solid var(--pst-color-border);
}

.bd-sidebar-secondary .nav-link {
    text-align: left;
}

/* Reduce clutter in navigation items */
.bd-sidebar .nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.95rem;
}

/* Cleaner code blocks */
.highlight {
    border-radius: 6px;
    border: 1px solid var(--pst-color-border);
}

div.highlight pre {
    padding: 1rem;
}

/* Better spacing for content */
.bd-main .bd-content .bd-article-container {
    max-width: 900px;
}

/* ============================================
   API Documentation Enhancements
   ============================================ */

/* Make API summary tables more readable */
.autoapisummary {
    margin: 1.5rem 0;
}

.autoapisummary td {
    padding: 0.6rem 1rem !important;
    vertical-align: top;
}

.autoapisummary code {
    font-size: 0.95em;
    background-color: var(--pst-color-surface);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

/* Improve API section headers */
.api-module-section {
    margin-top: 2.5rem;
    border-top: 2px solid var(--pst-color-border);
    padding-top: 1.5rem;
}

/* Style for API function/class signatures */
.sig {
    background-color: var(--pst-color-surface) !important;
    border: 1px solid var(--pst-color-border) !important;
    border-radius: 6px;
    padding: 0.8rem 1rem !important;
    font-size: 0.92em;
    overflow-x: auto;
}

.sig-param {
    font-style: italic;
}

/* Parameter lists in docstrings */
dl.field-list {
    margin: 1rem 0;
}

dl.field-list dt {
    font-weight: 600;
    color: var(--pst-color-primary);
    margin-top: 0.5rem;
}

dl.field-list dd {
    margin-left: 2rem;
    margin-bottom: 0.5rem;
}

/* Code examples in API docs */
.highlight-python {
    margin: 1rem 0;
}

/* API navigation improvements */
.api-nav-card {
    border: 1px solid var(--pst-color-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.api-nav-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Module contents section */
.section .section {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--pst-color-border);
}

/* Deprecation warnings in API */
.deprecated {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 0.75rem;
    margin: 1rem 0;
    border-radius: 4px;
}

html[data-theme="dark"] .deprecated {
    background-color: #3d3317;
    border-left-color: #f5a623;
}

/* Warning boxes in API docs */
.warning, .admonition.warning {
    background-color: #fff3cd;
    border-left: 4px solid #ff9800;
}

html[data-theme="dark"] .warning,
html[data-theme="dark"] .admonition.warning {
    background-color: #3d2e17;
}

/* Note boxes in API docs */
.note, .admonition.note {
    background-color: #e7f3ff;
    border-left: 4px solid #2196f3;
}

html[data-theme="dark"] .note,
html[data-theme="dark"] .admonition.note {
    background-color: #1a2a3d;
}

/* Example boxes in API docs */
.admonition.example {
    background-color: #f0f9ff;
    border-left: 4px solid #0c2577;
}

html[data-theme="dark"] .admonition.example {
    background-color: #1a2538;
}

/* Source code links */
.viewcode-link {
    font-size: 0.85em;
    float: right;
    color: var(--pst-color-secondary) !important;
}

.viewcode-link:hover {
    color: var(--pst-color-primary) !important;
}

/* API grid cards improvements */
.sd-card {
    border: 1px solid var(--pst-color-border);
    transition: all 0.2s ease;
}

.sd-card:hover {
    box-shadow: 0 4px 12px rgba(12, 37, 119, 0.15);
    transform: translateY(-2px);
}

/* Better spacing for parameter descriptions */
.field-body {
    padding-left: 0.5rem;
}

.field-body p {
    margin: 0.25rem 0;
}

/* Type annotations styling */
.sig-prename, .sig-name {
    color: var(--pst-color-primary);
    font-weight: 600;
}

/* Return type annotations */
.sig-return-typehint {
    color: var(--pst-color-secondary);
}

/* Class inheritance info */
.py-attribute dd p {
    margin: 0.5rem 0;
}
    max-width: 900px;
}

/* Cleaner headers */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

h1 {
    border-bottom: 2px solid var(--pst-color-primary);
    padding-bottom: 0.5rem;
}

/* Less prominent admonitions */
.admonition {
    border-left: 3px solid var(--pst-color-primary);
    border-radius: 4px;
}

/* Cleaner notebook cells */
.cell {
    margin-bottom: 1.5rem;
}

.cell_input {
    border-left: 3px solid var(--pst-color-primary);
    padding-left: 0.5rem;
}

/* Better table styling */
table.docutils {
    border: 1px solid var(--pst-color-border);
    border-collapse: collapse;
}

table.docutils th {
    background-color: var(--pst-color-primary);
    color: white;
    padding: 0.6rem;
}

table.docutils td {
    padding: 0.5rem;
    border: 1px solid var(--pst-color-border);
}

/* Cleaner search box */
.bd-search {
    padding: 0.5rem;
}

/* Logo sizing */
.navbar-brand img {
    max-height: 48px;
}

/* Card styling for grid layouts */
.sd-card {
    border: 1px solid var(--pst-color-border);
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
}

.sd-card:hover {
    box-shadow: 0 4px 12px rgba(12, 37, 119, 0.15);
}

.sd-card-header {
    background-color: rgba(12, 37, 119, 0.05);
    border-bottom: 1px solid var(--pst-color-border);
}

/* Cleaner footer */
.bd-footer {
    border-top: 1px solid var(--pst-color-border);
    margin-top: 3rem;
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* Badge styling */
.badge {
    padding: 0.3em 0.6em;
    border-radius: 4px;
}

/* Less busy TOC */
.bd-toc .nav {
    font-size: 0.9rem;
}

.bd-toc .nav-link {
    padding: 0.3rem 0.5rem;
}

/* Improve readability */
.bd-article {
    line-height: 1.7;
}

p {
    margin-bottom: 1rem;
}

/* Cleaner version switcher if added later */
.version-switcher__button {
    border: 1px solid var(--pst-color-border);
    border-radius: 4px;
}

/* Reduce visual noise in API docs */
.py.class, .py.function, .py.method {
    margin-bottom: 2rem;
}

dt.sig {
    background-color: rgba(12, 37, 119, 0.03);
    border-left: 3px solid var(--pst-color-primary);
    padding: 0.5rem;
}

/* Clean homepage hero section */
.hero-section {
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero-title {
    color: var(--pst-color-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--pst-color-text-muted);
    margin-bottom: 2rem;
}
