/* Updated style.css */
:root {
    --viewport-height: 100vh;
}

body {
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: var(--viewport-height);
}

/* Main app container using flexbox */
#app-container {
    display: flex;
    flex-direction: column;
    height: var(--viewport-height);
    position: relative;
}

/* Fixed nav bar at top */
#nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px;
    background-color: rgba(33, 37, 41, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    flex-shrink: 0;
}

/* Class for nav bar panel with text content */
.nav-bar-text-panel {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    text-align: center;
}

/* Map container that grows/shrinks */
#map-container {
    flex: 1;
    position: relative;
    transition: flex 0.35s ease-in-out;
}

#map {
    width: 100%;
    height: 100%;
}

/* Hamburger menu in nav bar */
#hamburger-menu {
    position: relative;
}

#hamburger-menu .btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
}

#hamburger-menu .btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#hamburger-menu .dropdown-menu {
    background-color: rgba(33, 37, 41, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#hamburger-menu .dropdown-item {
    color: white;
    padding: 8px 16px;
}

#hamburger-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

#hamburger-menu .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Submenu styling */
#hamburger-menu .dropdown-submenu {
    position: relative;
}

#hamburger-menu .dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

/* Message container - overlays top of map */
#message-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    pointer-events: none;
    padding: 15px;
}

#message-container > * {
    pointer-events: auto;
}

/* Message styling */
.message {
    background-color: rgba(33, 37, 41, 0.7);
    color: white;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

.message:last-child {
    margin-bottom: 0;
}

.message-content {
    flex: 1;
    margin-right: 10px;
}

.message-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.message-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message.removing {
    animation: slideUp 0.3s ease-in forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* UI overlay containers - positioned below message container */
#ui-overlay {
    position: absolute;
    top: 15px; /* Will be adjusted by JavaScript based on message container height */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    pointer-events: none;
    transition: top 0.3s ease;
}

#ui-overlay > * {
    pointer-events: auto;
}

#module-ui-container {
    margin-top: 10px;
}

/* Bottom drawer */
#bottom-drawer {
    height: 33vh;
    background-color: #212529;
    color: white;
    display: none;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.35s ease-in-out;
}

#bottom-drawer.show {
    display: flex;
}

#bottom-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

#bottom-drawer-title {
    font-weight: bold;
    margin: 0;
}

#close-drawer-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#close-drawer-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

#bottom-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Log display styling */
.log-display {
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
}

.log-message:not(:last-child) {
    margin-bottom: 5px;
}

/* Settings display styling */
.settings-display h2 {
    color: white;
    margin-bottom: 20px;
}

/* Bottom-left controls */
#bottom-left-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.1);
}