/* Paramus Stories - Shared CSS */
/* Based on documentation style.css for consistent branding */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-code: #1e293b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-page);
    font-size: 14px;
}

/* Story Header */
.story-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.story-header h1 {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.breadcrumb {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
}

.story-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.category-badge, .library-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.category-badge {
    background: rgba(255,255,255,0.2);
}

.library-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 1.5rem;
}

/* Section Cards */
.section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.section h2 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bg-subtle);
}

/* Description */
.description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

/* Usage Notes */
.usage-notes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.usage-notes li {
    position: relative;
    padding: 0.25rem 0 0.25rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.usage-notes li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* Chat Dialog Examples - Main Card */
.example {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    margin-bottom: 0.625rem;
    border: 1px solid var(--border);
}

.example h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* PROMPT Box */
.prompt-box {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.5rem;
}

.prompt-box strong {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

/* CONTEXT Box */
.context-box {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.context-box strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* THINKING Box (same style as CONTEXT) */
.thinking-box {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.thinking-box strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* RESULT Box */
.result-box {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
}

.result-box strong {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #166534;
    margin-bottom: 0.25rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
}

/* Details Link */
.details-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 0.25rem;
}

.details-link:hover {
    text-decoration: underline;
}

/* Technical Details */
.technical-detail {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}

.technical-detail h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.detail-section {
    margin-bottom: 0.5rem;
}

.detail-section strong {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* Code Blocks */
.code-block {
    background: var(--bg-code);
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.875rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Syntax Highlighting */
.code-block .keyword { color: #c792ea; }
.code-block .string { color: #c3e88d; }
.code-block .number { color: #f78c6c; }
.code-block .comment { color: #546e7a; font-style: italic; }
.code-block .property { color: #82aaff; }
.code-block .operator { color: #89ddff; }

/* Parameters Table */
.params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.params-table th {
    text-align: left;
    padding: 0.5rem 0.625rem;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
}

.params-table td {
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.params-table tr:hover {
    background: var(--bg-subtle);
}

.param-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8rem;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-subtle);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.back-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Overview Section */
.overview-section {
    border-left: 4px solid var(--primary);
}

/* Key Concepts */
.key-concepts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.key-concepts li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.key-concepts li:last-child {
    border-bottom: none;
}

.concept-title {
    font-weight: 600;
    color: var(--text-primary);
}

.concept-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Tool Calls Badge */
.tools-used {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.tool-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Outcomes */
.outcomes {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #86efac;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.outcomes h3 {
    color: #166534;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.outcomes ul {
    margin: 0;
    padding-left: 1.5rem;
}

.outcomes li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .story-header {
        padding: 1rem;
    }
    
    .story-header h1 {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 0.75rem 1rem;
    }
    
    .section {
        padding: 0.875rem;
    }
}
