/* ==========================================================================
   Synaplan Documentation - Stylesheet
   Matches website branding and colors
   ========================================================================== */

:root {
    --synaplan-primary: #061c3e;
    --synaplan-secondary: #64748b;
    --synaplan-accent: #10d876;
    --synaplan-dark: #0f172a;
    --synaplan-light: #f8fafc;
}

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--synaplan-light);
    color: var(--synaplan-dark);
}

/* Navigation - Sticky with website colors */
.navbar {
    background-color: var(--synaplan-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Ensure Synaplan widget overlays are always on top of everything */
[id^="synaplan-inline-"][id$="-overlay"],
#synaplan-chat-overlay {
    z-index: 2147483647 !important;
    position: fixed !important;
}

[id^="synaplan-inline-"][id$="-panel"],
#synaplan-chat-container {
    z-index: 2147483647 !important;
    position: fixed !important;
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--synaplan-accent) !important;
}

/* Sidebar */
.list-group-item.active {
    background-color: var(--synaplan-primary);
    border-color: var(--synaplan-primary);
}

.list-group-item {
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
}

/* Markdown Content */
.markdown-body {
    font-size: 16px;
    line-height: 1.6;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    color: var(--synaplan-dark);
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 16px;
}

.markdown-body h1 {
    font-size: 2em;
    border-bottom: 3px solid var(--synaplan-primary);
    padding-bottom: 10px;
}

.markdown-body h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.markdown-body h3 {
    font-size: 1.25em;
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body a {
    color: var(--synaplan-primary);
    text-decoration: none;
}

.markdown-body a:hover {
    color: var(--synaplan-accent);
    text-decoration: underline;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 16px;
    padding-left: 2em;
}

.markdown-body li {
    margin-bottom: 8px;
}

.markdown-body blockquote {
    border-left: 4px solid var(--synaplan-primary);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--synaplan-secondary);
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.markdown-body table th,
.markdown-body table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
}

.markdown-body table th {
    background-color: #f8fafc;
    font-weight: 600;
}

.markdown-body table tr:hover {
    background-color: #f8fafc;
}

.markdown-body code {
    background-color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.markdown-body pre {
    background-color: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.markdown-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.markdown-body hr {
    border: 0;
    border-top: 2px solid #e5e7eb;
    margin: 24px 0;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
}

/* Nav Tabs (for code examples) */
.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    color: var(--synaplan-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
    background: none;
}

.nav-tabs .nav-link.active {
    color: var(--synaplan-primary);
    border-bottom: 2px solid var(--synaplan-primary);
    background: none;
}

.nav-tabs .nav-link:hover {
    color: var(--synaplan-primary);
    border-color: transparent;
}

.nav-tabs .nav-link.disabled {
    color: #9ca3af;
}

.tab-content {
    background: white;
}

/* Footer */
footer {
    background-color: var(--synaplan-dark);
    color: white;
    margin-top: 60px;
}

footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

footer a:hover {
    color: var(--synaplan-accent);
}

/* ==========================================================================
   Responsive / Mobile Styles
   ========================================================================== */

@media (max-width: 767px) {
    /* Hero sections in widget demos */
    .demo-hero {
        padding: 40px 0 !important;
    }
    
    .demo-hero h1 {
        font-size: 32px !important;
    }
    
    .demo-hero p,
    .demo-hero-content p {
        font-size: 16px !important;
    }
    
    /* Demo sections */
    .demo-section,
    .example-section {
        padding: 20px 15px !important;
        margin: 15px 0 !important;
    }
    
    /* Button controls grid */
    .controls-grid,
    .btn-group {
        grid-template-columns: 1fr !important;
    }
    
    .btn-demo,
    button {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* API tables */
    .api-table {
        font-size: 13px;
    }
    
    .api-table th,
    .api-table td {
        padding: 8px !important;
    }
    
    /* Code blocks */
    pre {
        font-size: 12px !important;
        padding: 15px !important;
    }
    
    /* Cards */
    .card-body {
        padding: 15px !important;
    }
    
    /* Sidebar */
    .list-group {
        margin-bottom: 20px;
    }
    
    /* Make widget container full width on mobile */
    .widget-container {
        margin: 20px 0 !important;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    /* Tablet adjustments - keep desktop-like layout */
    .demo-hero h1 {
        font-size: 42px;
    }
    
    .demo-section,
    .example-section {
        padding: 30px 25px !important;
    }
    
    .controls-grid,
    .btn-group {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

