/* Documentation Styles */

.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    gap: 40px;
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section li {
    margin-bottom: 8px;
}

.sidebar-section a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.sidebar-section a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.sidebar-section a.active {
    background: var(--gradient);
    color: white;
    font-weight: 600;
}

/* Main Content */
.docs-content {
    flex: 1;
    max-width: 800px;
}

.doc-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.doc-section h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.doc-section h2 {
    font-size: 2rem;
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.doc-section h3 {
    font-size: 1.5rem;
    margin-top: 32px;
    margin-bottom: 16px;
}

.doc-section h4 {
    font-size: 1.125rem;
    margin-top: 24px;
    margin-bottom: 12px;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

/* Code Blocks */
.code-block {
    position: relative;
    background: #1e1e1e;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #d4d4d4;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Inline Code */
:not(pre) > code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-info {
    background: #e6f3ff;
    border-color: #0066cc;
    color: #004080;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert strong {
    display: block;
    margin-bottom: 4px;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.docs-table th,
.docs-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
}

.docs-table tr:hover {
    background: var(--bg-light);
}

/* API Endpoint Badge */
.api-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    margin: 20px 0;
    font-family: 'Monaco', 'Courier New', monospace;
}

.http-method {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 12px;
    background: var(--success);
    color: white;
}

.http-post {
    background: #0066cc;
}

/* Troubleshooting */
.troubleshooting-item {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.troubleshooting-item h4 {
    color: var(--danger);
    margin-top: 0;
    margin-bottom: 8px;
}

.troubleshooting-item p {
    margin: 4px 0;
    color: var(--text-secondary);
}

.troubleshooting-item strong {
    color: var(--text-primary);
}

/* Support Cards */
.support-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.support-card {
    padding: 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}

.support-card h3 {
    font-size: 1.5rem;
    margin: 0 0 8px 0;
}

.support-card p {
    color: var(--text-secondary);
    margin: 8px 0 16px 0;
}

.support-card a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.support-card a:hover {
    text-decoration: underline;
}

/* Keyboard Keys */
kbd {
    background: var(--text-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-layout {
        flex-direction: column;
    }
    
    .docs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 24px;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .docs-sidebar {
        display: none; /* Hide sidebar on mobile */
    }
    
    .doc-section h1 {
        font-size: 2rem;
    }
    
    .doc-section h2 {
        font-size: 1.5rem;
    }
    
    .code-block {
        margin-left: -24px;
        margin-right: -24px;
        border-radius: 0;
    }
}
