/* Custom styles for API documentation */
body {
    font-feature-settings: "kern", "liga", "clig", "calt";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Code block styling */
pre {
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 1rem 0;
    border: 0;
    background-color: #2d2d2d !important;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 0;
    background-color: transparent !important;
}

/* Style for inline code */
:not(pre) > code {
    background-color: #f3f4f6;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    border: 0;
}

/* API endpoint styling */
.endpoint {
    margin-bottom: 3rem;
}

.endpoint h2 {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.endpoint h3 {
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* HTTP method badges */
.http-method {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.get { background-color: #dbeafe; color: #1e40af; }
.post { background-color: #dcfce7; color: #166534; }
.put { background-color: #fef9c3; color: #854d0e; }
.delete { background-color: #fee2e2; color: #991b1b; }
.patch { background-color: #f3e8ff; color: #6b21a8; }

/* Request/Response sections */
.section {
    background-color: #ffffff;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section h4 {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Code copy button */
.code-block {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: #9ca3af;
    background-color: #1f2937;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.code-copy-btn:hover {
    color: #4b5563;
    background-color: #374151;
}

.code-copy-btn:hover {
    background-color: #374151;
    color: #ffffff;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.tab:hover {
    color: #374151;
    border-bottom-color: #d1d5db;
}

.tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .endpoint h2 {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
    
    .section {
        padding: 1rem;
    }
}

/* Sidebar navigation */
nav a {
    display: block;
    padding: 0.5rem 1rem;
    color: #9CA3AF;
    border-radius: 0.375rem;
    transition: all 0.2s;
    margin: 0.125rem 0;
}

/* Active state for sidebar links */
nav a.active,
nav a:active,
nav a:focus {
    background-color: #374151;
    color: #FFFFFF;
    font-weight: 500;
}

nav a:hover:not(.active) {
    background-color: #1F2937;
    color: #E5E7EB;
}

/* Mobile menu styles */
#mobile-menu a {
    color: #374151;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0;
}

#mobile-menu a:hover,
#mobile-menu a.active {
    background-color: #F3F4F6;
    color: #111827;
}

/* Ensure proper spacing for nested navigation */
nav > div {
    margin-bottom: 1.5rem;
}

/* Syntax highlighting */
.hljs {
    background-color: #111827;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.625;
    font-family: 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    overflow-x: auto;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background-color: #9ca3af;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280;
}
