﻿/* =============================
   GLOBAL
============================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    display: flex;
    flex-direction: column;
}

main, .content, .fuel-page, .tm-page {
    flex: 1 0 auto;
    padding-bottom: 20px;
    
}

/* =============================
   MAP
============================= */
.map-wrapper {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 95px;
    width: 100vw;
    background: #000;
    overflow: hidden;
    z-index: 2000;
}

#map {
    width: 100%;
    height: 100%;
}

/* =============================
   TRIP SUMMARY CARD
============================= */
.trip-summary-card {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.85);
    padding: 16px 22px;
    border-radius: 10px;
    z-index: 5500 !important;
}

/* =============================
   HEADER
============================= */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #121212;
    color: #fff;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3000;
}

.brand {
    font-size: 1.75rem;
    font-weight: 600;
    text-decoration: none;
}

/* Desktop nav */
@media(min-width:769px) {
    .nav-links {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        position: relative;
        z-index: 3500 !important;
        margin-left: auto;
        padding-right: 20px;
    }
}

.nav-link {
    color: white;
    text-decoration: none;
}

/* =============================
   FOOTER
============================= */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 95px;
    background: #121212;
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-around;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #333;
    z-index: 4000;
}

/* =============================
   TRIP MENUS + BUTTONS
============================= */
.trip-menu {
    position: fixed !important;
    top: 0;
    bottom: 0;
    width: 350px;
    background: #121212;
    color: #fff;
    z-index: 6000 !important;
    transition: .35s;
    overflow-y: auto;
    padding: 20px;
}

    .trip-menu.left {
        left: -350px;
    }

        .trip-menu.left.open {
            left: 0;
        }

    .trip-menu.right {
        right: -350px;
    }

        .trip-menu.right.open {
            right: 0;
        }

.trip-toggle {
    position: fixed !important;
    background: #1b6ec2;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 5400;
}

    .trip-toggle:not(.right) {
        left: 20px;
        top: 120px;
    }

    .trip-toggle.right {
        right: 20px;
        top: 120px;
    }

/* =============================
   MOBILE NAV & MENU BUTTON
============================= */
.menu-toggle {
    top: 12px;
    right: 16px;
    font-size: 1.8rem;
    display: none;
}

/* =============================
   TRIP MENU LOGO
============================= */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.menu-logo {
    max-width: 60px;
    height: auto;
    border-radius: 5px;
    display: block;
}


@media(max-width:768px) {
    .menu-toggle {
        display: inline-flex !important;
        position: fixed;
        z-index: 6000;
        background: none;
        border: none;
        color: white;
    }

    /* mobile nav menu */
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed !important;
        top: 60px;
        left: 0;
        width: 100%;
        background: #121212;
        padding: 1rem;
        z-index: 5800 !important;
    }

        .nav-links.open {
            display: flex !important;
        }

    /* dim overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 5700;
    }

        .mobile-nav-overlay.show {
            display: block;
        }

    /* trip buttons under mobile nav */
    .trip-toggle {
        z-index: 5400 !important;
    }
}

/* Scroll container */
.fuel-table-wrapper {
    max-height: 70vh; /* or whatever height you want */
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Sticky table header */
.fuel-table thead th {
    position: sticky;
    top: 0;
    background: #121212; /* match your dark theme */
    color: #fff;
    z-index: 10; /* stay above the rows */
}
