/* Documentation Specific Styles */

.docs-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1400px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 2rem;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.docs-sidebar h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-link:hover {
    background: var(--light);
    color: var(--primary);
}

.sidebar-link.active {
    background: var(--primary);
    color: white;
}

.sidebar-link .icon {
    font-size: 1.2rem;
}

.sidebar-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.sidebar-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.sidebar-sublink {
    display: block;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.sidebar-sublink:hover {
    color: var(--primary);
}

/* Main Content */
.docs-content {
    background: white;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: var(--shadow);
    min-height: calc(100vh - 140px);
}

.docs-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.docs-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.lead {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
}

/* Documentation Sections */
.doc-section {
    margin-bottom: 4rem;
}

.doc-section h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.doc-section h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.doc-section h4 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.doc-section p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
}

.doc-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.doc-section ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.doc-section ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Feature List */
.feature-list li:before {
    content: attr(data-icon);
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 1rem;
}

.info-box ul {
    margin-bottom: 0;
}

.info-box ul li {
    color: white;
}

.info-box ul li:before {
    color: white;
}

.info-box code {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: monospace;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.support-box {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* Endpoint Display */
.endpoint {
    background: var(--light);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.method {
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method.get {
    background: #d1ecf1;
    color: #0c5460;
}

.method.post {
    background: #d4edda;
    color: #155724;
}

.method.put {
    background: #fff3cd;
    color: #856404;
}

.method.delete {
    background: #f8d7da;
    color: #721c24;
}

.method.patch {
    background: #e2e3e5;
    color: #383d41;
}

.endpoint code {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.docs-table thead {
    background: var(--primary);
    color: white;
}

.docs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.docs-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

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

.docs-table code {
    background: var(--light);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Code Blocks */
.code-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 0;
}

.code-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.code-tab:hover {
    color: var(--primary);
}

.code-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.code-content {
    display: none;
}

.code-content.active {
    display: block;
}

.code-content pre {
    margin: 0;
    border-radius: 0 0 8px 8px;
}

pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    line-height: 1.6;
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.code-block {
    display: block;
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin: 0.5rem 0;
    font-family: monospace;
}

/* API Cards Grid */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.api-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

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

.api-card h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.api-card ul {
    margin: 1rem 0;
}

.api-card ul li {
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.api-card .btn {
    margin-top: 1rem;
    width: 100%;
}

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

.limit-card {
    background: var(--light);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary);
}

.limit-card h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.limit-card ul li {
    font-size: 0.9rem;
    padding: 0.4rem 0;
}

/* Best Practices */
.best-practices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.practice-item {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    border-top: 4px solid var(--primary);
}

.practice-item h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.practice-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Footer */
.docs-footer {
    background: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    color: #666;
}

.docs-footer p {
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-container {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        height: auto;
        margin-bottom: 2rem;
    }

    .docs-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .docs-header h1 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

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

    .api-grid,
    .limit-grid,
    .best-practices {
        grid-template-columns: 1fr;
    }

    .code-tabs {
        overflow-x: auto;
    }

    .docs-content {
        padding: 1.5rem;
    }

    pre {
        font-size: 0.8rem;
        padding: 1rem;
    }
}