/* Read the Docs Theme - Kredete Documentation */

/* CSS Variables */
:root {
    --rtd-primary: #2980B9;
    --rtd-primary-dark: #1a5276;
    --rtd-sidebar-bg: #343131;
    --rtd-sidebar-link: #d9d9d9;
    --rtd-sidebar-link-hover: #fff;
    --rtd-content-bg: #fcfcfc;
    --rtd-footer-bg: #1f1d1d;
    --rtd-code-bg: #f8f8f8;
    --rtd-border: #e1e4e5;
    --rtd-text: #404040;
    --rtd-heading: #2980B9;
    --rtd-link: #2980B9;
    --rtd-success: #27ae60;
    --rtd-warning: #e67e22;
    --rtd-danger: #e74c3c;
    --rtd-info: #3498db;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', 'proxima-nova', 'Helvetica Neue', Arial, sans-serif;
    color: var(--rtd-text);
    background: var(--rtd-content-bg);
    line-height: 1.6;
}

/* Layout */
.wy-grid-for-nav {
    position: absolute;
    width: 100%;
    height: 100%;
}

.wy-nav-side {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 300px;
    background: var(--rtd-sidebar-bg);
    overflow-y: auto;
    z-index: 200;
}

.wy-side-scroll {
    width: 320px;
    position: relative;
    overflow-x: hidden;
    overflow-y: scroll;
    height: 100%;
}

.wy-side-nav-search {
    display: block;
    padding: 18px;
    background: var(--rtd-primary);
    color: #fff;
    text-align: center;
}

.wy-side-nav-search .wy-dropdown > a,
.wy-side-nav-search > a {
    color: #fff;
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.wy-side-nav-search input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
}

.wy-menu-vertical {
    padding: 18px 0;
}

.wy-menu-vertical a {
    color: var(--rtd-sidebar-link);
    text-decoration: none;
    display: block;
    padding: 8px 24px;
    font-size: 0.9em;
    transition: all 0.2s;
}

.wy-menu-vertical a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--rtd-sidebar-link-hover);
}

.wy-menu-vertical a.current {
    background: var(--rtd-primary);
    color: #fff;
    font-weight: 700;
}

.wy-menu-vertical .caption {
    color: #55a5d9;
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
    padding: 16px 24px 8px;
    letter-spacing: 0.5px;
}

.wy-menu-vertical ul {
    list-style: none;
}

.wy-menu-vertical ul ul a {
    padding-left: 40px;
    font-size: 0.85em;
}

/* Main Content */
.wy-nav-content-wrap {
    margin-left: 300px;
    background: var(--rtd-content-bg);
    min-height: 100vh;
}

.wy-nav-content {
    padding: 24px 48px;
    max-width: 900px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin: 1.5em 0 0.5em;
    color: var(--rtd-heading);
}

h1 {
    font-size: 2em;
    border-bottom: 1px solid var(--rtd-border);
    padding-bottom: 0.3em;
}

h2 {
    font-size: 1.6em;
    border-bottom: 1px solid var(--rtd-border);
    padding-bottom: 0.3em;
}

h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }
h5, h6 { font-size: 1em; }

p {
    margin: 1em 0;
}

a {
    color: var(--rtd-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Code */
code, pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
}

code {
    background: var(--rtd-code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--rtd-border);
}

pre {
    background: #272822;
    color: #f8f8f2;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

th, td {
    border: 1px solid var(--rtd-border);
    padding: 10px 12px;
    text-align: left;
}

th {
    background: var(--rtd-code-bg);
    font-weight: 700;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

/* Admonitions */
.admonition {
    padding: 16px;
    margin: 1em 0;
    border-left: 4px solid;
    border-radius: 4px;
}

.admonition-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.admonition.note {
    background: #e7f2fa;
    border-color: var(--rtd-info);
}

.admonition.warning {
    background: #ffedcc;
    border-color: var(--rtd-warning);
}

.admonition.danger {
    background: #fdf3f2;
    border-color: var(--rtd-danger);
}

.admonition.tip {
    background: #dff6dd;
    border-color: var(--rtd-success);
}

/* Lists */
ul, ol {
    margin: 1em 0;
    padding-left: 2em;
}

li {
    margin: 0.5em 0;
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid var(--rtd-border);
    margin: 2em 0;
}

/* Breadcrumbs */
.wy-breadcrumbs {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
    font-size: 0.9em;
}

.wy-breadcrumbs li {
    display: inline;
}

.wy-breadcrumbs li + li:before {
    content: " » ";
    color: #999;
}

/* Footer */
footer {
    background: var(--rtd-footer-bg);
    color: #999;
    padding: 24px 48px;
    margin-top: 48px;
    font-size: 0.85em;
}

footer a {
    color: #fff;
}

/* Navigation Footer */
.rst-footer-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--rtd-border);
}

.rst-footer-buttons .btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--rtd-primary);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.rst-footer-buttons .btn:hover {
    background: var(--rtd-primary-dark);
    text-decoration: none;
}

/* Version Badge */
.version-badge {
    background: var(--rtd-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    display: inline-block;
    margin-top: 8px;
}

/* Search Results */
.search-results {
    padding: 24px;
}

.search-results h3 {
    margin-bottom: 16px;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .wy-nav-side {
        left: -300px;
        transition: left 0.3s;
    }
    
    .wy-nav-side.shift {
        left: 0;
    }
    
    .wy-nav-content-wrap {
        margin-left: 0;
    }
    
    .wy-nav-content {
        padding: 16px;
    }
    
    .mobile-nav-toggle {
        display: block;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 300;
        background: var(--rtd-primary);
        color: #fff;
        border: none;
        padding: 12px 16px;
        border-radius: 4px;
        cursor: pointer;
    }
}

.mobile-nav-toggle {
    display: none;
}

/* Syntax Highlighting */
.highlight .k { color: #66d9ef; } /* Keyword */
.highlight .s { color: #e6db74; } /* String */
.highlight .c { color: #75715e; } /* Comment */
.highlight .n { color: #f8f8f2; } /* Name */
.highlight .o { color: #f92672; } /* Operator */
.highlight .p { color: #f8f8f2; } /* Punctuation */
.highlight .mi { color: #ae81ff; } /* Number */

/* JSON Syntax */
.json .key { color: #f92672; }
.json .string { color: #e6db74; }
.json .number { color: #ae81ff; }
.json .boolean { color: #66d9ef; }
.json .null { color: #66d9ef; }

/* Diagram Boxes */
.diagram {
    background: #f8f8f8;
    border: 1px solid var(--rtd-border);
    border-radius: 4px;
    padding: 16px;
    margin: 1em 0;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85em;
    line-height: 1.4;
    white-space: pre;
}

/* Status Indicators */
.status-up { color: var(--rtd-success); }
.status-down { color: var(--rtd-danger); }
.status-warning { color: var(--rtd-warning); }

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: var(--rtd-success);
    color: #fff;
}

.badge-warning {
    background: var(--rtd-warning);
    color: #fff;
}

.badge-danger {
    background: var(--rtd-danger);
    color: #fff;
}

.badge-info {
    background: var(--rtd-info);
    color: #fff;
}

/* Icon Styles */
.icon {
    margin-right: 8px;
}

/* Print Styles */
@media print {
    .wy-nav-side {
        display: none;
    }
    
    .wy-nav-content-wrap {
        margin-left: 0;
    }
    
    .rst-footer-buttons {
        display: none;
    }
}
