/* =========================================================
   RESET & BASE
========================================================= */

html {
    -webkit-text-size-adjust: 100%;
}

html, body {
    background-color: #111;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

/* =========================================================
   FIXED TOP HEADER
========================================================= */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 56px;
    display: flex;
    align-items: center;

    background-color: #0f0f0f;
    border-bottom: 1px solid #333;

    z-index: 1100;
}

/* Optional back bar */
.sub-header {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;

    height: 48px;
    display: flex;
    align-items: center;

    background-color: #0f0f0f;
    border-bottom: 1px solid #333;

    z-index: 1099;
}

/* =========================================================
   FIXED BOTTOM NAV
========================================================= */

.navbar.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    height: 64px;

    background-color: #111;
    border-top: 1px solid #333;

    z-index: 1100;
}

.navbar.fixed-bottom .nav-link {
    color: #bbb;
    font-size: 0.8rem;
    text-align: center;
}

.navbar.fixed-bottom .nav-link i {
    display: block;
    font-size: 1.4rem;
}

.navbar.fixed-bottom .nav-link.active {
    color: #0d6efd;
}

/* =========================================================
   CONTENT OFFSET — THIS IS CRITICAL
========================================================= */

/* Default: header + sub-header */
main {
    padding-top: 104px;     /* 56 + 48 */
    padding-bottom: 72px;  /* footer + buffer */
}

/* Pages WITHOUT sub-header */
body.no-subheader main {
    padding-top: 56px;
}

/* =========================================================
   CONTAINER
========================================================= */

.container {
    max-width: 650px;
}

/* =========================================================
   UI ELEMENTS
========================================================= */

.card {
    background-color: #1a1a1a;
    border-radius: 0.6rem;
}

.form-control {
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.25);
}

a {
    color: #0d6efd;
}
a:hover {
    color: #74b0ff;
}

/* =========================================================
   MAP
========================================================= */

#map {
    width: 100%;
    height: 60vh;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 0.75rem;
}

/* =========================================================
   STOP LIST
========================================================= */

.list-group-item {
    background-color: #1a1a1a;
    border-color: #333;
    color: #fff;
}

.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* =========================================================
   SAFE AREA (ANDROID / iOS)
========================================================= */

.app-header {
    padding-top: env(safe-area-inset-top);
}

.navbar.fixed-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}
