/* ===================================================================
   Onder Ons — basisstijl documentenmodule (overgenomen uit LBIP); huisstijl in onderons.css
   Supplements Bootstrap 5 + Bootstrap Icons.
   =================================================================== */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
}

h1:focus {
    outline: none;
}

/* --- Frontend layout --- */

.lbip-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.lbip-content {
    flex: 1;
}

.lbip-footer {
    margin-top: auto;
}

/* Home cards: hover effect */
.home-card {
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid #e0e0e0;
}

.home-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* --- Admin layout --- */

.admin-page {
    min-height: 100vh;
}

/* Admin sidebar: fixed width, dark theme */
.admin-sidebar {
    width: 220px;
    min-width: 220px;
    min-height: calc(100vh - 56px);
}

.admin-sidebar .nav-link {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.admin-sidebar .nav-link:hover {
    color: #cfe2ff !important;
}

.admin-content {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
}

/* --- Subsite frontend layout (ndoc-inspired, matching old Umbraco version) --- */

/* Split layout: fixed height container, tree and content scroll independently */
.site-layout {
    height: calc(100vh - 60px);
}

/* Left tree/sidebar panel: fixed width, scrolls independently */
.site-tree-panel {
    width: 340px;
    min-width: 340px;
    overflow-y: auto;
    background-color: #f5f5f5 !important;
    font-size: 14px;
}

/* Sidebar tabs (Contents / Index / Search) */
.site-sidebar-tabs .nav-link {
    font-size: 14px;
    padding: 0.3rem 0.6rem;
    color: #555;
}

.site-sidebar-tabs .nav-link.active {
    color: #2a7a2a;
    font-weight: 600;
}

/* Right content panel: scrollable independently from tree */
.site-content-panel {
    background-color: white;
    overflow-y: auto;
    flex: 1;
}

/* --- Page header: 3-column layout matching old Umbraco version --- */

/* Outer container: thin black border */
.page-header-block {
    border: 1px solid #000;
    max-width: 1000px;
    display: flex;
    align-items: stretch;
    margin-bottom: 1rem;
}

/* Left cell: logo with grey background, original size (no resize) */
.page-header-logo {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    border-right: 1px solid #000;
    background-color: #f0f0f0;
}

/* Logo: display at original size, no max-height constraint */
.page-header-logo img {
    display: block;
}

/* Middle cell: site name + content types + departments.
   All 3 rows get equal height via flex: 1 */
.page-header-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #000;
}

/* Site name: same size as the h2 page title below the header.
   flex: 1 ensures all 3 rows share equal height. */
.page-header-middle .ph-site-name {
    flex: 1;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 8px 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #000;
}

.page-header-middle .ph-meta-row {
    flex: 1;
    padding: 4px 16px;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* All middle rows except the last get a bottom border separator */
.page-header-middle .ph-meta-row + .ph-meta-row {
    border-top: 1px solid #000;
}

/* Right cell: revision metadata */
.page-header-info {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 280px;
}

.page-header-info table td {
    padding: 1px 6px;
    border: none;
    vertical-align: top;
}

.page-header-info .label {
    color: #666;
    font-weight: 600;
}

/* --- Frontend link styling: green like the old version --- */

.site-content-panel a {
    color: #2a7a2a !important;
    text-decoration: none;
}

.site-content-panel a:hover {
    text-decoration: underline;
    color: #1e5e1e !important;
}

/* Breadcrumbs: standard 14px font, green links */
.site-breadcrumbs {
    font-size: 14px;
}

.site-breadcrumbs a {
    color: #2a7a2a !important;
}

.site-breadcrumbs a:hover {
    text-decoration: underline;
}

/* ===================================================================
   Page body styles. Used for both TinyMCE-authored pages and HTML that
   gets posted via the /api/ext/* API by external pipelines (AI-generated
   analyses, etc.). The API payloads typically strip the <head><style>
   block, so we provide sensible defaults here for:
     - headings with subtle dividers
     - tables with visible borders
     - blockquote / code / pre
     - SVG mock-ups (display block, responsive)
     - anchor colours matching the Liebaert brand blue
   =================================================================== */

/* Images responsive */
.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Video's (handleidingsvideo's, sinds 2026-10-12). De editorknop "Video invoegen" plaatst
   <figure class="lbip-video"><video controls preload="metadata" src="/api/media/file/{id}"></video>
   <figcaption>…</figcaption></figure>. Oudere pagina's (Umbraco-import) hebben losse <video>-tags
   met width/height 900x525; max-width maakt ook die responsief. app.css is ook content_css van
   TinyMCE, dus de editor toont de video hetzelfde als de pagina. */
.page-body video {
    max-width: 100%;
    height: auto;
    display: block;
    background: #000;
    border-radius: 4px;
}

.page-body figure.lbip-video {
    margin: 1em 0;
    max-width: 900px;
}

.page-body figure.lbip-video video {
    width: 100%;
}

.page-body figure.lbip-video figcaption {
    margin-top: 0.35em;
    font-size: 0.9rem;
    color: #4a5568;
}

/* Headings — matches the pipeline HTML examples */
.page-body h1 {
    border-bottom: 3px solid #2c5282;
    padding-bottom: 0.3em;
    color: #1a365d;
}

.page-body h2 {
    border-bottom: 1px solid #cbd5e0;
    padding-bottom: 0.2em;
    margin-top: 2em;
    color: #2c5282;
}

.page-body h3 {
    color: #2d3748;
    margin-top: 1.6em;
}

/* Tables — visible borders with light header background */
.page-body table {
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.page-body table td,
.page-body table th {
    border: 1px solid #cbd5e0;
    padding: 4px 10px;
    text-align: left;
}

.page-body table th {
    background: #edf2f7;
}

/* Blockquote — left border, soft blue background (matches pipeline style) */
.page-body blockquote {
    border-left: 4px solid #4299e1;
    padding: 0.3em 0.8em;
    background: #ebf8ff;
    color: #2a4365;
    margin: 0.4em 0;
    font-style: italic;
}

/* Inline + block code */
.page-body code {
    background: #edf2f7;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.92em;
}

.page-body pre code {
    display: block;
    padding: 0.8em;
    overflow-x: auto;
    line-height: 1.4;
}

/* Horizontal rules and lists */
.page-body hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 2em 0;
}

.page-body ul li {
    margin: 0.2em 0;
}

/* Anchor links (TOC jumps work via internal-links.js — see that file) */
.page-body a {
    color: #2c5282;
}

.page-body a:hover {
    color: #4299e1;
}

/* Pipeline mockup wrappers. .mockup-embed is a convention used by the
   AI pipeline; without it, raw <svg> inside .page-body also fills the
   container width so large diagrams don't render at their default size. */
.page-body .mockup-embed {
    margin: 1em 0;
    padding: 8px;
    background: #f7fafc;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
}

.page-body svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Buttons --- */

.btn-primary {
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* --- Preview-banner ---------------------------------------------------
   Verschijnt bovenaan de inhoud wanneer een redacteur de pagina opent via
   "Preview" in het paginabeheer (?preview=1). Bewust in een opvallende
   amberkleur: dit is géén publieke weergave, en de tekst eronder kan een
   nog niet gepubliceerde versie zijn. */
.preview-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    max-width: 1000px;
    margin-bottom: 1rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #d9a441;
    border-left: 5px solid #d9a441;
    border-radius: 3px;
    background-color: #fdf6e3;
    color: #6b4e12;
    font-size: 14px;
    line-height: 1.45;
}

.preview-banner i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 15px;
}

/* ===================================================================
   Print styles — Ctrl+P prints only the page header + body content,
   without the tree panel, navbar, sidebar tabs, or footer.
   =================================================================== */
@media print {
    /* Hide everything that isn't content */
    .site-tree-panel,
    .site-sidebar-tabs,
    nav,
    footer,
    .btn,
    .breadcrumb,
    /* De preview-banner is een schermhulpmiddel — nooit meeprinten. */
    .preview-banner {
        display: none !important;
    }

    /* Let content panel fill the full page width */
    .site-layout {
        height: auto !important;
        display: block !important;
    }

    .site-content-panel {
        overflow: visible !important;
        flex: none !important;
        width: 100% !important;
    }

    /* Remove background colours for print */
    body, .site-content-panel {
        background: white !important;
    }

    /* Page header block: keep borders for structure */
    .page-header-block {
        max-width: 100%;
    }

    /* Avoid page breaks inside header and tables */
    .page-header-block,
    .page-body table {
        break-inside: avoid;
    }
}
