/* Custom CSS for Cocoa documentation */

/* Scale down the logo in sidebar */
.wy-side-nav-search img {
    max-width: 150px;
    height: auto;
}

/* Improve code block readability */
.highlight pre {
    padding: 12px;
    border-radius: 4px;
}

/* Style for note boxes */
.admonition.note {
    border-left-color: #6ab0de;
}

/* Style for warning boxes */
.admonition.warning {
    border-left-color: #f0b37e;
}

/* Prevent horizontal scroll on tables */
.wy-table-responsive {
    overflow-x: visible;
}

/* Improve table styling */
table.docutils {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

table.docutils td, table.docutils th {
    padding: 8px 12px;
    border: 1px solid #e1e4e5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

table.docutils th {
    background-color: #f3f6f6;
}

/* Allow inline code in tables to wrap */
table.docutils code.literal {
    white-space: normal;
    word-break: break-all;
}

/* Math equation styling */
.math {
    font-size: 1.1em;
}

/* Fix equation number positioning - display to the right of the equation */
div.math {
    position: relative;
}

div.math .eqno {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    float: none;
    margin: 0;
}

/* Inline code styling */
code.literal {
    background-color: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Improve sidebar navigation */
.wy-nav-side {
    background-color: #1a4a6e;
}

.wy-side-nav-search {
    background-color: #0d3b5c;
}

/* Logo area styling */
.wy-side-nav-search > a {
    font-size: 1.5em;
    font-weight: bold;
}

/* API documentation styling */
dl.cpp {
    margin-bottom: 20px;
}

dl.cpp dt {
    background-color: #f8f8f8;
    padding: 8px;
    border-left: 3px solid #1a4a6e;
}

/* Version selector flyout (mirrors RTD's badge_only.css for self-hosted builds) */
.rst-versions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 300px;
    color: #fcfcfc;
    background: #0d3b5c;
    font-family: Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif;
    z-index: 400;
}

.rst-versions .rst-current-version {
    padding: 12px;
    display: block;
    cursor: pointer;
    color: #27ae60;
}

.rst-versions .rst-current-version .fa-caret-down {
    float: right;
    margin-top: 4px;
}

.rst-versions .rst-other-versions {
    font-size: 90%;
    padding: 12px;
    color: grey;
    display: none;
}

.rst-versions.shift-up {
    height: auto;
    max-height: 100%;
    overflow-y: scroll;
}

.rst-versions.shift-up .rst-other-versions {
    display: block;
}

.rst-versions .rst-other-versions dd {
    display: inline-block;
    margin: 0;
}

.rst-versions .rst-other-versions dd a {
    display: inline-block;
    padding: 6px 12px 6px 0;
    color: #fcfcfc;
}

.rst-versions .rst-other-versions dd.rtd-current-item a {
    font-weight: bold;
}

.rst-versions .rst-other-versions dt {
    padding: 4px 0;
    font-weight: bold;
    color: #fcfcfc;
}

/* Improve readability of long code blocks */
.highlight-cpp .highlight pre,
.highlight-bash .highlight pre,
.highlight-yaml .highlight pre {
    overflow-x: auto;
    white-space: pre;
}

/* Footer styling */
footer {
    font-size: 0.9em;
    color: #808080;
}
