/* =============================================================================
   DATAMIND User Guide — Professional Styles
   =============================================================================
   Loaded automatically by Dash (all files in assets/ are auto-included).
   Scoped to the guide page via .guide-page class.
   ============================================================================= */

/* --- Smooth scroll for anchor navigation --- */
html {
    scroll-behavior: smooth;
}

/* --- Deep-link anchor targets (block-level <a id="...">) --- */
.guide-page a[id] {
    display: block;
    position: relative;
    top: -80px;      /* offset for fixed navbar */
    visibility: hidden;
    height: 0;
}

/* --- Guide markdown content styling --- */
.guide-page .card-body h1 {
    color: #F7941D;
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F7941D;
}

.guide-page .card-body h2 {
    color: #F7941D;
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    scroll-margin-top: 80px;
}

.guide-page .card-body h3 {
    color: #111827;
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    scroll-margin-top: 80px;
}

.guide-page .card-body h4 {
    color: #374151;
    font-size: 1.0rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    scroll-margin-top: 80px;
}

/* --- Links --- */
.guide-page .card-body a {
    color: #1949ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.guide-page .card-body a:hover {
    border-bottom-color: #1949ff;
}

/* --- Tables (metric references) --- */
.guide-page .card-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px 0;
    font-size: 0.85rem;
}

.guide-page .card-body thead th {
    background: #F7941D;
    color: white;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    border: none;
}

.guide-page .card-body thead th:first-child {
    border-radius: 8px 0 0 0;
}

.guide-page .card-body thead th:last-child {
    border-radius: 0 8px 0 0;
}

.guide-page .card-body tbody td {
    padding: 8px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.guide-page .card-body tbody tr:hover {
    background: #f9fafb;
}

.guide-page .card-body tbody tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.guide-page .card-body tbody tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* --- Blockquotes (callout boxes: Tip, For Analysts, Note) --- */
.guide-page .card-body blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #1949ff;
    background: #eff6ff;
    color: #374151;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Tip callouts */
.guide-page .card-body blockquote:has(strong:first-child) {
    border-left-color: #10b981;
    background: #ecfdf5;
}

/* --- Code blocks (if any) --- */
.guide-page .card-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #111827;
}

.guide-page .card-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.82rem;
    margin: 16px 0;
}

.guide-page .card-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* --- Lists --- */
.guide-page .card-body ul,
.guide-page .card-body ol {
    padding-left: 24px;
    margin: 8px 0 16px 0;
}

.guide-page .card-body li {
    margin-bottom: 4px;
    line-height: 1.6;
}

/* --- Horizontal rules (section dividers) --- */
.guide-page .card-body hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 32px 0;
}

/* --- Sidebar nav active state --- */
.guide-nav-link.active,
.guide-nav-link:hover {
    background: rgba(247, 148, 29, 0.1) !important;
    color: #F7941D !important;
    font-weight: 600;
}

/* --- Standalone / Presentation mode --- */
.guide-standalone {
    padding: 60px 40px !important;
    max-width: 900px !important;
}

.guide-standalone .card {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* --- Print styles --- */
@media print {
    .guide-page .d-none.d-md-block {
        display: none !important;
    }
    .guide-page .card {
        box-shadow: none !important;
    }
    .guide-page .card-body h2 {
        page-break-before: always;
    }
    .guide-page .card-body h2:first-of-type {
        page-break-before: avoid;
    }
}
