/* Generell drawing-mode stil remains the same */
.leaflet-container.drawing-mode,
.leaflet-container.drawing-mode .leaflet-interactive,
.leaflet-container.drawing-mode .leaflet-marker-icon,
.leaflet-container.drawing-mode .leaflet-marker-shadow,
.leaflet-container.drawing-mode .leaflet-overlay-pane path,
.leaflet-container.drawing-mode .leaflet-overlay-pane svg,
.leaflet-container.drawing-mode .leaflet-zoom-animated {
  cursor: crosshair !important;
}

:root {
    --sidebar-width: 1500px;
    --transition-speed: 0.5s;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

nav {
    height: 60px;
}

.sliding-sidebar-container {
    position: relative;
    height: calc(100vh - 60px);
    width: 100vw;
    overflow: hidden;
    user-select: none;
}

/* Changed: no more flex layout needed for the overlay approach */
.content-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

/* Changed: leftDiv now takes full width */
#leftDiv {
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
}

/* Changed: rightDiv now positioned absolutely over leftDiv */
#rightDiv {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: rgba(52, 58, 64, 0.9); /* Semi-transparent background */
    color: white;
    overflow-y: auto;
    transition: transform var(--transition-speed) ease;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    z-index: 1001;
}

/* Changed: transform used to slide out of view instead of flex-basis */
#rightDiv.closed {
    transform: translateX(100%);
}

/* Changed: button position logic for overlay approach */
#toggleButton {
    position: absolute;
    top: 50%;
    right: var(--sidebar-width);
    transform: translateY(-50%);
    z-index: 1002;
    background-color: #0d6efd;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    transition: right var(--transition-speed) ease;
    width: 40px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleButton:hover {
    background-color: #0b5ed7;
}

/* Changed: button position when sidebar is closed */
#rightDiv.closed ~ #toggleButton {
    right: 0;
}

#toggleButton i {
    font-size: 1.5rem;
    color: white;
    transition: transform var(--transition-speed);
}

/* Rest of CSS remains unchanged */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dynamic-dropdown-content {
    min-width: 500px;
    max-width: 700px;
    width: auto;
    overflow-x: hidden;
}

.no-hover:hover,
.no-hover:focus,
.no-hover:active {
    background-color: transparent !important;
    border-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

.summary-line.highlight-summary {
    background-color: rgba(13, 110, 253, 0.2);
    font-weight: bold;
}

.page-navbar {
    height: var(--navbar-height);
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 15px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
}

#map {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* All other styles remain unchanged */


.leaflet-interactive {
    cursor: pointer !important;
}

.context-menu {
    position: absolute;
    z-index: 10000;
    min-width: 220px;
}

.context-menu .list-group {
    margin: 0;
}

.context-menu-header {
    background-color: #0d6efd;
    color: white;
    padding: 8px 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.context-menu-close {
    cursor: pointer;
    font-size: inherit;
}

.map-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    font-weight: bold;
}

#AddDelRouteContainer,
#drawingButtonsContainer,
#editingButtonsContainer,
#deleteSelectionContainer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    display: none;
    gap: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.8);
    margin: 10px;
    padding: 10px;
    border-radius: 10px;
}

#AddDelRouteContainer button,
#drawingButtonsContainer button,
#editingButtonsContainer button {
    width: 150px;
}

.highlight-marker {
    background-color: #000;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }
}

.context-menu {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 4000;
    min-width: 220px;
}

.context-menu .list-group-item {
    font-size: 14px;
    padding: 8px 12px;
    color: #212529;
}

.context-menu .list-group-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.context-menu .list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.context-menu .context-menu-header:hover {
    background-color: #0d6efd;
    color: white;
    font-weight: bold;
    cursor: default;
}

.context-menu .context-menu-header {
    background-color: #0d6efd;
    color: white;
    font-weight: bold;
}

#activeRode {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    color:#ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    z-index: 1050;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}



.popover {
    max-width: 450px;
    width: 450px;
  }

.popover-header {
    position: relative;
    display: block !important;
    background-color: var(--bs-primary);
    color: #ffffff !important;
    font-weight: 500;
    padding: 10px;
    border-bottom: none;
}




.popover-close-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    font-size: 0.8rem;
    z-index: 1050;
  }


  .custom-geocoder {
    top: 20px !important;
    margin-top: 0 !important;
  }
  
  /* Allow multiple controls to appear on same line */
  .leaflet-control-geocoder {
    clear: none !important;
  }
  
  #rodeListContainer {
    max-height: 400px;
    overflow-y: auto;
  }




  .route-summary-table {
    background-color: white;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Sørg for at tabellen vises over kartet */
}