/* API Reference Page Styles */

.api-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
    background: #f8f9fa;
}

.api-sidebar {
    background: white;
    border-right: 1px solid #e0e0e0;
    padding: 2rem;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.api-search {
    margin-bottom: 2rem;
}

.api-search input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.api-search input:focus {
    outline: none;
    border-color: #667eea;
}

.api-nav h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 600;
}

.api-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.api-nav li {
    margin-bottom: 0.25rem;
}

.api-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.api-nav a:hover {
    background: #f0f0f0;
    color: #667eea;
}

.api-nav a.active {
    background: #667eea;
    color: white;
}

.api-content {
    padding: 2rem 3rem;
    max-width: 1000px;
}

.api-header {
    margin-bottom: 3rem;
}

.api-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.api-header p {
    font-size: 1.2rem;
    color: #666;
}

.api-section {
    margin-bottom: 4rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.api-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.api-method {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.api-method:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.api-method h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
    font-family: 'Fira Code', 'Consolas', monospace;
}

.api-method h4 {
    font-size: 1.1rem;
    color: #555;
    margin: 1.5rem 0 0.75rem 0;
}

.api-method p {
    color: #666;
    line-height: 1.6;
    margin: 1rem 0;
}

.api-method pre {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.params-table thead {
    background: #e9ecef;
}

.params-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.params-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
}

.params-table code {
    background: #e9ecef;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #d73a49;
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.event-list li {
    padding: 0.5rem 0;
    color: #666;
}

.event-list code {
    background: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #d73a49;
    margin-right: 0.5rem;
}

.method-list {
    margin-top: 1.5rem;
}

.sub-method {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sub-method h5 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-family: 'Fira Code', 'Consolas', monospace;
}

.sub-method p {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .api-container {
        grid-template-columns: 1fr;
    }
    
    .api-sidebar {
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .api-content {
        padding: 2rem;
    }
}

/* Syntax highlighting improvements */
pre[class*="language-"] {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Scroll indicator */
.api-sidebar::-webkit-scrollbar {
    width: 6px;
}

.api-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.api-sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.api-sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Copy button for code blocks */
.code-wrapper {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.code-wrapper:hover .copy-button {
    opacity: 1;
} 