/* Documentation Styles */

/* Layout */
.docs-page {
    background: #f8fafc;
}

.docs-layout {
    display: flex;
    min-height: calc(100vh - 70px);
    padding-top: 70px;
}

/* Sidebar */
.docs-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 24px 0;
    z-index: 100;
}

.docs-nav {
    padding: 0 16px;
}

.docs-nav-section {
    margin-bottom: 24px;
}

.docs-nav-section h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0f172a;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 4px;
    border-left: 3px solid #2563eb;
}

.docs-nav-link {
    display: block;
    padding: 8px 12px;
    color: #475569;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: all 0.15s ease;
}

.docs-nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.docs-nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

/* Main Content */
.docs-content {
    flex: 1;
    margin-left: 280px;
    padding: 48px 64px;
    max-width: 900px;
}

.docs-header {
    margin-bottom: 48px;
}

.docs-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.docs-subtitle {
    font-size: 18px;
    color: #64748b;
}

/* Sections */
.docs-section {
    margin-bottom: 48px;
}

.docs-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.docs-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 32px;
    margin-bottom: 12px;
}

.docs-section p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
}

.docs-section ul, .docs-section ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.docs-section li {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 8px;
}

/* Callouts */
.docs-callout {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.docs-callout h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.docs-callout p {
    margin-bottom: 8px;
}

.docs-callout p:last-child,
.docs-callout ul:last-child {
    margin-bottom: 0;
}

.docs-callout ul {
    margin-bottom: 0;
}

.docs-callout-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.docs-callout-info h4 {
    color: #1e40af;
}

.docs-callout-warning {
    background: #fefce8;
    border: 1px solid #fde047;
}

.docs-callout-warning h4 {
    color: #a16207;
}

.docs-callout-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.docs-callout-danger h4 {
    color: #b91c1c;
}

.docs-callout-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.docs-callout-success h4 {
    color: #166534;
}

/* Code */
code {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
}

.docs-section code:not(pre code) {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #e11d48;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Tabs */
.docs-tabs {
    margin-bottom: 24px;
}

.docs-tab-buttons {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.docs-tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.docs-tab-btn:hover {
    color: #0f172a;
}

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

.docs-tab-content {
    background: #1e293b;
    border-radius: 0 0 8px 8px;
}

.docs-tab-pane {
    display: none;
}

.docs-tab-pane.active {
    display: block;
}

.docs-tab-pane pre {
    margin: 0;
    border-radius: 0 0 8px 8px;
}

/* Features Grid */
.docs-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.docs-feature {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.docs-feature h4 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.docs-feature p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 0;
}

/* Cards */
.docs-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.docs-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.docs-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.docs-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.docs-card p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 0;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.docs-table th,
.docs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.docs-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
}

.docs-table td {
    font-size: 14px;
    color: #475569;
}

.docs-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* Endpoint */
.docs-endpoint {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 32px;
    overflow: hidden;
}

.docs-endpoint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.docs-method {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.docs-method-get {
    background: #dcfce7;
    color: #166534;
}

.docs-method-post {
    background: #dbeafe;
    color: #1e40af;
}

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

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

.docs-endpoint-path {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: #0f172a;
}

.docs-endpoint-body {
    padding: 20px;
}

.docs-endpoint-body h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 20px;
    margin-bottom: 12px;
}

.docs-endpoint-body h4:first-child {
    margin-top: 0;
}

/* Parameter table */
.docs-params {
    width: 100%;
    border-collapse: collapse;
}

.docs-params th,
.docs-params td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.docs-params th {
    background: #f8fafc;
    font-weight: 600;
    color: #64748b;
}

.docs-param-name {
    font-family: 'Fira Code', monospace;
    color: #0f172a;
}

.docs-param-type {
    color: #64748b;
    font-size: 13px;
}

.docs-param-required {
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
}

.docs-param-optional {
    color: #64748b;
    font-size: 12px;
}

/* Footer */
.docs-footer {
    margin-left: 280px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-sidebar {
        width: 240px;
    }

    .docs-content {
        margin-left: 240px;
        padding: 32px 40px;
    }

    .docs-footer {
        margin-left: 240px;
    }

    .docs-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .docs-sidebar.open {
        left: 0;
    }

    .docs-content {
        margin-left: 0;
        padding: 24px 16px;
        max-width: 100%;
    }

    .docs-footer {
        margin-left: 0;
    }

    .docs-features-grid,
    .docs-cards {
        grid-template-columns: 1fr;
    }

    /* Header adjustments */
    .docs-header h1 {
        font-size: 28px;
    }

    .docs-subtitle {
        font-size: 16px;
    }

    .docs-section h2 {
        font-size: 20px;
    }

    .docs-section h3 {
        font-size: 18px;
    }

    /* Code blocks - horizontal scroll */
    pre {
        padding: 16px;
        font-size: 12px;
        border-radius: 6px;
    }

    /* Tables - horizontal scroll wrapper */
    .docs-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 24px;
    }

    .docs-table {
        min-width: 500px;
        margin-bottom: 0;
    }

    .docs-params {
        min-width: 400px;
    }

    /* Endpoint cards */
    .docs-endpoint-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }

    .docs-endpoint-path {
        font-size: 13px;
        word-break: break-all;
    }

    .docs-endpoint-body {
        padding: 16px;
    }

    /* Tabs */
    .docs-tab-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .docs-tab-btn {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Callouts */
    .docs-callout {
        padding: 14px 16px;
    }

    /* Cards */
    .docs-card {
        padding: 20px;
    }

    /* Inline code */
    .docs-section code:not(pre code) {
        font-size: 12px;
        word-break: break-word;
    }
}

/* Mobile menu toggle button */
.docs-mobile-menu-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.docs-mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .docs-mobile-menu-btn {
        display: flex;
    }
}

/* Overlay for mobile sidebar */
.docs-sidebar-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.docs-sidebar-overlay.open {
    display: block;
}

/* Integration Paths Section */
.docs-integration-paths {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.docs-path-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.docs-path-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.docs-path-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.docs-path-badge.no-code {
    background: #dcfce7;
    color: #166534;
}

.docs-path-badge.api {
    background: #dbeafe;
    color: #1e40af;
}

.docs-path-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.docs-path-card > p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.docs-path-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.docs-path-card ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: #475569;
}

.docs-path-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 600;
}

.docs-path-card .btn {
    width: 100%;
    text-align: center;
}

.docs-path-card .btn-outline {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
}

.docs-path-card .btn-outline:hover {
    background: #2563eb;
    color: white;
}

@media (max-width: 768px) {
    .docs-integration-paths {
        grid-template-columns: 1fr;
    }
}
