/* docs.css - Distributed styling for Telepath Documentation */

/* Unified Layout */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 100px);
    /* Adjust for nav */
    margin-top: 0;
    /* Nav height handled by sticky nav flow */
}

/* Sidebar Styles */
.docs-sidebar {
    width: 260px;
    background: rgba(10, 10, 10, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    position: fixed;
    top: 100px;
    /* Approx navbar height (20+56+20 + border) */
    bottom: 0;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.docs-sidebar h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
    margin-top: 24px;
}

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

.docs-nav-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 0;
    transition: all 0.2s ease;
}

.docs-nav-link:hover,
.docs-nav-link.active {
    color: var(--text-primary);
}

/* Main Content Area */
.docs-content {
    flex: 1;
    margin-left: 260px;
    /* Width of sidebar */
    padding: 40px 60px;
    max-width: 100%;
    background: #050505;
    /* Slightly darker than main bg */
}

.docs-content-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

/* Headers */
.docs-header {
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 32px;
}

.docs-content h1,
.docs-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.docs-subtitle,
.docs-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
}

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

section h2,
.docs-section h2 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle separator */
}

section h2:first-of-type,
.docs-section h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

section h3,
.docs-section h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    margin-top: 32px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Method Badges */
.method-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.method-get {
    background: rgba(0, 255, 148, 0.1);
    color: #00ff94;
    border: 1px solid rgba(0, 255, 148, 0.2);
}

.method-post {
    background: rgba(0, 148, 255, 0.1);
    color: #0094ff;
    border: 1px solid rgba(0, 148, 255, 0.2);
}

.method-patch {
    background: rgba(255, 170, 0, 0.1);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.method-delete {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.api-endpoint-url {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.docs-content p,
.docs-content li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.docs-description {
    margin-bottom: 24px;
}

/* Code Blocks */
.docs-code-block {
    background: #0f0f0f;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #d4d4d4;
    overflow-x: auto;
    margin: 16px 0 32px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.docs-code-block code {
    display: block;
    white-space: pre-wrap;
}

/* Syntax highlighting placeholders since we don't have hljs linked */
.code-keyword {
    color: #569cd6;
}

/* Blue */
.code-string {
    color: #ce9178;
}

/* Orange/Red */
.code-number {
    color: #b5cea8;
}

/* Green */
.code-comment {
    color: #6a9955;
}

/* Green comment */

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

.docs-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.docs-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

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

@media (max-width: 900px) {

    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar {
        /* Restore sidebar on mobile */
        display: block;
        position: static;
        width: 100%;
        height: auto;
        max-height: 250px;
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 24px;
        z-index: 10;
        /* Push below the sticky nav */
        margin-top: 10px;
    }

    .docs-content {
        margin-left: 0;
        padding: 20px;
    }

    .docs-content h1,
    .docs-header h1 {
        font-size: 2rem;
    }
}

/* Provider Lists (from docs.html) */
.provider-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.provider-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.provider-row:hover {
    transform: translateY(-2px);
    border-color: var(--text-secondary);
}

.provider-row h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Troubleshooting (from docs.html) */
.troubleshoot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.troubleshoot-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.troubleshoot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.troubleshoot-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.troubleshoot-body p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.troubleshoot-fix {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 255, 148, 0.05);
    /* Success tint */
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.troubleshoot-fix strong {
    display: block;
    color: var(--success);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* Security Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.security-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.security-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    margin-top: 0;
}