/* ============================================================
   DevPortal — Responsive Shell Layout
   Breakpoints: ≥1024 desktop | 641-1023 rail | ≤640 mobile
   Landscape ≤540 height: compact bottom-tab padding
   ============================================================ */

/* ------------------------------------------------------------
   Reset
   ------------------------------------------------------------ */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* ------------------------------------------------------------
   Shell grid — desktop (≥1024px)
   Sidebar + main content area side-by-side.
   ------------------------------------------------------------ */
.dp-layout-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dp-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--size-topbar);
    background: var(--color-bg-titlebar);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.dp-shell {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
}

.dp-sidebar {
    width: auto;
    flex: 0 0 auto;
}

.dp-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: var(--space-4) var(--space-5);
}

/* ------------------------------------------------------------
   Rail tier (641–1023px) — sidebar becomes icon-only rail
   ------------------------------------------------------------ */
@media (max-width: 1023px) and (min-width: 641px) {
    .dp-sidebar {
        width: auto;
    }
}

/* ------------------------------------------------------------
   Mobile tier (≤640px) — sidebar hidden; bottom-tab appears
   ------------------------------------------------------------ */
@media (max-width: 640px) {
    .dp-sidebar {
        display: none;
    }

    body {
        padding-bottom: var(--size-bottombar);
    }

    .dp-main {
        padding: var(--space-3) var(--space-3);
        padding-bottom: var(--size-bottombar);
    }
}

/* ------------------------------------------------------------
   Landscape compact (≤540px height) — thinner bottom padding
   ------------------------------------------------------------ */
@media (orientation: landscape) and (max-height: 540px) {
    body {
        padding-bottom: 48px;
    }

    .dp-main {
        padding-bottom: 48px;
    }
}

/* ------------------------------------------------------------
   Bottom navigation (BaseBottomNavigation, mobile only, fixed to viewport bottom).
   The shared component owns the look of the tabs and the "More" sheet; the host owns where the bar
   sits and when it is shown.
   ------------------------------------------------------------ */
.base-bottom-nav {
    display: none;
}

@media (max-width: 640px) {
    .base-bottom-nav {
        display: flex;
        flex-direction: row;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--size-bottombar);
        background: var(--color-bg-surface);
        border-top: 1px solid var(--color-border);
        z-index: 200;
        align-items: stretch;
    }
}
