/**
 * Main content must sit below Materialize .navbar-fixed (the bar is position:fixed).
 *
 * Materialize keeps a .navbar-fixed *placeholder* in document flow (typically 64px tall on desktop)
 * while the real <nav> is often taller (100px / 120px via inline styles). The padding below is
 * *additional* to that placeholder.
 */
:root {
    /* Default when no body token: moderate clearance under fixed header */
    --propella-fixed-nav-offset: 52px;
}

body.layout-top-nav-offset--4em {
    --propella-fixed-nav-offset: 4em;
}

body.layout-top-nav-offset--8em {
    --propella-fixed-nav-offset: 88px;
}

body.layout-top-nav-offset--120 {
    /* 120px nav − 64px placeholder + ~16px gap */
    --propella-fixed-nav-offset: 80px;
}

/* Portal layouts: marketing, advisor, administrator, admin, tenant (100px nav) — logo/breadcrumb clearance */
body.layout-top-nav-offset--100-nav {
    --propella-fixed-nav-offset: 176px;
}

/*
 * Sibling combinator: works when dropdowns/sidenav sit between nav and main (e.g. public app layout).
 * !important: must win over later stylesheets (e.g. @stack('styles') / body-linked CSS) that reset padding.
 */
body div.navbar-fixed:not([hidden]) ~ div.container-fluid {
    padding-top: calc(var(--propella-fixed-nav-offset, 52px) + env(safe-area-inset-top, 0px)) !important;
}

/* Explicit shell for marketing layout — fallback if sibling selector is flaky */
body.layout-top-nav-offset--100-nav div.navbar-fixed:not([hidden]) ~ div.container-fluid.marketing-layout-main {
    padding-top: calc(var(--propella-fixed-nav-offset, 176px) + env(safe-area-inset-top, 0px)) !important;
}
