/* Extra CSS für Server Administration */

/* =================================================
   KOMPLETT ZENTRIERTES LAYOUT - NEBENEINANDER
   ================================================= */
body {
    background-color: #f5f5f5;
}

/* Gesamten Inhalt zentrieren */
.wy-body-for-nav {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 2rem;
}

/* Grid als Flexbox für nebeneinander */
.wy-grid-for-nav {
    max-width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
}

/* Navigation nebendem Inhalt */
.wy-nav-side {
    float: none;
    position: relative;
    width: 300px;
    flex-shrink: 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    height: fit-content;
}

/* Inhaltsbereich zentrieren */
.wy-nav-content-wrap {
    margin-left: 0 !important;
    background: transparent;
    flex: 1;
    max-width: 900px;
}

/* Inhalt selbst zentrieren */
.rst-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Code-Block Styling */
.codehilite {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1em;
    margin: 1em 0;
    overflow-x: auto;
}

.codehilite pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Mobile Anpassung */
@media only screen and (max-width: 768px) {
    .wy-grid-for-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .wy-nav-side {
        width: 100%;
        max-width: 300px;
        margin-bottom: 1rem;
    }
    
    .wy-nav-content-wrap {
        max-width: 100%;
    }
    
    .wy-body-for-nav {
        padding: 1rem;
    }
}

/* Code-Block Styling */
.codehilite {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1em;
    margin: 1em 0;
    overflow-x: auto;
}

.codehilite pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Tabellen Styling */
.md-typeset table:not([class]) {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.md-typeset table:not([class]) th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.md-typeset table:not([class]) tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Admonition Boxes */
.md-typeset .admonition {
    border-left: 4px solid #2196F3;
    background-color: #f5f5f5;
    padding: 1em;
    margin: 1em 0;
}

.md-typeset .admonition.warning {
    border-left-color: #FF9800;
    background-color: #FFF3E0;
}

.md-typeset .admonition.error {
    border-left-color: #F44336;
    background-color: #FFEBEE;
}

.md-typeset .admonition.success {
    border-left-color: #4CAF50;
    background-color: #E8F5E8;
}

/* Navigation Breadcrumbs */
.md-nav--secondary {
    border-left: 2px solid #2196F3;
    margin-left: 1em;
}

/* Code Inline */
.md-typeset code {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-size: 0.9em;
}

/* Blockquotes */
.md-typeset blockquote {
    border-left: 4px solid #2196F3;
    background-color: #f8f9fa;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    color: #495057;
}

.md-typeset blockquote p {
    margin: 0;
}

/* Header Links */
.md-typeset h1[id]::before,
.md-typeset h2[id]::before,
.md-typeset h3[id]::before,
.md-typeset h4[id]::before,
.md-typeset h5[id]::before,
.md-typeset h6[id]::before {
    content: '';
    display: block;
    height: 2em;
    margin-top: -2em;
    visibility: hidden;
}

/* Footer */
.md-footer {
    background-color: #2196F3;
    color: white;
}

.md-footer__inner {
    padding: 1em 0;
}

/* Mobile Optimization */
@media only screen and (max-width: 76.1875em) {
    .md-typeset table:not([class]) {
        display: block;
        overflow-x: auto;
    }
    
    .codehilite {
        font-size: 0.8em;
    }
    
    /* ReadTheDocs Mobile zentriertes Layout */
    .wy-nav-content {
        padding: 0 1rem;
    }
    
    div[role="main"] {
        padding: 1rem;
        margin: 0;
    }
    
    .wy-nav-side {
        margin: 0 auto 1rem auto;
        padding: 0.5rem;
    }
    
    .wy-body-for-nav {
        margin: 0;
        max-width: 100%;
    }
}

/* =================================================
   READTHEDOCS GROSSE BILDSCHIRME
   ================================================= */
@media only screen and (min-width: 1200px) {
    .wy-nav-content {
        max-width: 1000px;
        padding: 0 2rem;
    }
    
    div[role="main"] {
        max-width: 1400px;
        padding: 3rem;
    }
}

/* Print Optimization */
@media print {
    .md-sidebar,
    .md-header,
    .md-footer {
        display: none;
    }
    
    .md-content {
        margin: 0;
        padding: 0;
    }
    
    .codehilite {
        page-break-inside: avoid;
    }
}
