/* GitBook-style CSS for BizFirstAI Documentation */

:root {
    --sidebar-width: 280px;
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --content-bg: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #0f172a 100%);
    color: var(--sidebar-text);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateX(0);
    transition: transform 0.3s ease-in-out;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-header .logo {
    border-radius: 4px;
    filter: brightness(1.2);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-weight: 400;
    position: relative;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.sidebar .nav-link.active {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 500;
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ffffff;
}

.sidebar .nav-link i {
    width: 16px;
    opacity: 0.8;
}

.sidebar .nav-link.active i {
    opacity: 1;
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--content-bg);
    transition: margin-left 0.3s ease-in-out;
}

.content-header {
    background: var(--content-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.content-body {
    flex: 1;
    padding: 2rem 0;
}

.content-footer {
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-top: auto;
}

/* Content Cards */
.content-card {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.info-card {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.info-card h4 {
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    font-weight: 600;
}

.info-card p {
    margin-bottom: 0;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--secondary-color);
}

/* Code Blocks */
pre {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.875rem;
}

code {
    background: #f8f9fa;
    color: #e83e8c;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Mermaid Diagrams */
.mermaid {
    text-align: center;
    margin: 2rem 0;
    background: var(--content-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

/* Tables */
.table {
    margin-bottom: 1.5rem;
    background: var(--content-bg);
}

.table thead th {
    background: var(--light-color);
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border-width: 1px;
    margin-bottom: 1.5rem;
}

.alert i {
    opacity: 0.8;
}

/* Badges */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Sidebar Toggle (Mobile) */
.sidebar-toggle {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1060;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .content-header {
        padding: 1rem 0;
    }
    
    .content-body {
        padding: 1rem 0;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .info-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    :root {
        --sidebar-width: 100vw;
    }
    
    .content-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Focus States */
.nav-link:focus,
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Print Styles */
@media print {
    .sidebar,
    .sidebar-toggle,
    .content-header,
    .content-footer {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-body {
        padding: 0 !important;
    }
    
    .content-card {
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
        page-break-inside: avoid;
    }
}