/* DOCiD Documentation Styles - Professional DataCite-inspired Design */
:root {
    /* DataCite-inspired professional color scheme */
    --primary-color: #1565c0;
    --secondary-color: #1565c0;
    --accent-color: #5bc0de;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-muted: #95a5a6;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-sidebar: #f4f4f4;
    --bg-code: #f7f7f7;
    --border-color: #e1e4e8;
    --border-light: #eaecef;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    
    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    --font-size-base: 16px;
    --line-height-base: 1.6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout Structure */
.doc-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.main-content {
    flex: 1;
    margin-left: 300px;
    min-height: 100vh;
}

.content-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* Header */
.doc-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
}

.doc-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: white;
}

.doc-header .subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 300;
}

.doc-header .version {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Sidebar Navigation */
.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--primary-color);
    color: white;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: white !important;
}

.sidebar-header .version-info {
    font-size: 0.875rem;
    opacity: 0.8;
    color: white !important;
}

.sidebar-nav {
    padding: 1rem 0;
}

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

.nav-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    background-color: rgba(21, 101, 192, 0.1);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(21, 101, 192, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-sublist {
    list-style: none;
    margin-left: 1rem;
}

.nav-sublist .nav-link {
    font-size: 0.85rem;
    padding: 0.375rem 1rem;
    color: var(--text-secondary);
}

/* Table of Contents */
.toc {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 0.75rem;
}

.toc-link {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.toc-link:hover {
    color: var(--primary-color);
}

.toc-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 0.75rem;
    min-width: 2rem;
}

.toc-title {
    flex: 1;
}

.toc-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-left: 2.75rem;
}

.toc-sublist {
    list-style: none;
    margin-left: 2.75rem;
    margin-top: 0.5rem;
}

.toc-sublist .toc-link {
    font-size: 0.9rem;
    padding: 0.125rem 0;
}

.toc-sublist .toc-number {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Typography */
section {
    padding: 2rem;
}

h1 {
    font-size: 2.25rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

h3 {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem 0;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.75rem 0 0.5rem 0;
}

p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.lead {
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Contributors Section */
.contributors {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    padding: 2rem;
    margin: 2rem 0;
}

.contributors h2 {
    font-size: 1.375rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: none;
    margin-top: 0;
}

.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.contributor {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    padding: 1rem;
}

.contributor-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.contributor-affiliation {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.contributor-ids {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

.contributor-id {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
}

.contributor-id a {
    color: var(--primary-color);
    text-decoration: none;
}

.contributor-id a:hover {
    text-decoration: underline;
}

/* Code and Examples */
.code-example {
    background: var(--bg-code);
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.code-content {
    padding: 1rem;
    overflow-x: auto;
}

pre {
    margin: 0;
    font-family: var(--font-family-mono);
    font-size: 0.875rem;
    line-height: 1.5;
}

code {
    font-family: var(--font-family-mono);
    font-size: 0.875rem;
    background: rgba(27, 31, 35, 0.05);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

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

/* Property Documentation */
.property {
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    margin: 2rem 0;
    overflow: hidden;
}

.property-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
}

.property-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.property-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.property-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.property-badge.optional {
    background: var(--text-muted);
}

.property-content {
    padding: 1.5rem;
}

.property-description {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.property-subproperties {
    margin-top: 1.5rem;
}

.subproperty {
    border-left: 3px solid var(--border-light);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.subproperty-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(21, 101, 192, 0.03);
}

/* Lists */
ul, ol {
    margin: 1rem 0 1rem 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* Alerts and Notices */
.notice {
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.notice-info {
    background: rgba(91, 192, 222, 0.1);
    border-left-color: var(--accent-color);
    color: var(--text-primary);
}

.notice-warning {
    background: rgba(240, 173, 78, 0.1);
    border-left-color: #f0ad4e;
    color: var(--text-primary);
}

/* Footer */
.doc-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.doc-footer p {
    margin-bottom: 0.5rem;
}

.doc-footer .license {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Navigation Controls */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.nav-prev, .nav-next {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-prev:hover, .nav-next:hover {
    color: var(--secondary-color);
}

.nav-prev::before {
    content: "← ";
    margin-right: 0.5rem;
}

.nav-next::after {
    content: " →";
    margin-left: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .doc-header h1 {
        font-size: 2rem;
    }
    
    .contributors-grid {
        grid-template-columns: 1fr;
    }
    
    .property-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
}

.scroll-top:hover {
    background: var(--secondary-color);
}

/* Print Styles */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    .scroll-top,
    .page-nav {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .doc-header {
        background: none;
        color: var(--text-primary);
    }
}