/* SafeRag Documentation Styles */
/* Extends the main Corixa website design system */

:root {
    /* Color System */
    /* Color System - Deep Slate & Electric Teal */
    --primary-50: #f8fafc;
    --primary-100: #f1f5f9;
    --primary-200: #e2e8f0;
    --primary-300: #cbd5e1;
    --primary-400: #94a3b8;
    --primary-500: #64748b;
    --primary-600: #475569;
    --primary-700: #334155;
    --primary-800: #1e293b;
    --primary-900: #0f172a;

    --primary-color: var(--primary-900);
    --primary-light: var(--primary-600);
    --primary-dark: #020617;

    --accent-color: #0d9488;
    --accent-light: #14b8a6;
    --accent-dark: #0f766e;

    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg-light: #f8fafc;
    --bg-lighter: #ffffff;
    --bg-dark: #0f172a;
    --white: #ffffff;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 80px;

    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 60px;
    --max-content-width: 900px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
    color: var(--text-dark);
    line-height: var(--line-height-normal);
    background: var(--bg-lighter);
}

/* Header */
.docs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-lg);
}

.docs-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.docs-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
}

.docs-logo-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
}

.docs-logo-divider {
    color: var(--text-muted);
    font-weight: 300;
}

.docs-logo-product {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dark);
}

.docs-header-links {
    display: flex;
    gap: var(--spacing-xl);
    list-style: none;
}

.docs-header-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
}

.docs-header-links a:hover {
    color: var(--primary-color);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: var(--spacing-sm);
}

/* Layout Container */
.docs-layout {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.docs-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-light);
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    padding: var(--spacing-lg) 0;
    z-index: 100;
}

.sidebar-section {
    margin-bottom: var(--spacing-lg);
}

.sidebar-title {
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: var(--spacing-sm) var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    color: var(--primary-color);
    background: var(--white);
}

.sidebar-nav a.active {
    color: var(--primary-color);
    background: var(--white);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.docs-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--spacing-2xl) var(--spacing-3xl);
    max-width: calc(var(--max-content-width) + var(--spacing-3xl) * 2);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs .separator {
    color: var(--text-muted);
}

.breadcrumbs .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Page Title */
.docs-page-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight);
}

.docs-page-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-light);
    margin-bottom: var(--spacing-2xl);
    line-height: var(--line-height-relaxed);
}

/* Content Typography */
.docs-content h2 {
    font-size: var(--font-size-2xl);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid #e2e8f0;
}

.docs-content h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.docs-content h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.docs-content p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-relaxed);
    color: var(--text-dark);
}

.docs-content ul,
.docs-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
}

.docs-content li {
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-relaxed);
}

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

.docs-content a:hover {
    text-decoration: underline;
}

/* Pro Badge */
.badge-pro {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--gradient);
    color: var(--white);
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-left: var(--spacing-sm);
    vertical-align: middle;
}

/* Callout Boxes */
.callout {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
    border-left: 4px solid;
}

.callout-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.callout-content {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.callout-tip {
    background: #ecfdf5;
    border-color: var(--success-color);
}

.callout-tip .callout-title {
    color: #065f46;
}

.callout-warning {
    background: #fffbeb;
    border-color: var(--warning-color);
}

.callout-warning .callout-title {
    color: #92400e;
}

.callout-note {
    background: var(--primary-50);
    border-color: var(--primary-color);
}

.callout-note .callout-title {
    color: var(--primary-dark);
}

.callout-important {
    background: #fef2f2;
    border-color: var(--error-color);
}

.callout-important .callout-title {
    color: #991b1b;
}

/* Steps */
.steps {
    counter-reset: step-counter;
    margin: var(--spacing-lg) 0;
}

.step-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.step-item::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: var(--gradient);
    color: var(--white);
    font-weight: 700;
    font-size: var(--font-size-sm);
    border-radius: 50%;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-top: 4px;
}

.step-content h4 {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
}

/* Screenshot Placeholder */
.screenshot-placeholder {
    background: var(--bg-light);
    border: 2px dashed #cbd5e1;
    border-radius: var(--spacing-md);
    padding: var(--spacing-2xl);
    margin: var(--spacing-lg) 0;
    text-align: center;
}

.screenshot-placeholder-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.screenshot-placeholder-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.screenshot-placeholder-instructions {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

.screenshot-placeholder-filename {
    display: inline-block;
    background: var(--primary-100);
    color: var(--primary-800);
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: var(--font-size-sm);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    margin-top: var(--spacing-md);
}

/* Actual Screenshot */
.screenshot {
    margin: var(--spacing-lg) 0;
    border-radius: var(--spacing-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.screenshot img {
    width: 100%;
    display: block;
}

.screenshot-caption {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
    padding: var(--spacing-sm);
    background: var(--bg-light);
}

/* Feature Cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.feature-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--spacing-md);
    padding: var(--spacing-lg);
    transition: all 0.2s ease;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-card-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-md);
}

.feature-card h4 {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    margin-bottom: 0;
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

/* Quick Links Grid */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.quick-link:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.quick-link-icon {
    font-size: 24px;
}

.quick-link-text {
    font-weight: 500;
}

/* Keyboard Shortcut */
kbd {
    display: inline-block;
    padding: 2px 6px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: var(--font-size-xs);
    background: var(--bg-light);
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 1px 0 #d1d5db;
}

/* Code Blocks */
code {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9em;
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
}

pre {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: var(--spacing-lg);
    border-radius: var(--spacing-sm);
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Table */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
    font-size: var(--font-size-sm);
}

.docs-table th,
.docs-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.docs-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.docs-table tr:hover td {
    background: var(--bg-light);
}

/* Footer */
.docs-footer {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid #e2e8f0;
}

.docs-footer-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

.docs-footer-link {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    text-decoration: none;
    padding: var(--spacing-md);
    border-radius: var(--spacing-sm);
    transition: background 0.2s ease;
    max-width: 45%;
}

.docs-footer-link:hover {
    background: var(--bg-light);
}

.docs-footer-link-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.docs-footer-link-title {
    font-weight: 600;
    color: var(--primary-color);
}

.docs-footer-link.next {
    text-align: right;
    margin-left: auto;
}

.docs-footer-copyright {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    padding: var(--spacing-lg) 0;
}

.docs-footer-copyright a {
    color: var(--text-light);
    text-decoration: none;
}

.docs-footer-copyright a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-main {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .docs-sidebar {
        position: fixed;
        left: -100%;
        width: 100%;
        max-width: 300px;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-xl);
    }

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

    .docs-main {
        margin-left: 0;
        padding: var(--spacing-lg);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .docs-header-links {
        display: none;
    }

    .docs-page-title {
        font-size: var(--font-size-2xl);
    }

    .docs-footer-nav {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .docs-footer-link {
        max-width: 100%;
    }

    .docs-footer-link.next {
        text-align: left;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.visible {
    display: block;
}