/*
 * Route planner app shell. The page never scrolls: header on top, then a flex
 * row with the sidebar (scrolls internally) and the map column, whose result
 * drawer sits over the bottom of the map.
 */
html, body.rp-body {
    height: 100%;
}

body.rp-body {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
}

/* The Unify header is absolutely positioned and hides on scroll; in a shell
   that never scrolls it becomes a plain top bar that reserves its own height. */
body.rp-body #header.navbar-absolute-top {
    position: relative;
}

/* Full-width bar on the app shell, aligned with the sidebar's 1rem gutter. */
body.rp-body #header > .container {
    max-width: none;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.rp-shell {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
}

.rp-sidebar {
    flex: 0 0 380px;
    width: 380px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid rgba(0, 0, 0, .1);
    background-color: #fff;
}

.rp-sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
}

.rp-sidebar-footer {
    flex: 0 0 auto;
    padding: .75rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, .1);
    background-color: #fff;
}

.rp-map-column {
    flex: 1 1 auto;
    position: relative;
    min-width: 0;
    min-height: 0;
}

.rp-map {
    position: absolute;
    inset: 0;
}

.rp-drawer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 45vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, .15);
    box-shadow: 0 -.25rem 1rem rgba(0, 0, 0, .08);
}

.rp-drawer-body {
    overflow-y: auto;
    min-height: 0;
}

.rp-drawer.collapsed .rp-drawer-body {
    display: none;
}

.rp-section-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #677788;
    margin: 1rem 0 .5rem;
}

.rp-section-title:first-child {
    margin-top: 0;
}

/* Unify sizes its switch in em off the wrapper; the sidebar wants the small one. */
.rp-sidebar .form-switch {
    font-size: .875rem;
    min-height: 1.25rem;
    padding-left: 2.25em;
}

.rp-sidebar .form-switch .form-check-input {
    width: 1.75em;
    height: 1em;
    margin-left: -2.25em;
    margin-top: .2em;
}

.rp-point-row .rp-point-letter {
    width: 1.75rem;
    flex: 0 0 1.75rem;
    text-align: center;
    font-weight: 700;
}

.rp-timeline th, .rp-timeline td {
    padding: .3rem .5rem;
    font-size: .875rem;
    vertical-align: top;
}

.rp-stale {
    display: none;
}

.rp-stale.show {
    display: block;
}

@media (max-width: 991.98px) {
    .rp-sidebar {
        width: 100%;
        flex-basis: auto;
    }

    .rp-drawer {
        max-height: 55vh;
    }
}

@media print {
    body.rp-body #header, .rp-sidebar, .rp-map, .rp-open-sidebar {
        display: none !important;
    }

    body.rp-body, .rp-shell, .rp-map-column, .rp-drawer, .rp-drawer-body {
        position: static !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }
}
