/* ===== API DOCUMENTATION STYLES ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2f3a4f;
    --primary-light: #475569;
    --accent: #3d3d3d;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-code: #1e293b;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --sidebar-width: 260px;
    --navbar-height: 70px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

code, pre {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 40px;
}

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* ===== DOCS CONTAINER ===== */
.docs-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - var(--navbar-height) - 80px);
}

/* ===== SIDEBAR ===== */
.docs-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: sticky;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-content {
    padding: 0 1.5rem;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

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

.sidebar-section ul li {
    margin-bottom: 0.5rem;
}

.sidebar-section ul li a {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

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

.sidebar-section ul li a.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

/* ===== MAIN DOCS ===== */
.docs-main {
    flex: 1;
    padding: 3rem;
    background: var(--bg-primary);
    max-width: calc(100% - var(--sidebar-width));
}

.doc-section {
    margin-bottom: 4rem;
    scroll-margin-top: calc(var(--navbar-height) + 2rem);
}

.doc-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.doc-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.doc-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.doc-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.doc-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.note {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== CODE BLOCKS ===== */
pre {
    background: var(--bg-code) !important;
    border-radius: 8px;
    padding: 1.25rem !important;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #334155;
}

code {
    font-size: 0.875rem;
    line-height: 1.6;
}

:not(pre) > code {
    background: var(--bg-tertiary);
    color: var(--danger);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== INFO BOXES ===== */
.info-box,
.warning-box {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--info);
    color: #1e40af;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid var(--warning);
    color: #92400e;
}

.info-box i,
.warning-box i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ===== TABLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* ===== LISTS ===== */
.feature-list,
.field-list {
    list-style: none;
    margin: 1.5rem 0;
}

.feature-list li,
.field-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.feature-list i {
    color: var(--success);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.field-list code {
    flex-shrink: 0;
}

/* ===== ENDPOINT SECTIONS ===== */
.endpoint-section {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    background: var(--bg-secondary);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.http-method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.http-method.get {
    background: #dbeafe;
    color: #1e40af;
}

.http-method.post {
    background: #d1fae5;
    color: #065f46;
}

.http-method.put {
    background: #fef3c7;
    color: #92400e;
}

.http-method.delete {
    background: #fee2e2;
    color: #991b1b;
}

.endpoint-header code {
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0;
}

/* ===== METHOD CARDS ===== */
.method-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.method-card h4 {
    margin-top: 0;
    font-size: 1rem;
}

/* ===== SDK GRID ===== */
.sdk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.sdk-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.sdk-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.sdk-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.sdk-card h4 {
    margin: 0.5rem 0;
    font-size: 1.125rem;
}

.sdk-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== CONTACT GRID ===== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contact-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-card h4 {
    margin: 0.5rem 0;
    font-size: 1.125rem;
}

.contact-card p {
    margin: 0.5rem 0;
}

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

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

/* ===== FOOTER ===== */
.docs-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.docs-footer p {
    text-align: center;
    color: var(--text-muted);
    margin: 0;
    font-size: 0.875rem;
}

/* ===== SCROLLBAR ===== */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .docs-container {
        flex-direction: column;
    }

    .docs-sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .docs-main {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .doc-section h1 {
        font-size: 2rem;
    }

    .doc-section h2 {
        font-size: 1.5rem;
    }

    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sdk-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}
