/* Documentation Styles */

/* Layout */
.docs-main {
    display: flex;
    min-height: calc(100vh - 64px);
    padding-top: 64px;
}

.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--color-bg-secondary);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 32px 24px;
}

.docs-nav h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.docs-nav ul {
    list-style: none;
}

.docs-nav li {
    margin-bottom: 8px;
}

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

.docs-nav a:hover {
    color: var(--color-text);
    background: var(--color-bg-tertiary);
}

.docs-nav a.active {
    color: var(--color-primary);
    background: rgba(59, 130, 246, 0.1);
}

.docs-content {
    flex: 1;
    margin-left: 260px;
    max-width: 900px;
    padding: 48px 64px;
}

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

.docs-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.docs-header p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

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

.docs-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-top: 16px;
}

.docs-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.docs-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--color-text);
}

.docs-section p {
    margin-bottom: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.docs-section ul, .docs-section ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--color-text-secondary);
}

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

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

.component-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.component-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.component-icon svg {
    width: 28px;
    height: 28px;
}

.component-icon.server-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-primary);
}

.component-icon.web-icon {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-accent-yellow);
}

.component-icon.agent-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-accent);
}

.component-card h3 {
    font-size: 1.125rem;
    margin-top: 0;
    margin-bottom: 8px;
}

.component-card p {
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Code Blocks */
.code-block-wrapper {
    margin: 16px 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--color-bg-tertiary);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.code-block {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.code-block code {
    color: var(--color-text-secondary);
    display: block;
}

/* Info & Warning Boxes */
.info-box, .warning-box {
    margin: 24px 0;
    padding: 20px 24px;
    border-radius: 8px;
    border-left: 4px solid;
}

.info-box {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--color-primary);
}

.warning-box {
    background: rgba(251, 191, 36, 0.1);
    border-color: var(--color-accent-yellow);
}

.info-box h4, .warning-box h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
}

.info-box h4 {
    color: var(--color-primary);
}

.warning-box h4 {
    color: var(--color-accent-yellow);
}

.info-box p, .warning-box p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.info-box ol, .warning-box ol {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.info-box code, .warning-box code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.info-box pre, .warning-box pre {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow-x: auto;
}

/* Prerequisite List */
.prereq-list {
    list-style: none;
    padding-left: 0;
}

.prereq-list li {
    position: relative;
    padding-left: 28px;
}

.prereq-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 600;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.feature-list li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--color-primary);
    font-size: 1.2em;
}

/* Config Table */
.config-table {
    margin: 24px 0;
    overflow-x: auto;
}

.config-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.config-table th {
    background: var(--color-bg-tertiary);
    color: var(--color-text);
    font-weight: 600;
}

.config-table td {
    color: var(--color-text-secondary);
}

.config-table td code {
    background: var(--color-bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--color-accent-yellow);
}

/* Key Table */
.key-table {
    margin: 24px 0;
    overflow-x: auto;
}

.key-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.key-table th {
    background: var(--color-bg-tertiary);
    color: var(--color-text);
    font-weight: 600;
    width: 200px;
}

.key-table td {
    color: var(--color-text-secondary);
}

kbd {
    display: inline-block;
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text);
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Workflow Steps */
.workflow-steps {
    margin: 24px 0;
}

.workflow-step {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    position: relative;
}

.workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 48px;
    width: 2px;
    height: calc(100% - 8px);
    background: var(--color-border);
}

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.workflow-step .step-content {
    flex: 1;
}

.workflow-step .step-content h4 {
    margin-top: 8px;
    margin-bottom: 12px;
}

/* Troubleshooting */
.troubleshoot-item {
    margin: 24px 0;
    padding: 24px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.troubleshoot-item h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--color-text);
}

.troubleshoot-item ol, .troubleshoot-item ul {
    margin-bottom: 0;
}

.troubleshoot-item pre {
    margin: 8px 0;
    padding: 12px;
    background: var(--color-bg);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    overflow-x: auto;
}

.troubleshoot-item pre code {
    color: var(--color-text-secondary);
}

/* Pagination */
.docs-pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.prev-link, .next-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: all 0.2s;
}

.prev-link:hover, .next-link:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-primary);
}

.arrow {
    font-size: 1.25rem;
}

/* Active nav link */
.nav-menu a.active {
    color: var(--color-primary);
}

/* Deployment Tabs */
.deploy-tabs {
    margin: 32px 0;
}

.deploy-tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0;
}

.deploy-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -1px;
}

.deploy-tab-btn:hover {
    color: var(--color-text);
}

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

.deploy-tab-btn .tab-icon {
    font-size: 1.1rem;
}

.deploy-tab-btn .tab-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--color-accent);
    color: white;
    border-radius: 10px;
    font-weight: 600;
}

.deploy-tab-btn .tab-badge.coming-soon {
    background: var(--color-text-muted);
}

.deploy-tab-content {
    display: none;
}

.deploy-tab-content.active {
    display: block;
}

/* Coming Soon Box */
.coming-soon-box {
    text-align: center;
    padding: 80px 40px;
    background: var(--color-card);
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    margin: 24px 0;
}

.coming-soon-box .icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.coming-soon-box h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

.coming-soon-box p {
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto 24px;
}

.coming-soon-box .notify-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.coming-soon-box .notify-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.9rem;
}

.coming-soon-box .notify-form input::placeholder {
    color: var(--color-text-muted);
}

.coming-soon-box .notify-form button {
    padding: 12px 24px;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.coming-soon-box .notify-form button:hover {
    background: var(--color-primary-dark);
}

.coming-soon-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.coming-soon-features .feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.coming-soon-features .feature .check {
    color: var(--color-accent);
}

/* Deploy type badges */
.deploy-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.deploy-badge.local {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-accent);
}

.deploy-badge.aws {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-accent-yellow);
}

.deploy-badge.saas {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-primary);
}

/* Security Disclaimer */
.disclaimer-box {
    margin: 32px 0;
    padding: 20px 24px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
}

.disclaimer-box h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.disclaimer-box p {
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.disclaimer-box p:last-child {
    margin-bottom: 0;
}

.disclaimer-box ul {
    margin: 12px 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.disclaimer-box ul li {
    margin-bottom: 4px;
}

/* Footer Disclaimer */
.footer-disclaimer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-disclaimer p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

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

@media (max-width: 768px) {
    .docs-sidebar {
        display: none;
    }

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

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

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

    .key-table th {
        width: auto;
    }

    .docs-pagination {
        flex-direction: column;
        gap: 16px;
    }
}
