/* Main body spacing for fixed header */
body {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-nav {
    --bs-nav-link-color: rgb(255 255 255);
    

}


/* Sidebar styling */
.sidebar {
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
    height: calc(100vh - 70px);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 1rem;
}

.sidebar .nav-link.active {
    color: #007bff;
}

.sidebar .nav-link:hover {
    color: #0056b3;
    background-color: #f8f9fa;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Main content area */
.main-content {
    padding-top: 20px;
    padding-bottom: 40px;
    margin-left: auto;
    transition: margin-left 0.3s ease;
}

@media (min-width: 768px) {
    .main-content {
        margin-left: 16.666667%;
    }
    
    /* Keep the sidebar visible on desktop */
    #sidebar {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 16.666667%;
    }
}

/* Mobile sidebar */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    .sidebar.collapse:not(.show) {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* Code blocks */
/* ===== overrides for code blocks ===== */
.code-block {
    /* keep the dark background, padding, border, etc… */
    overflow: hidden;           /* creates block formatting context */
    margin: 2rem 0;             /* reliable spacing */
    padding: 1rem; 
    background-color: #272822;
    color: #f8f8f2;
    border-radius: 5px;
    border: 1px solid #444;
    padding: 1rem;
  
    /* add your spacing here */
    margin: 2rem 0 !important;  /* 2rem top and bottom, with !important to beat any inline styles */
  
    /* only horizontal scrolling if needed */
    overflow-x: auto;
    overflow-y: hidden;
  
    position: relative;
    page-break-inside: avoid;
  }
  
  /* make sure the <pre> inside still wraps nicely */
  .code-block pre {
    margin-bottom: 1rem;  /* give a little breathing room at the bottom of the code */
  }
  

.code-block pre {
    margin-bottom: 0;
}

.code-title {
    font-family: monospace;
    background-color: #3c3d37;
    padding: 8px 15px;
    margin-top: -15px;
    margin-left: -15px;
    margin-right: -15px;
    margin-bottom: 15px;
    border-radius: 5px 5px 0 0;
    color: #f8f8f2;
    font-weight: bold;
    border-bottom: 1px solid #555;
}

/* Endpoint displays */
.endpoint {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
}

.endpoint h4 {
    margin-top: 0;
    color: #007bff;
}

.method {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
    color: white;
}

.method.post {
    background-color: #49cc90;
}

.method.get {
    background-color: #61affe;
}

.method.put {
    background-color: #fca130;
}

.method.delete {
    background-color: #f93e3e;
}

.endpoint .url {
    background-color: #272822;
    color: #f8f8f2;
    padding: 5px 10px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 14px;
}

/* Tables */
.table-responsive {
    margin: 20px 0;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
}

/* Alerts and notes */
.note {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
    background-color: #fff8e1;
    border-radius: 0 5px 5px 0;
}

.note i {
    color: #ffc107;
    margin-right: 5px;
}

.warning {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
    background-color: #f8d7da;
    border-radius: 0 5px 5px 0;
}

.warning i {
    color: #dc3545;
    margin-right: 5px;
}

/* Footer */
.footer {
    margin-top: auto;
    background-color: #f8f9fa;
    padding: 20px 0;
    border-top: 1px solid #dee2e6;
    padding-left: 230px;
}

/* API Base URL highlight */
.api-base-url {
    background-color: #e9ecef;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.api-base-url code {
    font-size: 1.1rem;
    color: #d63384;
}

/* Navigation markers */
.nav-marker {
    display: block;
    padding-top: 70px;
    margin-top: -70px;
}

/* Table of contents */
.toc {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.toc h5 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.toc ul {
    list-style-type: none;
    padding-left: 10px;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: #007bff;
    text-decoration: none;
}

.toc a:hover {
    text-decoration: underline;
}

/* Utility classes */
.scroll-x {
    overflow-x: auto;
}

.no-break {
    page-break-inside: avoid;
}

/* Sidebar toggle button */
#sidebar-toggle {
    display: none;
}

@media (max-width: 767.98px) {
    #sidebar-toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1030;
    }
}

/* Custom color for purple badge */
.bg-purple {
    background-color: #6f42c1;
}