/* ========================================
   MonteFinance Help Pages Stylesheet
   ======================================== */

/* Layout */
.help-body {
    padding-top: 56px;
    background: #f8f9fa;
    min-height: 100vh;
}

.help-container {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* Sidebar */
.help-sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f5f7fa;
    color: #1976d2;
}

.sidebar-link.active {
    background: #e3f2fd;
    color: #1976d2;
    border-left-color: #1976d2;
    font-weight: 500;
}

.sidebar-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* Main Content */
.help-main {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
}

.help-content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 900px;
}

/* Article Styles */
.help-article {
    line-height: 1.7;
    color: #333;
}

.help-article h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1565c0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #1976d2;
}

.help-article h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.help-article h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #444;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.help-article h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #555;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.help-article p {
    margin-bottom: 1rem;
}

.help-article a {
    color: #1976d2;
    text-decoration: none;
}

.help-article a:hover {
    text-decoration: underline;
}

/* Tables */
.help-article table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.help-article th,
.help-article td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid #e0e0e0;
}

.help-article th {
    background: #f5f7fa;
    font-weight: 600;
    color: #333;
}

.help-article tr:nth-child(even) {
    background: #fafafa;
}

.help-article tr:hover {
    background: #f0f7ff;
}

/* Code */
.help-article code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.help-article pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
}

.help-article pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Blockquotes */
.help-article blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #1565c0;
}

.help-article blockquote p {
    margin: 0;
}

/* Lists */
.help-article ul,
.help-article ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.help-article li {
    margin-bottom: 0.5rem;
}

/* Math/Formula Display */
.help-article .math,
.help-article mjx-container {
    overflow-x: auto;
    padding: 0.5rem 0;
}

/* Mermaid Diagrams */
.help-article .mermaid {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin: 1.5rem 0;
    text-align: center;
}

/* Horizontal Rule */
.help-article hr {
    border: none;
    height: 1px;
    background: #e0e0e0;
    margin: 2.5rem 0;
}

/* Footer Navigation */
.help-footer {
    padding: 1.5rem 3rem;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    max-width: 900px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f5f7fa;
    border-radius: 8px;
    color: #1976d2;
    text-decoration: none;
    transition: all 0.2s;
}

.footer-link:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
}

.footer-link.prev i {
    margin-right: 0.25rem;
}

.footer-link.next i {
    margin-left: 0.25rem;
}

/* Info/Warning Boxes */
.help-article .info-box,
.help-article .warning-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.help-article .info-box {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
}

.help-article .warning-box {
    background: #fff3e0;
    border-left: 4px solid #f57c00;
}

/* Responsive */
@media (max-width: 1024px) {
    .help-sidebar {
        width: 240px;
    }
    
    .help-main {
        margin-left: 240px;
    }
    
    .help-content {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .help-sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .help-sidebar.open {
        transform: translateX(0);
    }
    
    .help-main {
        margin-left: 0;
    }
    
    .help-content {
        padding: 1rem;
    }
    
    .help-article h1 {
        font-size: 1.75rem;
    }
    
    .help-article h2 {
        font-size: 1.4rem;
    }
    
    .help-article table {
        font-size: 0.85rem;
    }
    
    .help-article th,
    .help-article td {
        padding: 0.5rem;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-link {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .help-sidebar,
    .help-footer,
    .code-copy-btn {
        display: none !important;
    }
    
    .help-main {
        margin-left: 0;
    }
    
    .help-content {
        max-width: 100%;
        padding: 0;
    }
    
    .help-article pre {
        white-space: pre-wrap;
        word-wrap: break-word;
    }
}

